diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1a13a981a8..0d11a7fe0a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,6 +3,7 @@ "image": "nfcore/gitpod:latest", "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e ../ && pre-commit install --install-hooks", "remoteUser": "gitpod", + "runArgs": ["--privileged"], // Configure tool-specific properties. "customizations": { diff --git a/.github/RELEASE_CHECKLIST.md b/.github/RELEASE_CHECKLIST.md index f7cab98c55..775dd9ecd4 100644 --- a/.github/RELEASE_CHECKLIST.md +++ b/.github/RELEASE_CHECKLIST.md @@ -3,16 +3,17 @@ 1. Check issue milestones to see outstanding issues to resolve if possible or transfer to the milestones for the next release e.g. [`v1.9`](https://github.com/nf-core/tools/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.9) 2. Most importantly, pick an undeniably outstanding [name](http://www.codenamegenerator.com/) for the release where _Prefix_ = _Metal_ and _Dictionary_ = _Animal_. 3. Check the [pipeline health page](https://nf-co.re/pipeline_health) to make sure that all repos look sane (missing `TEMPLATE` branches etc) -4. Create a PR to `dev` to bump the version in `CHANGELOG.md` and `setup.py` and change the gitpod container to `nfcore/gitpod:latest`. -5. Make sure all CI tests are passing! -6. Create a PR from `dev` to `master` -7. Make sure all CI tests are passing again (additional tests are run on PRs to `master`) -8. Request review (2 approvals required) -9. Run `rich-codex` to regenerate docs screengrabs (actions `workflow_dispatch` button) -10. Merge the PR into `master` -11. Wait for CI tests on the commit to passed -12. (Optional but a good idea) Run a manual sync on `nf-core/testpipeline` and check that CI is passing on the resulting PR. -13. Create a new release copying the `CHANGELOG` for that release into the description section. +4. Check that modules/subworkflows in tempalte are up to date with the latest releases +5. Create a PR to `dev` to bump the version in `CHANGELOG.md` and `setup.py` and change the gitpod container to `nfcore/gitpod:latest`. +6. Make sure all CI tests are passing! +7. Create a PR from `dev` to `master` +8. Make sure all CI tests are passing again (additional tests are run on PRs to `master`) +9. Request review (2 approvals required) +10. Run `rich-codex` to regenerate docs screengrabs (actions `workflow_dispatch` button) +11. Merge the PR into `master` +12. Wait for CI tests on the commit to passed +13. (Optional but a good idea) Run a manual sync on `nf-core/testpipeline` and check that CI is passing on the resulting PR. +14. Create a new release copying the `CHANGELOG` for that release into the description section. ## After release diff --git a/.github/workflows/create-lint-wf.yml b/.github/workflows/create-lint-wf.yml index 654d248f79..8f6836f309 100644 --- a/.github/workflows/create-lint-wf.yml +++ b/.github/workflows/create-lint-wf.yml @@ -31,10 +31,10 @@ jobs: name: Check out source-code repository # Set up nf-core/tools - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | diff --git a/.github/workflows/create-test-lint-wf-template.yml b/.github/workflows/create-test-lint-wf-template.yml index 62ec65bcd5..302399b3dc 100644 --- a/.github/workflows/create-test-lint-wf-template.yml +++ b/.github/workflows/create-test-lint-wf-template.yml @@ -35,10 +35,10 @@ jobs: - uses: actions/checkout@v3 name: Check out source-code repository - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | @@ -97,7 +97,7 @@ jobs: # Try syncing it before we change anything - name: nf-core sync - run: nf-core --log-file log.txt sync --dir my-prefix-testpipeline/ --template-yaml ${{ matrix.TEMPLATE }} + run: nf-core --log-file log.txt sync --dir my-prefix-testpipeline/ # Run code style linting - name: Run Prettier --check diff --git a/.github/workflows/create-test-wf.yml b/.github/workflows/create-test-wf.yml index 7cff154a08..5faa59772c 100644 --- a/.github/workflows/create-test-wf.yml +++ b/.github/workflows/create-test-wf.yml @@ -29,10 +29,10 @@ jobs: - uses: actions/checkout@v3 name: Check out source-code repository - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index d762154f7e..1f539fe09a 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -16,10 +16,10 @@ jobs: - uses: actions/checkout@v3 name: Check out source-code repository - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index 30cf965af0..ed2314046a 100644 --- a/.github/workflows/fix-linting.yml +++ b/.github/workflows/fix-linting.yml @@ -38,10 +38,10 @@ jobs: # Override to remove the default --check flag so that we make changes options: "--color" - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: python-isort uses: isort/isort-action@v1.0.0 with: diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index 869d8898d9..045f393f42 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -76,10 +76,10 @@ jobs: - name: Check out source-code repository uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: python-isort uses: isort/isort-action@v1.1.0 with: diff --git a/.github/workflows/pytest-frozen-ubuntu-20.04.yml b/.github/workflows/pytest-frozen-ubuntu-20.04.yml deleted file mode 100644 index 5faf8ce605..0000000000 --- a/.github/workflows/pytest-frozen-ubuntu-20.04.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Python tests Ubuntu-20.04 (frozen) -# This workflow is triggered on pushes and PRs to the repository. -# Only run if we changed a Python file -on: - push: - branches: - - dev - pull_request: - release: - types: [published] - -# Cancel if a newer run is started -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - pytest-frozen: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - name: Check out source-code repository - - - name: Set up Python 3.8 - uses: actions/setup-python@v3 - with: - python-version: "3.8" - - - name: Install python dependencies - run: | - python -m pip install --upgrade pip -r requirements-dev.txt - pip install -e . - - - name: Downgrade git to the Ubuntu official repository's version - run: | - sudo apt update - sudo apt remove git git-man - sudo add-apt-repository --remove ppa:git-core/ppa - sudo apt install git - - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 - with: - version: "latest-everything" - - - name: Test with pytest - run: python3 -m pytest tests/ --color=yes --cov-report=xml --cov-config=.github/.coveragerc --cov=nf_core - - - uses: codecov/codecov-action@v1 - name: Upload code coverage report - with: - if: success() - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d03b1c33de..01067848cf 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -5,7 +5,13 @@ on: push: branches: - dev + paths-ignore: + - "docs/**" + - "CHANGELOG.md" pull_request: + paths-ignore: + - "docs/**" + - "CHANGELOG.md" release: types: [published] @@ -14,12 +20,19 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +env: + GITHUB_TOKEN: ${{ github.token }} + jobs: pytest: - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.11"] + runner: ["ubuntu-latest"] + include: + - runner: "ubuntu-20.04" + python-version: "3.8" steps: - uses: actions/checkout@v3 @@ -35,6 +48,14 @@ jobs: python -m pip install --upgrade pip -r requirements-dev.txt pip install -e . + - name: Downgrade git to the Ubuntu official repository's version + if: ${{ matrix.runner == 'ubuntu-20.04' && matrix.python-version == '3.8' }} + run: | + sudo apt update + sudo apt remove git git-man + sudo add-apt-repository --remove ppa:git-core/ppa + sudo apt install git + - name: Install Nextflow uses: nf-core/setup-nextflow@v1 with: diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index f3dec0e086..fbbdacc8ab 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -48,10 +48,10 @@ jobs: path: nf-core/${{ matrix.pipeline }} fetch-depth: "0" - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | diff --git a/.github/workflows/tools-api-docs-dev.yml b/.github/workflows/tools-api-docs-dev.yml index 3ec4dc2e10..add939aba1 100644 --- a/.github/workflows/tools-api-docs-dev.yml +++ b/.github/workflows/tools-api-docs-dev.yml @@ -4,7 +4,11 @@ on: push: branches: - dev + paths-ignore: + - "CHANGELOG.md" pull_request: + paths-ignore: + - "CHANGELOG.md" release: types: [published] @@ -22,10 +26,10 @@ jobs: - name: Check out source-code repository uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | @@ -45,6 +49,6 @@ jobs: username: ${{ secrets.ftp_username}} password: ${{ secrets.ftp_password }} local-dir: "./docs/api/_build/html/" - server-dir: ${{ secrets.ftp_server_dir }}/dev/ + server-dir: ${{ secrets.ftp_server_old_site_dir }}/dev/ protocol: ${{ secrets.ftp_protocol }} port: ${{ secrets.ftp_port }} diff --git a/.github/workflows/tools-api-docs-release.yml b/.github/workflows/tools-api-docs-release.yml index 71acf6baa1..f049d74ca0 100644 --- a/.github/workflows/tools-api-docs-release.yml +++ b/.github/workflows/tools-api-docs-release.yml @@ -21,10 +21,10 @@ jobs: - name: Check out source-code repository uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | @@ -43,6 +43,6 @@ jobs: username: ${{ secrets.ftp_username}} password: ${{ secrets.ftp_password }} local-dir: "./docs/api/_build/html/" - server-dir: ${{ secrets.ftp_server_dir }}/${{ matrix.dir }}/ + server-dir: ${{ secrets.ftp_server_old_site_dir }}/${{ matrix.dir }}/ protocol: ${{ secrets.ftp_protocol }} port: ${{ secrets.ftp_port }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b6da2e6b..9311f19785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # nf-core/tools: Changelog +# [v2.10 - Nickel Ostrich](https://github.com/nf-core/tools/releases/tag/2.10) + [2023-09-25] + +### Template + +- Fix links in `multiqc_config.yml` ([#2372](https://github.com/nf-core/tools/pull/2372) and [#2412](https://github.com/nf-core/tools/pull/2412)) +- Remove default false from nextflow_schema.json ([#2376](https://github.com/nf-core/tools/pull/2376)) +- Add module MULTIQC to modules.config ([#2377](https://github.com/nf-core/tools/pull/2377)) +- Add GitHub workflow for automated release announcements ([#2382](https://github.com/nf-core/tools/pull/2382)) +- Update the Code of Conduct ([#2381](https://github.com/nf-core/tools/pull/2381)) +- Save template information to `.nf-core.yml` and deprecate argument `--template-yaml` for `nf-core sync` ([#2388](https://github.com/nf-core/tools/pull/2388) and [#2389](https://github.com/nf-core/tools/pull/2389)) +- ([#2397](https://github.com/nf-core/tools/pull/2397)) Remove fixed Ubuntu test and added to standard testing matrix +- ([#2396](https://github.com/nf-core/tools/pull/2396)) Reduce container finding error to warning since the registries are not consistent. +- ([#2415](https://github.com/nf-core/tools/pull/2415#issuecomment-1709847086)) Add autoMounts for apptainer. +- Remove `igenomes_base` from the schema, so that nf-validation doesn't create a file path and throw errors offline for s3 objects. +- Modified devcontainer permissions so that singularity can be run in Codespaces/VS Code devcontainers ([Commit a103f44](https://github.com/CarsonJM/tools/commit/a103f4484eca8c6d668e4653a4ed8d20faf1b41d)) +- Update Gitpod profile resources to reflect base environment settings. +- ([#747](https://github.com/nf-core/tools/issues/747)) Add to the template the code to dump the selected pipeline parameters into a json file. + +### Download + +- Improved container image resolution and prioritization of http downloads over Docker URIs ([#2364](https://github.com/nf-core/tools/pull/2364)). +- Registries provided with `-l`/`--container-library` will be ignored for modules with explicit container registry specifications ([#2403](https://github.com/nf-core/tools/pull/2403)). +- Fix unintentional downloading of containers in test for the Tower download functionality. Bug reported by @adamrtalbot and @awgymer ([#2434](https://github.com/nf-core/tools/pull/2434)). + +### Linting + +- Add new command `nf-core subworkflows lint` ([#2379](https://github.com/nf-core/tools/pull/2379)) + +### Modules + +### Subworkflows + +- Fix bug: missing subworkflow name when using `nf-core subworkflows create` ([#2435](https://github.com/nf-core/tools/pull/2435)) + +### General + +- Initialise `docker_image_name` to fix `UnboundLocalError` error ([#2374](https://github.com/nf-core/tools/pull/2374)) +- Fix prompt pipeline revision during launch ([#2375](https://github.com/nf-core/tools/pull/2375)) +- Add a `create-params-file` command to create a YAML parameter file for a pipeline containing parameter documentation and defaults. ([#2362](https://github.com/nf-core/tools/pull/2362)) +- Update the Code of Conduct ([#2381](https://github.com/nf-core/tools/pull/2381)) +- Remove `--no-git` option from `nf-core create` ([#2394](https://github.com/nf-core/tools/pull/2394)) +- Throw warning when custom workflow name contains special characters ([#2401](https://github.com/nf-core/tools/pull/2401)) +- Bump version of nf-test snapshot files with `nf-core bump-version` ([#2410](https://github.com/nf-core/tools/pull/2410)) + # [v2.9 - Chromium Falcon](https://github.com/nf-core/tools/releases/tag/2.9) + [2023-06-29] ### Template @@ -7,7 +51,7 @@ - `params.max_multiqc_email_size` is no longer required ([#2273](https://github.com/nf-core/tools/pull/2273)) - Remove `cleanup = true` from `test_full.config` in pipeline template ([#2279](https://github.com/nf-core/tools/pull/2279)) - Fix usage docs for specifying `params.yaml` ([#2279](https://github.com/nf-core/tools/pull/2279)) -- Added stub in modules template ([#2277])(https://github.com/nf-core/tools/pull/2277) [Contributed by @nvnieuwk] +- Added stub in modules template ([#2277](https://github.com/nf-core/tools/pull/2277)) [Contributed by @nvnieuwk] - Move registry definitions out of profile scope ([#2286])(https://github.com/nf-core/tools/pull/2286) - Remove `aws_tower` profile ([#2287])(https://github.com/nf-core/tools/pull/2287) - Fixed the Slack report to include the pipeline name ([#2291](https://github.com/nf-core/tools/pull/2291)) @@ -50,7 +94,7 @@ _In addition, `-r` / `--revision` has been changed to a parameter that can be pr ### Linting - Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270)) -- Error if module container specification has quay.io as prefix when it shouldn't have ([#2278])(https://github.com/nf-core/tools/pull/2278/files) +- Error if module container specification has quay.io as prefix when it shouldn't have ([#2278](https://github.com/nf-core/tools/pull/2278/files) - Detect if container is 'simple name' and try to contact quay.io server by default ([#2281](https://github.com/nf-core/tools/pull/2281)) - Warn about null/None/empty default values in `nextflow_schema.json` ([#3328](https://github.com/nf-core/tools/pull/2328)) - Fix linting when creating a pipeline skipping some parts of the template and add CI test ([#2330](https://github.com/nf-core/tools/pull/2330)) @@ -81,7 +125,7 @@ _In addition, `-r` / `--revision` has been changed to a parameter that can be pr - Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202)) - Fixed minor Jinja2 templating bug that caused the PR template to miss a newline - Updated AWS tests to use newly moved `seqeralabs/action-tower-launch` instead of `nf-core/tower-action` -- Remove `.cff` files from `.editorconfig` [(#2145)[https://github.com/nf-core/tools/pull/2145]] +- Remove `.cff` files from `.editorconfig` ([#2145](https://github.com/nf-core/tools/pull/2145)) - Simplify pipeline README ([#2186](https://github.com/nf-core/tools/issues/2186)) - Added support for the apptainer container engine via `-profile apptainer`. ([#2244](https://github.com/nf-core/tools/issues/2244)) [Contributed by @jfy133] - Added config `docker.registry` to pipeline template for a configurable default container registry when using Docker containers. Defaults to `quay.io` ([#2133](https://github.com/nf-core/tools/pull/2133)) @@ -1108,7 +1152,7 @@ making a pull-request. See [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md) - Move `params`section from `base.config` to `nextflow.config` - Use `env` scope to export `PYTHONNOUSERSITE` in `nextflow.config` to prevent conflicts with host Python environment - Bump minimum Nextflow version to `19.10.0` - required to properly use `env` scope in `nextflow.config` -- Added support for nf-tower in the travis tests, using public mailbox nf-core@mailinator.com +- Added support for nf-tower in the travis tests, using public mailbox - Add link to [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](http://semver.org/spec/v2.0.0.html) to CHANGELOG - Adjusted `.travis.yml` checks to allow for `patch` branches to be tested - Add Python 3.7 dependency to the `environment.yml` file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f4fd052f1f..c089ec78c4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,18 +1,20 @@ -# Code of Conduct at nf-core (v1.0) +# Code of Conduct at nf-core (v1.4) ## Our Pledge -In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core, pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: +In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: - Age +- Ability - Body size +- Caste - Familial status - Gender identity and expression - Geographical location - Level of experience - Nationality and national origins - Native language -- Physical and neurological ability +- Neurodiversity - Race or ethnicity - Religion - Sexual identity and orientation @@ -22,80 +24,133 @@ Please note that the list above is alphabetised and is therefore not ranked in a ## Preamble -> Note: This Code of Conduct (CoC) has been drafted by the nf-core Safety Officer and been edited after input from members of the nf-core team and others. "We", in this document, refers to the Safety Officer and members of the nf-core core team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will amended periodically to keep it up-to-date, and in case of any dispute, the most current version will apply. +:::note +This Code of Conduct (CoC) has been drafted by Renuka Kudva, Cris Tuñí, and Michael Heuer, with input from the nf-core Core Team and Susanna Marquez from the nf-core community. "We", in this document, refers to the Safety Officers and members of the nf-core Core Team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will be amended periodically to keep it up-to-date. In case of any dispute, the most current version will apply. +::: -An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). Our current safety officer is Renuka Kudva. +An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). + +Our Safety Officers are Saba Nafees, Cris Tuñí, and Michael Heuer. nf-core is a young and growing community that welcomes contributions from anyone with a shared vision for [Open Science Policies](https://www.fosteropenscience.eu/taxonomy/term/8). Open science policies encompass inclusive behaviours and we strive to build and maintain a safe and inclusive environment for all individuals. -We have therefore adopted this code of conduct (CoC), which we require all members of our community and attendees in nf-core events to adhere to in all our workspaces at all times. Workspaces include but are not limited to Slack, meetings on Zoom, Jitsi, YouTube live etc. +We have therefore adopted this CoC, which we require all members of our community and attendees of nf-core events to adhere to in all our workspaces at all times. Workspaces include, but are not limited to, Slack, meetings on Zoom, gather.town, YouTube live etc. -Our CoC will be strictly enforced and the nf-core team reserve the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. +Our CoC will be strictly enforced and the nf-core team reserves the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. -We ask all members of our community to help maintain a supportive and productive workspace and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. +We ask all members of our community to help maintain supportive and productive workspaces and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. -Questions, concerns or ideas on what we can include? Contact safety [at] nf-co [dot] re +Questions, concerns, or ideas on what we can include? Contact members of the Safety Team on Slack or email safety [at] nf-co [dot] re. ## Our Responsibilities -The safety officer is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. +Members of the Safety Team (the Safety Officers) are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. -The safety officer in consultation with the nf-core core team have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +The Safety Team, in consultation with the nf-core core team, have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this CoC, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Members of the core team or the safety officer who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and be subject to the same actions as others in violation of the CoC. +Members of the core team or the Safety Team who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and will be subject to the same actions as others in violation of the CoC. -## When are where does this Code of Conduct apply? +## When and where does this Code of Conduct apply? -Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events. This includes but is not limited to the following listed alphabetically and therefore in no order of preference: +Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events, such as hackathons, workshops, bytesize, and collaborative workspaces on gather.town. These guidelines include, but are not limited to, the following (listed alphabetically and therefore in no order of preference): - Communicating with an official project email address. - Communicating with community members within the nf-core Slack channel. - Participating in hackathons organised by nf-core (both online and in-person events). -- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence. -- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, Jitsi, YouTube live etc. +- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence, and on the nf-core gather.town workspace. +- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, gather.town, Jitsi, YouTube live etc. - Representing nf-core on social media. This includes both official and personal accounts. ## nf-core cares 😊 -nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include but are not limited to the following (listed in alphabetical order): +nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include, but are not limited to, the following (listed in alphabetical order): - Ask for consent before sharing another community member’s personal information (including photographs) on social media. - Be respectful of differing viewpoints and experiences. We are all here to learn from one another and a difference in opinion can present a good learning opportunity. -- Celebrate your accomplishments at events! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) +- Celebrate your accomplishments! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) - Demonstrate empathy towards other community members. (We don’t all have the same amount of time to dedicate to nf-core. If tasks are pending, don’t hesitate to gently remind members of your team. If you are leading a task, ask for help if you feel overwhelmed.) - Engage with and enquire after others. (This is especially important given the geographically remote nature of the nf-core community, so let’s do this the best we can) - Focus on what is best for the team and the community. (When in doubt, ask) -- Graciously accept constructive criticism, yet be unafraid to question, deliberate, and learn. +- Accept feedback, yet be unafraid to question, deliberate, and learn. - Introduce yourself to members of the community. (We’ve all been outsiders and we know that talking to strangers can be hard for some, but remember we’re interested in getting to know you and your visions for open science!) -- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communications to be kind.**) +- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communication to be kind.**) - Take breaks when you feel like you need them. -- Using welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack.) +- Use welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack) ## nf-core frowns on 😕 -The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this code of conduct. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces. +The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this CoC. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces: - Deliberate intimidation, stalking or following and sustained disruption of communication among participants of the community. This includes hijacking shared screens through actions such as using the annotate tool in conferencing software such as Zoom. - “Doxing” i.e. posting (or threatening to post) another person’s personal identifying information online. - Spamming or trolling of individuals on social media. -- Use of sexual or discriminatory imagery, comments, or jokes and unwelcome sexual attention. -- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion or work experience. +- Use of sexual or discriminatory imagery, comments, jokes, or unwelcome sexual attention. +- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion, or work experience. ### Online Trolling -The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the added issue of online trolling. This is unacceptable, reports of such behaviour will be taken very seriously, and perpetrators will be excluded from activities immediately. +The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the risk of online trolling. This is unacceptable — reports of such behaviour will be taken very seriously and perpetrators will be excluded from activities immediately. -All community members are required to ask members of the group they are working within for explicit consent prior to taking screenshots of individuals during video calls. +All community members are **required** to ask members of the group they are working with for explicit consent prior to taking screenshots of individuals during video calls. -## Procedures for Reporting CoC violations +## Procedures for reporting CoC violations If someone makes you feel uncomfortable through their behaviours or actions, report it as soon as possible. -You can reach out to members of the [nf-core core team](https://nf-co.re/about) and they will forward your concerns to the safety officer(s). +You can reach out to members of the Safety Team (Saba Nafees, Cris Tuñí, and Michael Heuer) on Slack. Alternatively, contact a member of the nf-core core team [nf-core core team](https://nf-co.re/about), and they will forward your concerns to the Safety Team. + +Issues directly concerning members of the Core Team or the Safety Team will be dealt with by other members of the core team and the safety manager — possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson and details will be shared in due course. + +All reports will be handled with the utmost discretion and confidentiality. + +You can also report any CoC violations to safety [at] nf-co [dot] re. In your email report, please do your best to include: + +- Your contact information. +- Identifying information (e.g. names, nicknames, pseudonyms) of the participant who has violated the Code of Conduct. +- The behaviour that was in violation and the circumstances surrounding the incident. +- The approximate time of the behaviour (if different than the time the report was made). +- Other people involved in the incident, if applicable. +- If you believe the incident is ongoing. +- If there is a publicly available record (e.g. mailing list record, a screenshot). +- Any additional information. + +After you file a report, one or more members of our Safety Team will contact you to follow up on your report. + +## Who will read and handle reports + +All reports will be read and handled by the members of the Safety Team at nf-core. + +If members of the Safety Team are deemed to have a conflict of interest with a report, they will be required to recuse themselves as per our Code of Conduct and will not have access to any follow-ups. + +To keep this first report confidential from any of the Safety Team members, please submit your first report by direct messaging on Slack/direct email to any of the nf-core members you are comfortable disclosing the information to, and be explicit about which member(s) you do not consent to sharing the information with. + +## Reviewing reports + +After receiving the report, members of the Safety Team will review the incident report to determine whether immediate action is required, for example, whether there is immediate threat to participants’ safety. + +The Safety Team, in consultation with members of the nf-core core team, will assess the information to determine whether the report constitutes a Code of Conduct violation, for them to decide on a course of action. + +In the case of insufficient information, one or more members of the Safety Team may contact the reporter, the reportee, or any other attendees to obtain more information. -Issues directly concerning members of the core team will be dealt with by other members of the core team and the safety manager, and possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson, and details will be shared in due course. +Once additional information is gathered, the Safety Team will collectively review and decide on the best course of action to take, if any. The Safety Team reserves the right to not act on a report. -All reports will be handled with utmost discretion and confidentially. +## Confidentiality + +All reports, and any additional information included, are only shared with the team of safety officers (and possibly members of the core team, in case the safety officer is in violation of the CoC). We will respect confidentiality requests for the purpose of protecting victims of abuse. + +We will not name harassment victims, beyond discussions between the safety officer and members of the nf-core team, without the explicit consent of the individuals involved. + +## Enforcement + +Actions taken by the nf-core’s Safety Team may include, but are not limited to: + +- Asking anyone to stop a behaviour. +- Asking anyone to leave the event and online spaces either temporarily, for the remainder of the event, or permanently. +- Removing access to the gather.town and Slack, either temporarily or permanently. +- Communicating to all participants to reinforce our expectations for conduct and remind what is unacceptable behaviour; this may be public for practical reasons. +- Communicating to all participants that an incident has taken place and how we will act or have acted — this may be for the purpose of letting event participants know we are aware of and dealing with the incident. +- Banning anyone from participating in nf-core-managed spaces, future events, and activities, either temporarily or permanently. +- No action. ## Attribution and Acknowledgements @@ -106,6 +161,22 @@ All reports will be handled with utmost discretion and confidentially. ## Changelog -### v1.0 - March 12th, 2021 +### v1.4 - February 8th, 2022 + +- Included a new member of the Safety Team. Corrected a typographical error in the text. + +### v1.3 - December 10th, 2021 + +- Added a statement that the CoC applies to nf-core gather.town workspaces. Corrected typographical errors in the text. + +### v1.2 - November 12th, 2021 + +- Removed information specific to reporting CoC violations at the Hackathon in October 2021. + +### v1.1 - October 14th, 2021 + +- Updated with names of new Safety Officers and specific information for the hackathon in October 2021. + +### v1.0 - March 15th, 2021 - Complete rewrite from original [Contributor Covenant](http://contributor-covenant.org/) CoC. diff --git a/Dockerfile b/Dockerfile index 54408b372f..b148c4b544 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8.9-slim +FROM python:3.11.5-slim LABEL authors="phil.ewels@scilifelab.se,erik.danielsson@scilifelab.se" \ description="Docker image containing requirements for the nfcore tools" @@ -21,7 +21,7 @@ RUN apt-get update \ # Create man dir required for Java installation # and install Java RUN mkdir -p /usr/share/man/man1 \ - && apt-get install -y openjdk-11-jre \ + && apt-get install -y default-jre \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* # Setup ARG for NXF_VER ENV diff --git a/README.md b/README.md index 012e4c4b12..c9bcd25398 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ A python package with helper tools for the nf-core community. - [`nf-core` tools update](#update-tools) - [`nf-core list` - List available pipelines](#listing-pipelines) - [`nf-core launch` - Run a pipeline with interactive parameter prompts](#launch-a-pipeline) +- [`nf-core create-params-file` - Create a parameter file](#create-a-parameter-file) - [`nf-core download` - Download a pipeline for offline use](#downloading-pipelines-for-offline-use) - [`nf-core licences` - List software licences in a pipeline](#pipeline-software-licences) - [`nf-core create` - Create a new pipeline with the nf-core template](#creating-a-new-pipeline) @@ -53,6 +54,7 @@ A python package with helper tools for the nf-core community. - [`subworkflows remove` - Remove a subworkflow from a pipeline](#remove-a-subworkflow-from-a-pipeline) - [`subworkflows create` - Create a subworkflow from the template](#create-a-new-subworkflow) - [`subworkflows create-test-yml` - Create the `test.yml` file for a subworkflow](#create-a-subworkflow-test-config-file) + - [`subworkflows lint` - Check a subworkflow against nf-core guidelines](#check-a-subworkflow-against-nf-core-guidelines) - [`subworkflows test` - Run the tests for a subworkflow](#run-the-tests-for-a-subworkflow-using-pytest) - [Citation](#citation) @@ -76,7 +78,7 @@ conda install nf-core Alternatively, you can create a new environment with both nf-core/tools and nextflow: ```bash -conda create --name nf-core python=3.8 nf-core nextflow +conda create --name nf-core python=3.11 nf-core nextflow conda activate nf-core ``` @@ -225,10 +227,14 @@ Auto-completion for the `nf-core` command is available for bash, zsh and fish. T After a restart of the shell session you should have auto-completion for the `nf-core` command and all its sub-commands and options. -> **NB:** The added line will run the command `nf-core` (which will also slow down startup time of your shell). You should therefore either have the nf-core/tools installed globally. -> You can also wrap it inside `if type nf-core > /dev/null; then ` \ `fi` for bash and zsh or `if command -v nf-core &> /dev/null eval (env _NF_CORE_COMPLETE=fish_source nf-core) end` for fish. You need to then source the config in your environment for the completions to be activated. +:::note +The added line will run the command `nf-core` (which will also slow down startup time of your shell). You should therefore either have the nf-core/tools installed globally. +You can also wrap it inside `if type nf-core > /dev/null; then ` \ `fi` for bash and zsh or `if command -v nf-core &> /dev/null eval (env _NF_CORE_COMPLETE=fish_source nf-core) end` for fish. You need to then source the config in your environment for the completions to be activated. +::: -> **NB:** If you see the error `command not found compdef` , be sure that your config file contains the line `autoload -Uz compinit && compinit` before the eval line. +:::info +If you see the error `command not found compdef` , be sure that your config file contains the line `autoload -Uz compinit && compinit` before the eval line. +::: ## Listing pipelines @@ -311,6 +317,22 @@ Do you want to run this command now? [y/n]: - `--url` - Change the URL used for the graphical interface, useful for development work on the website. +## Create a parameter file + +Sometimes it is easier to manually edit a parameter file than to use the web interface or interactive commandline wizard +provided by `nf-core launch`, for example when running a pipeline with many options on a remote server without a graphical interface. + +You can create a parameter file with all parameters of a pipeline with the `nf-core create-params-file` command. +This file can then be passed to `nextflow` with the `-params-file` flag. + +This command takes one argument - either the name of a nf-core pipeline which will be pulled automatically, +or the path to a directory containing a Nextflow pipeline _(can be any pipeline, doesn't have to be nf-core)_. + +The generated YAML file contains all parameters set to the pipeline default value along with their description in comments. +This template can then be used by uncommenting and modifying the value of parameters you want to pass to a pipline run. + +Hidden options are not included by default, but can be included using the `-x`/`--show-hidden` flag. + ## Downloading pipelines for offline use Sometimes you may need to run an nf-core pipeline on a server or HPC system that has no internet connection. @@ -343,14 +365,18 @@ You can run the pipeline by simply providing the directory path for the `workflo nextflow run /path/to/download/nf-core-rnaseq-dev/workflow/ --input mydata.csv --outdir results # usual parameters here ``` -> Note that if you downloaded Singularity container images, you will need to use `-profile singularity` or have it enabled in your config file. +:::note +If you downloaded Singularity container images, you will need to use `-profile singularity` or have it enabled in your config file. +::: ### Downloaded nf-core configs The pipeline files are automatically updated (`params.custom_config_base` is set to `../configs`), so that the local copy of institutional configs are available when running the pipeline. So using `-profile ` should work if available within [nf-core/configs](https://github.com/nf-core/configs). -> ⚠️ This option is not available when downloading a pipeline for use with [Nextflow Tower](#adapting-downloads-to-nextflow-tower) because the application manages all configurations separately. +:::warning +This option is not available when downloading a pipeline for use with [Nextflow Tower](#adapting-downloads-to-nextflow-tower) because the application manages all configurations separately. +::: ### Downloading Apptainer containers @@ -408,14 +434,18 @@ If the download speeds are much slower than your internet connection is capable Subsequently, the `*.git` folder can be moved to it's final destination and linked with a pipeline in _Tower_ using the `file:/` prefix. -> 💡 Also without access to Tower, pipelines downloaded with the `--tower` flag can be run: `nextflow run -r 2.5 file:/path/to/pipelinedownload.git`. Downloads in this format allow you to include multiple revisions of a pipeline in a single file, but require that the revision (e.g. `-r 2.5`) is always explicitly specified. +:::tip +Also without access to Tower, pipelines downloaded with the `--tower` flag can be run: `nextflow run -r 2.5 file:/path/to/pipelinedownload.git`. Downloads in this format allow you to include multiple revisions of a pipeline in a single file, but require that the revision (e.g. `-r 2.5`) is always explicitly specified. +::: ## Pipeline software licences Sometimes it's useful to see the software licences of the tools used in a pipeline. You can use the `licences` subcommand to fetch and print the software licence from each conda / PyPI package used in an nf-core pipeline. -> ⚠️ This command does not currently work for newer DSL2 pipelines. This will hopefully be addressed [soon](https://github.com/nf-core/tools/issues/1155). +:::warning +This command does not currently work for newer DSL2 pipelines. This will hopefully be addressed [soon](https://github.com/nf-core/tools/issues/1155). +::: + +![`nf-core subworkflows lint bam_stats_samtools`](docs/images/nf-core-subworkflows-lint.svg) + ### Run the tests for a subworkflow using pytest To run unit tests of a subworkflow that you have installed or the test created by the command [`nf-core subworkflow create-test-yml`](#create-a-subworkflow-test-config-file), you can use `nf-core subworkflows test` command. This command runs the tests specified in `tests/subworkflows//test.yml` file using [pytest](https://pytest-workflow.readthedocs.io/en/stable/). -> This command uses the pytest argument `--git-aware` to avoid copying the whole `.git` directory and files ignored by `git`. This means that it will only include files listed by `git ls-files`. Remember to **commit your changes** after adding a new subworkflow to add the new files to your git index. +:::info +This command uses the pytest argument `--git-aware` to avoid copying the whole `.git` directory and files ignored by `git`. This means that it will only include files listed by `git ls-files`. Remember to **commit your changes** after adding a new subworkflow to add the new files to your git index. +::: You can specify the subworkflow name in the form TOOL/SUBTOOL in command line or provide it later by prompts. diff --git a/docs/api/_src/api/params-file.md b/docs/api/_src/api/params-file.md new file mode 100644 index 0000000000..c5bbfc0f1f --- /dev/null +++ b/docs/api/_src/api/params-file.md @@ -0,0 +1,9 @@ +# nf_core.params_file + +```{eval-rst} +.. automodule:: nf_core.params_file + :members: + :undoc-members: + :show-inheritance: + :private-members: +``` diff --git a/docs/api/_src/index.md b/docs/api/_src/index.md index de39e7244b..cb455986d7 100644 --- a/docs/api/_src/index.md +++ b/docs/api/_src/index.md @@ -8,6 +8,7 @@ pipeline_lint_tests/index.rst module_lint_tests/index.rst +subworkflow_lint_tests/index.rst api/index.rst ``` @@ -17,6 +18,7 @@ This documentation is for the `nf-core/tools` package. - [Pipeline code lint tests](pipeline_lint_tests/index.md) (run by `nf-core lint`) - [Module code lint tests](module_lint_tests/index.md) (run by `nf-core modules lint`) +- [Subworkflow code lint tests](subworkflow_lint_tests/index.md) (run by `nf-core subworkflows lint`) - [nf-core/tools Python package API reference](api/index.md) - {ref}`genindex` - {ref}`modindex` diff --git a/docs/api/_src/subworkflow_lint_tests/index.md b/docs/api/_src/subworkflow_lint_tests/index.md new file mode 100644 index 0000000000..6eed715c52 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/index.md @@ -0,0 +1,9 @@ +# Subworkflow lint tests + +```{toctree} +:caption: 'Tests:' +:glob: true +:maxdepth: 2 + +* +``` diff --git a/docs/api/_src/subworkflow_lint_tests/main_nf.md b/docs/api/_src/subworkflow_lint_tests/main_nf.md new file mode 100644 index 0000000000..ca0002fedc --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/main_nf.md @@ -0,0 +1,5 @@ +# main_nf + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.main_nf +``` diff --git a/docs/api/_src/subworkflow_lint_tests/meta_yml.md b/docs/api/_src/subworkflow_lint_tests/meta_yml.md new file mode 100644 index 0000000000..c25a3496a0 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/meta_yml.md @@ -0,0 +1,5 @@ +# meta_yml + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.meta_yml +``` diff --git a/docs/api/_src/subworkflow_lint_tests/subworkflow_changes.md b/docs/api/_src/subworkflow_lint_tests/subworkflow_changes.md new file mode 100644 index 0000000000..adb40dd4e4 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/subworkflow_changes.md @@ -0,0 +1,5 @@ +# subworkflow_changes + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.subworkflow_changes +``` diff --git a/docs/api/_src/subworkflow_lint_tests/subworkflow_tests.md b/docs/api/_src/subworkflow_lint_tests/subworkflow_tests.md new file mode 100644 index 0000000000..56be858b64 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/subworkflow_tests.md @@ -0,0 +1,5 @@ +# subworkflow_tests + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.subworkflow_tests +``` diff --git a/docs/api/_src/subworkflow_lint_tests/subworkflow_todos.md b/docs/api/_src/subworkflow_lint_tests/subworkflow_todos.md new file mode 100644 index 0000000000..30eab69d47 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/subworkflow_todos.md @@ -0,0 +1,5 @@ +# subworkflow_todos + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.subworkflow_todos +``` diff --git a/docs/api/_src/subworkflow_lint_tests/subworkflow_version.md b/docs/api/_src/subworkflow_lint_tests/subworkflow_version.md new file mode 100644 index 0000000000..b5ec7aace0 --- /dev/null +++ b/docs/api/_src/subworkflow_lint_tests/subworkflow_version.md @@ -0,0 +1,5 @@ +# subworkflow_version + +```{eval-rst} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.subworkflow_version +``` diff --git a/docs/api/make_lint_md.py b/docs/api/make_lint_md.py index 9b5a706473..35e38a55ca 100644 --- a/docs/api/make_lint_md.py +++ b/docs/api/make_lint_md.py @@ -5,6 +5,7 @@ import nf_core.lint import nf_core.modules.lint +import nf_core.subworkflows.lint def make_docs(docs_basedir, lint_tests, md_template): @@ -44,8 +45,8 @@ def make_docs(docs_basedir, lint_tests, md_template): make_docs( modules_docs_basedir, list( - set(nf_core.modules.lint.ModuleLint.get_all_lint_tests(is_pipeline=True)).union( - nf_core.modules.lint.ModuleLint.get_all_lint_tests(is_pipeline=False) + set(nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=True)).union( + nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=False) ) ), """# {0} @@ -55,3 +56,20 @@ def make_docs(docs_basedir, lint_tests, md_template): ``` """, ) + +# Create the subworkflows lint docs +subworkflows_docs_basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_src", "subworkflow_lint_tests") +make_docs( + subworkflows_docs_basedir, + list( + set(nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=True)).union( + nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=False) + ) + ), + """# {0} + +```{{eval-rst}} +.. automethod:: nf_core.subworkflows.lint.SubworkflowLint.{0} +``` +""", +) diff --git a/docs/images/nf-core-bump-version.svg b/docs/images/nf-core-bump-version.svg index c3efb89c16..a21fb69056 100644 --- a/docs/images/nf-core-bump-version.svg +++ b/docs/images/nf-core-bump-version.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + - + - - $ nf-core bump-version 1.1 - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     Changing version number from '1.0dev' to '1.1' -INFO     Updated version in 'nextflow.config' - - version         = '1.0dev' - + version = '1.1' - - -INFO     Updated version in 'assets/multiqc_config.yml' - - This report has been generated by the <a  -href="https://github.com/nf-core/nextbigthing/1.0dev" target="_blank">nf-core/nextbigthing</a> - + This report has been generated by the <a  -href="https://github.com/nf-core/nextbigthing/1.1" target="_blank">nf-core/nextbigthing</a> - - <a href="https://nf-co.re/nextbigthing/1.0dev/output"  -target="_blank">documentation</a>. - + <a href="https://nf-co.re/nextbigthing/1.1/output" target="_blank">documentation</a>. - - + + $ nf-core bump-version 1.1 + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     Changing version number from '1.0dev' to '1.1' +INFO     Updated version in 'nextflow.config' + - version         = '1.0dev' + + version = '1.1' + + +ERROR    Could not find version number in assets/multiqc_config.yml: '('1\\.0dev', '1.1')'           +INFO     Updated version in 'assets/multiqc_config.yml' + - This report has been generated by the <a  +href="https://github.com/nf-core/nextbigthing/releases/tag/dev"  +target="_blank">nf-core/nextbigthing</a> + + This report has been generated by the <a  +href="https://github.com/nf-core/nextbigthing/releases/tag/1.1"  +target="_blank">nf-core/nextbigthing</a> + - <a href="https://nf-co.re/nextbigthing/dev/docs/output"  +target="_blank">documentation</a>. + + <a href="https://nf-co.re/nextbigthing/1.1/docs/output"  +target="_blank">documentation</a>. + + diff --git a/docs/images/nf-core-create.svg b/docs/images/nf-core-create.svg index c0a7a6db85..15a043a7aa 100644 --- a/docs/images/nf-core-create.svg +++ b/docs/images/nf-core-create.svg @@ -19,104 +19,104 @@ font-weight: 700; } - .terminal-2004013614-matrix { + .terminal-1329910358-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2004013614-title { + .terminal-1329910358-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2004013614-r1 { fill: #c5c8c6 } -.terminal-2004013614-r2 { fill: #98a84b } -.terminal-2004013614-r3 { fill: #9a9b99 } -.terminal-2004013614-r4 { fill: #608ab1 } -.terminal-2004013614-r5 { fill: #d0b344 } -.terminal-2004013614-r6 { fill: #98729f } -.terminal-2004013614-r7 { fill: #ff2c7a } -.terminal-2004013614-r8 { fill: #98a84b;font-weight: bold } -.terminal-2004013614-r9 { fill: #1984e9;text-decoration: underline; } + .terminal-1329910358-r1 { fill: #c5c8c6 } +.terminal-1329910358-r2 { fill: #98a84b } +.terminal-1329910358-r3 { fill: #9a9b99 } +.terminal-1329910358-r4 { fill: #608ab1 } +.terminal-1329910358-r5 { fill: #d0b344 } +.terminal-1329910358-r6 { fill: #98729f } +.terminal-1329910358-r7 { fill: #ff2c7a } +.terminal-1329910358-r8 { fill: #98a84b;font-weight: bold } +.terminal-1329910358-r9 { fill: #1984e9;text-decoration: underline; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -128,34 +128,34 @@ - + - - $ nf-core create -n nextbigthing -d "This pipeline analyses data from the next big omics technique"  --a "Big Steve" --plain - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     Creating new nf-core pipeline: 'nf-core/nextbigthing' -INFO     Initialising pipeline git repository                                                        -INFO     Done. Remember to add a remote and push to GitHub:                                          - cd /home/runner/work/tools/tools/tmp/nf-core-nextbigthing - git remote add origin git@github.com:USERNAME/REPO_NAME.git  - git push --all origin                                        -INFO     This will also push your newly created dev branch and the TEMPLATE branch for syncing.      -INFO    !!!!!! IMPORTANT !!!!!! - -If you are interested in adding your pipeline to the nf-core community, -PLEASE COME AND TALK TO US IN THE NF-CORE SLACK BEFORE WRITING ANY CODE! - -Please read: https://nf-co.re/developers/adding_pipelines#join-the-community + + $ nf-core create -n nextbigthing -d "This pipeline analyses data from the next big omics technique"  +-a "Big Steve" --plain + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     Creating new nf-core pipeline: 'nf-core/nextbigthing' +INFO     Initialising pipeline git repository                                                        +INFO     Done. Remember to add a remote and push to GitHub:                                          + cd /home/runner/work/tools/tools/tmp/nf-core-nextbigthing + git remote add origin git@github.com:USERNAME/REPO_NAME.git  + git push --all origin                                        +INFO     This will also push your newly created dev branch and the TEMPLATE branch for syncing.      +INFO    !!!!!! IMPORTANT !!!!!! + +If you are interested in adding your pipeline to the nf-core community, +PLEASE COME AND TALK TO US IN THE NF-CORE SLACK BEFORE WRITING ANY CODE! + +Please read: https://nf-co.re/developers/adding_pipelines#join-the-community diff --git a/docs/images/nf-core-download.svg b/docs/images/nf-core-download.svg index 69b0b5b29b..d65d1e5571 100644 --- a/docs/images/nf-core-download.svg +++ b/docs/images/nf-core-download.svg @@ -19,82 +19,82 @@ font-weight: 700; } - .terminal-349809940-matrix { + .terminal-3379211580-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-349809940-title { + .terminal-3379211580-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-349809940-r1 { fill: #c5c8c6 } -.terminal-349809940-r2 { fill: #98a84b } -.terminal-349809940-r3 { fill: #9a9b99 } -.terminal-349809940-r4 { fill: #608ab1 } -.terminal-349809940-r5 { fill: #d0b344 } + .terminal-3379211580-r1 { fill: #c5c8c6 } +.terminal-3379211580-r2 { fill: #98a84b } +.terminal-3379211580-r3 { fill: #9a9b99 } +.terminal-3379211580-r4 { fill: #608ab1 } +.terminal-3379211580-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -106,28 +106,28 @@ - + - - $ nf-core download rnaseq -r 3.8 --outdir nf-core-rnaseq -x none -s none -d - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     Saving 'nf-core/rnaseq' -          Pipeline revision: '3.8' -          Use containers: 'none' -          Container library: 'quay.io' -          Output directory: 'nf-core-rnaseq' -          Include default institutional configuration: 'True' -INFO     Downloading centralised configs from GitHub                                                 -INFO     Downloading workflow files from GitHub                                                      + + $ nf-core download rnaseq -r 3.8 --outdir nf-core-rnaseq -x none -s none -d + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     Saving 'nf-core/rnaseq' +          Pipeline revision: '3.8' +          Use containers: 'none' +          Container library: 'quay.io' +          Output directory: 'nf-core-rnaseq' +          Include default institutional configuration: 'True' +INFO     Downloading centralised configs from GitHub                                                 +INFO     Downloading workflow files from GitHub                                                      diff --git a/docs/images/nf-core-launch-rnaseq.svg b/docs/images/nf-core-launch-rnaseq.svg index 8505f47e74..05bb424160 100644 --- a/docs/images/nf-core-launch-rnaseq.svg +++ b/docs/images/nf-core-launch-rnaseq.svg @@ -19,72 +19,72 @@ font-weight: 700; } - .terminal-1328852393-matrix { + .terminal-1709682129-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1328852393-title { + .terminal-1709682129-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1328852393-r1 { fill: #c5c8c6 } -.terminal-1328852393-r2 { fill: #98a84b } -.terminal-1328852393-r3 { fill: #9a9b99 } -.terminal-1328852393-r4 { fill: #608ab1 } -.terminal-1328852393-r5 { fill: #d0b344 } -.terminal-1328852393-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-1328852393-r7 { fill: #68a0b3;font-weight: bold } + .terminal-1709682129-r1 { fill: #c5c8c6 } +.terminal-1709682129-r2 { fill: #98a84b } +.terminal-1709682129-r3 { fill: #9a9b99 } +.terminal-1709682129-r4 { fill: #608ab1 } +.terminal-1709682129-r5 { fill: #d0b344 } +.terminal-1709682129-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-1709682129-r7 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -96,24 +96,24 @@ - + - - $ nf-core launch rnaseq -r 3.8.1 - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     NOTE: This tool ignores any pipeline parameter defaults overwritten by Nextflow config      -         files or profiles                                                                           - -INFO     Downloading workflow: nf-core/rnaseq (3.8.1) + + $ nf-core launch rnaseq -r 3.8.1 + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     NOTE: This tool ignores any pipeline parameter defaults overwritten by Nextflow config      +         files or profiles                                                                           + +INFO     Downloading workflow: nf-core/rnaseq (3.8.1) diff --git a/docs/images/nf-core-licences.svg b/docs/images/nf-core-licences.svg index 9a72e4beda..ee99ec8128 100644 --- a/docs/images/nf-core-licences.svg +++ b/docs/images/nf-core-licences.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - $ nf-core licences deepvariant - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     Fetching licence information for 8 tools                                                    -INFO     Warning: This tool only prints licence information for the software tools packaged using    -         conda.                                                                                      -INFO     The pipeline may use other software and dependencies not described here.                    -┏━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ -Package NameVersionLicence -┡━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩ -│ lbzip2       │ 2.5     │ GPL v3  │ -│ deepvariant  │ 0.7.0   │ MIT     │ -│ htslib       │ 1.9     │ MIT     │ -│ picard       │ 2.18.7  │ MIT     │ -│ pip          │ 10.0.1  │ MIT     │ -│ samtools     │ 1.9     │ MIT     │ -│ python       │ 2.7.15  │ PSF     │ -│ bzip2        │ 1.0.6   │ bzip2   │ -└──────────────┴─────────┴─────────┘ + + $ nf-core licences deepvariant + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     Fetching licence information for 8 tools                                                    diff --git a/docs/images/nf-core-lint.svg b/docs/images/nf-core-lint.svg index 268989f7eb..a10c597a23 100644 --- a/docs/images/nf-core-lint.svg +++ b/docs/images/nf-core-lint.svg @@ -19,164 +19,164 @@ font-weight: 700; } - .terminal-3323121222-matrix { + .terminal-13160208-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3323121222-title { + .terminal-13160208-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3323121222-r1 { fill: #c5c8c6 } -.terminal-3323121222-r2 { fill: #98a84b } -.terminal-3323121222-r3 { fill: #9a9b99 } -.terminal-3323121222-r4 { fill: #608ab1 } -.terminal-3323121222-r5 { fill: #d0b344 } -.terminal-3323121222-r6 { fill: #98729f } -.terminal-3323121222-r7 { fill: #c5c8c6;font-weight: bold } -.terminal-3323121222-r8 { fill: #1984e9 } -.terminal-3323121222-r9 { fill: #d0b344;font-weight: bold } -.terminal-3323121222-r10 { fill: #fdfdc5 } -.terminal-3323121222-r11 { fill: #8d7b39 } -.terminal-3323121222-r12 { fill: #cc555a } + .terminal-13160208-r1 { fill: #c5c8c6 } +.terminal-13160208-r2 { fill: #98a84b } +.terminal-13160208-r3 { fill: #9a9b99 } +.terminal-13160208-r4 { fill: #608ab1 } +.terminal-13160208-r5 { fill: #d0b344 } +.terminal-13160208-r6 { fill: #98729f } +.terminal-13160208-r7 { fill: #c5c8c6;font-weight: bold } +.terminal-13160208-r8 { fill: #1984e9 } +.terminal-13160208-r9 { fill: #d0b344;font-weight: bold } +.terminal-13160208-r10 { fill: #fdfdc5 } +.terminal-13160208-r11 { fill: #8d7b39 } +.terminal-13160208-r12 { fill: #cc555a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -188,53 +188,53 @@ - + - - $ nf-core lint - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Testing pipeline: . - - -╭─[?] 1 Pipeline Test Ignored────────────────────────────────────────────────────────────────────╮ - -pipeline_todos: pipeline_todos - -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─[!] 1 Pipeline Test Warning────────────────────────────────────────────────────────────────────╮ - -readme: README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo  -doi (after the first release). - -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ - -╭─[!] 3 Module Test Warnings─────────────────────────────────────────────────────────────────────╮ -                                           ╷                          ╷                            -Module name                              File path               Test message              -╶──────────────────────────────────────────┼──────────────────────────┼──────────────────────────╴ -custom/dumpsoftwareversionsmodules/nf-core/custom/…New version available -fastqcmodules/nf-core/fastqc  New version available -multiqcmodules/nf-core/multiqc New version available -                                           ╵                          ╵                            -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭───────────────────────╮ -LINT RESULTS SUMMARY  -├───────────────────────┤ -[✔] 181 Tests Passed -[?]   1 Test Ignored -[!]   4 Test Warnings -[✗]   0 Tests Failed -╰───────────────────────╯ + + $ nf-core lint + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Testing pipeline: . + + +╭─[?] 1 Pipeline Test Ignored────────────────────────────────────────────────────────────────────╮ + +pipeline_todos: pipeline_todos + +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─[!] 1 Pipeline Test Warning────────────────────────────────────────────────────────────────────╮ + +readme: README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo  +doi (after the first release). + +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ + +╭─[!] 3 Module Test Warnings─────────────────────────────────────────────────────────────────────╮ +                                           ╷                          ╷                            +Module name                              File path               Test message              +╶──────────────────────────────────────────┼──────────────────────────┼──────────────────────────╴ +custom/dumpsoftwareversionsmodules/nf-core/custom/…New version available +fastqcmodules/nf-core/fastqc  New version available +multiqcmodules/nf-core/multiqc New version available +                                           ╵                          ╵                            +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭───────────────────────╮ +LINT RESULTS SUMMARY  +├───────────────────────┤ +[✔] 183 Tests Passed +[?]   1 Test Ignored +[!]   4 Test Warnings +[✗]   0 Tests Failed +╰───────────────────────╯ diff --git a/docs/images/nf-core-list-rna.svg b/docs/images/nf-core-list-rna.svg index 414e75d9ba..ea5cbae618 100644 --- a/docs/images/nf-core-list-rna.svg +++ b/docs/images/nf-core-list-rna.svg @@ -19,108 +19,108 @@ font-weight: 700; } - .terminal-3977479750-matrix { + .terminal-2550158961-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3977479750-title { + .terminal-2550158961-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3977479750-r1 { fill: #c5c8c6 } -.terminal-3977479750-r2 { fill: #98a84b } -.terminal-3977479750-r3 { fill: #9a9b99 } -.terminal-3977479750-r4 { fill: #608ab1 } -.terminal-3977479750-r5 { fill: #d0b344 } -.terminal-3977479750-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-3977479750-r7 { fill: #868887 } + .terminal-2550158961-r1 { fill: #c5c8c6 } +.terminal-2550158961-r2 { fill: #98a84b } +.terminal-2550158961-r3 { fill: #9a9b99 } +.terminal-2550158961-r4 { fill: #608ab1 } +.terminal-2550158961-r5 { fill: #d0b344 } +.terminal-2550158961-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-2550158961-r7 { fill: #868887 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -132,36 +132,36 @@ - + - - $ nf-core list rna rna-seq - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ -Have latest         -Pipeline Name       StarsLatest Release    ReleasedLast Pulledrelease?            -┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ -│ marsseq              │     3 │          1.0.1 │   4 days ago │           - │ -                   │ -│ scrnaseq             │    87 │          2.3.2 │  3 weeks ago │           - │ -                   │ -│ rnaseq               │   636 │         3.12.0 │  4 weeks ago │           - │ -                   │ -│ smrnaseq             │    50 │          2.2.1 │ 2 months ago │           - │ -                   │ -│ rnafusion            │   105 │          2.3.4 │ 2 months ago │           - │ -                   │ -│ differentialabundan… │    22 │          1.2.0 │ 2 months ago │           - │ -                   │ -│ dualrnaseq           │    13 │          1.0.0 │  2 years ago │           - │ -                   │ -│ circrna              │    27 │            dev │            - │           - │ -                   │ -│ lncpipe              │    25 │            dev │            - │           - │ -                   │ -│ scflow               │    19 │            dev │            - │           - │ -                   │ -│ spatialtranscriptom… │    24 │            dev │            - │           - │ -                   │ -└──────────────────────┴───────┴────────────────┴──────────────┴─────────────┴─────────────────────┘ + + $ nf-core list rna rna-seq + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ +Have latest         +Pipeline Name       StarsLatest Release    ReleasedLast Pulledrelease?            +┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ +│ scrnaseq             │    99 │            dev │   3 days ago │           - │ -                   │ +│ rnafusion            │   112 │            dev │   3 days ago │           - │ -                   │ +│ differentialabundan… │    26 │            dev │  2 weeks ago │           - │ -                   │ +│ dualrnaseq           │    13 │            dev │  2 weeks ago │           - │ -                   │ +│ smrnaseq             │    54 │            dev │  3 weeks ago │           - │ -                   │ +│ rnaseq               │   665 │            dev │ 1 months ago │           - │ -                   │ +│ marsseq              │     4 │            dev │ 2 months ago │           - │ -                   │ +│ spatialtranscriptom… │    27 │            dev │ 3 months ago │           - │ -                   │ +│ circrna              │    31 │            dev │ 8 months ago │           - │ -                   │ +│ lncpipe              │    26 │            dev │  1 years ago │           - │ -                   │ +│ scflow               │    20 │            dev │  2 years ago │           - │ -                   │ +└──────────────────────┴───────┴────────────────┴──────────────┴─────────────┴─────────────────────┘ diff --git a/docs/images/nf-core-list-stars.svg b/docs/images/nf-core-list-stars.svg index 06349aa3a1..067a8bc3b6 100644 --- a/docs/images/nf-core-list-stars.svg +++ b/docs/images/nf-core-list-stars.svg @@ -19,88 +19,88 @@ font-weight: 700; } - .terminal-960691040-matrix { + .terminal-2093940179-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-960691040-title { + .terminal-2093940179-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-960691040-r1 { fill: #c5c8c6 } -.terminal-960691040-r2 { fill: #98a84b } -.terminal-960691040-r3 { fill: #9a9b99 } -.terminal-960691040-r4 { fill: #608ab1 } -.terminal-960691040-r5 { fill: #d0b344 } -.terminal-960691040-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-960691040-r7 { fill: #868887 } -.terminal-960691040-r8 { fill: #868887;font-style: italic; } + .terminal-2093940179-r1 { fill: #c5c8c6 } +.terminal-2093940179-r2 { fill: #98a84b } +.terminal-2093940179-r3 { fill: #9a9b99 } +.terminal-2093940179-r4 { fill: #608ab1 } +.terminal-2093940179-r5 { fill: #d0b344 } +.terminal-2093940179-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-2093940179-r7 { fill: #868887 } +.terminal-2093940179-r8 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -112,29 +112,29 @@ - + - - $ nf-core list -s stars - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ -Have latest         -Pipeline Name       StarsLatest Release    ReleasedLast Pulledrelease?            -┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ -│ rnaseq               │   636 │         3.12.0 │  4 weeks ago │           - │ -                   │ -│ sarek                │   252 │          3.2.3 │   1 week ago │           - │ -                   │ -│ chipseq              │   148 │          2.0.0 │ 9 months ago │           - │ -                   │ -│ atacseq              │   141 │            2.0 │ 7 months ago │           - │ -                   │ -[..truncated..] + + $ nf-core list -s stars + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ +Have latest         +Pipeline Name      StarsLatest Release     ReleasedLast Pulledrelease?            +┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ +│ rnaseq              │   665 │            dev │  1 months ago │           - │ -                   │ +│ sarek               │   273 │            dev │    6 days ago │           - │ -                   │ +│ chipseq             │   153 │            dev │  2 months ago │           - │ -                   │ +│ atacseq             │   147 │            dev │   3 weeks ago │           - │ -                   │ +[..truncated..] diff --git a/docs/images/nf-core-list.svg b/docs/images/nf-core-list.svg index 92324289f4..7980f060fb 100644 --- a/docs/images/nf-core-list.svg +++ b/docs/images/nf-core-list.svg @@ -19,91 +19,91 @@ font-weight: 700; } - .terminal-4201938007-matrix { + .terminal-3744497940-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4201938007-title { + .terminal-3744497940-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4201938007-r1 { fill: #c5c8c6 } -.terminal-4201938007-r2 { fill: #98a84b } -.terminal-4201938007-r3 { fill: #9a9b99 } -.terminal-4201938007-r4 { fill: #608ab1 } -.terminal-4201938007-r5 { fill: #d0b344 } -.terminal-4201938007-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-4201938007-r7 { fill: #868887 } -.terminal-4201938007-r8 { fill: #868887;font-style: italic; } + .terminal-3744497940-r1 { fill: #c5c8c6 } +.terminal-3744497940-r2 { fill: #98a84b } +.terminal-3744497940-r3 { fill: #9a9b99 } +.terminal-3744497940-r4 { fill: #608ab1 } +.terminal-3744497940-r5 { fill: #d0b344 } +.terminal-3744497940-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-3744497940-r7 { fill: #868887 } +.terminal-3744497940-r8 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -115,30 +115,30 @@ - + - - $ nf-core list - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ -Have latest         -Pipeline Name       StarsLatest Release    ReleasedLast Pulledrelease?            -┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ -│ funcscan             │    35 │          1.1.2 │  5 hours ago │           - │ -                   │ -│ ampliseq             │   118 │          2.6.1 │   2 days ago │           - │ -                   │ -│ circdna              │    16 │          1.0.4 │   3 days ago │           - │ -                   │ -│ marsseq              │     3 │          1.0.1 │   4 days ago │           - │ -                   │ -│ nanostring           │     4 │          1.1.1 │   6 days ago │           - │ -                   │ -[..truncated..] + + $ nf-core list + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ +Have latest         +Pipeline Name      StarsLatest Release     ReleasedLast Pulledrelease?            +┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ +│ bacass              │    45 │            dev │     yesterday │           - │ -                   │ +│ fetchngs            │    86 │            dev │    2 days ago │           - │ -                   │ +│ scrnaseq            │    99 │            dev │    3 days ago │           - │ -                   │ +│ rnafusion           │   112 │            dev │    3 days ago │           - │ -                   │ +│ metatdenovo         │     3 │            dev │    3 days ago │           - │ -                   │ +[..truncated..] diff --git a/docs/images/nf-core-modules-bump-version.svg b/docs/images/nf-core-modules-bump-version.svg index 3bafb91264..ec8c80dea8 100644 --- a/docs/images/nf-core-modules-bump-version.svg +++ b/docs/images/nf-core-modules-bump-version.svg @@ -19,90 +19,90 @@ font-weight: 700; } - .terminal-1316878266-matrix { + .terminal-4248893410-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1316878266-title { + .terminal-4248893410-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1316878266-r1 { fill: #c5c8c6 } -.terminal-1316878266-r2 { fill: #98a84b } -.terminal-1316878266-r3 { fill: #9a9b99 } -.terminal-1316878266-r4 { fill: #608ab1 } -.terminal-1316878266-r5 { fill: #d0b344 } -.terminal-1316878266-r6 { fill: #98a84b;font-weight: bold } -.terminal-1316878266-r7 { fill: #c5c8c6;font-weight: bold } + .terminal-4248893410-r1 { fill: #c5c8c6 } +.terminal-4248893410-r2 { fill: #98a84b } +.terminal-4248893410-r3 { fill: #9a9b99 } +.terminal-4248893410-r4 { fill: #608ab1 } +.terminal-4248893410-r5 { fill: #d0b344 } +.terminal-4248893410-r6 { fill: #98a84b;font-weight: bold } +.terminal-4248893410-r7 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -114,30 +114,30 @@ - + - - $ nf-core modules bump-versions fastqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - - -╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -[!] 1 Module version up to date. -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭──────────────────────────────────────────┬───────────────────────────────────────────────────────╮ -Module name                             Update Message                                        -├──────────────────────────────────────────┼───────────────────────────────────────────────────────┤ - fastqc                                    Module version up to date: fastqc                      -╰──────────────────────────────────────────┴───────────────────────────────────────────────────────╯ + + $ nf-core modules bump-versions fastqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + + +╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +[!] 1 Module version up to date. +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────┬───────────────────────────────────────────────────────╮ +Module name                             Update Message                                        +├──────────────────────────────────────────┼───────────────────────────────────────────────────────┤ + fastqc                                    Module version up to date: fastqc                      +╰──────────────────────────────────────────┴───────────────────────────────────────────────────────╯ diff --git a/docs/images/nf-core-modules-create-test.svg b/docs/images/nf-core-modules-create-test.svg index 9af81b95f8..c171509599 100644 --- a/docs/images/nf-core-modules-create-test.svg +++ b/docs/images/nf-core-modules-create-test.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ nf-core modules create-test-yml fastqc --no-prompts --force - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Looking for test workflow entry points: 'tests/modules/nf-core/fastqc/main.nf' -──────────────────────────────────────────────────────────────────────────────────────────────────── -INFO     Building test meta for entry point 'test_fastqc' -INFO     Running 'fastqc' test with command:                                                         -nextflow run ./tests/modules/nf-core/fastqc -entry test_fastqc -c  -./tests/config/nextflow.config -c ./tests/modules/nf-core/fastqc/nextflow.config --outdir  -/tmp/tmpe8nlzgcc -work-dir /tmp/tmputkzu3j5 + + $ nf-core modules create-test-yml fastqc --no-prompts --force + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Looking for test workflow entry points: 'tests/modules/nf-core/fastqc/main.nf' +──────────────────────────────────────────────────────────────────────────────────────────────────── +INFO     Building test meta for entry point 'test_fastqc' +INFO     Running 'fastqc' test with command:                                                         +nextflow run ./tests/modules/nf-core/fastqc -entry test_fastqc -c  +./tests/config/nextflow.config --outdir /tmp/tmpnrlvr32x -work-dir /tmp/tmpyu2of3fe diff --git a/docs/images/nf-core-modules-create.svg b/docs/images/nf-core-modules-create.svg index 70a03b29a7..1114ebffb6 100644 --- a/docs/images/nf-core-modules-create.svg +++ b/docs/images/nf-core-modules-create.svg @@ -19,106 +19,106 @@ font-weight: 700; } - .terminal-4203304860-matrix { + .terminal-2353616836-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4203304860-title { + .terminal-2353616836-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4203304860-r1 { fill: #c5c8c6 } -.terminal-4203304860-r2 { fill: #98a84b } -.terminal-4203304860-r3 { fill: #9a9b99 } -.terminal-4203304860-r4 { fill: #608ab1 } -.terminal-4203304860-r5 { fill: #d0b344 } -.terminal-4203304860-r6 { fill: #68a0b3;font-weight: bold } -.terminal-4203304860-r7 { fill: #98729f } -.terminal-4203304860-r8 { fill: #ff2c7a } + .terminal-2353616836-r1 { fill: #c5c8c6 } +.terminal-2353616836-r2 { fill: #98a84b } +.terminal-2353616836-r3 { fill: #9a9b99 } +.terminal-2353616836-r4 { fill: #608ab1 } +.terminal-2353616836-r5 { fill: #d0b344 } +.terminal-2353616836-r6 { fill: #68a0b3;font-weight: bold } +.terminal-2353616836-r7 { fill: #98729f } +.terminal-2353616836-r8 { fill: #ff2c7a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -130,35 +130,35 @@ - + - - $ nf-core modules create fastqc --author @nf-core-bot  --label process_low --meta --force - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Repository type: modules -INFO    Press enter to use default values (shown in brackets)or type your own responses.  -ctrl+click underlined text to open links. -INFO     Using Bioconda package: 'bioconda::fastqc=0.12.1' -INFO     Using Docker container: 'biocontainers/fastqc:0.12.1--hdfd78af_0' -INFO     Using Singularity container:                                                                -'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' -INFO     Created / edited following files:                                                           -           ./modules/nf-core/fastqc/main.nf -           ./modules/nf-core/fastqc/meta.yml -           ./tests/modules/nf-core/fastqc/main.nf -           ./tests/modules/nf-core/fastqc/test.yml -           ./tests/modules/nf-core/fastqc/nextflow.config -           ./tests/config/pytest_modules.yml + + $ nf-core modules create fastqc --author @nf-core-bot  --label process_low --meta --force + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Repository type: modules +INFO    Press enter to use default values (shown in brackets)or type your own responses.  +ctrl+click underlined text to open links. +INFO     Using Bioconda package: 'bioconda::fastqc=0.12.1' +INFO     Using Docker container: 'biocontainers/fastqc:0.12.1--hdfd78af_0' +INFO     Using Singularity container:                                                                +'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' +INFO     Created / edited following files:                                                           +           ./modules/nf-core/fastqc/main.nf +           ./modules/nf-core/fastqc/meta.yml +           ./tests/modules/nf-core/fastqc/main.nf +           ./tests/modules/nf-core/fastqc/test.yml +           ./tests/modules/nf-core/fastqc/nextflow.config +           ./tests/config/pytest_modules.yml diff --git a/docs/images/nf-core-modules-info.svg b/docs/images/nf-core-modules-info.svg index 3a65ab2733..0649779367 100644 --- a/docs/images/nf-core-modules-info.svg +++ b/docs/images/nf-core-modules-info.svg @@ -19,163 +19,163 @@ font-weight: 700; } - .terminal-1537339898-matrix { + .terminal-585364002-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1537339898-title { + .terminal-585364002-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1537339898-r1 { fill: #c5c8c6 } -.terminal-1537339898-r2 { fill: #98a84b } -.terminal-1537339898-r3 { fill: #9a9b99 } -.terminal-1537339898-r4 { fill: #608ab1 } -.terminal-1537339898-r5 { fill: #d0b344 } -.terminal-1537339898-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-1537339898-r7 { fill: #98a84b;font-weight: bold } -.terminal-1537339898-r8 { fill: #868887 } -.terminal-1537339898-r9 { fill: #d08442 } -.terminal-1537339898-r10 { fill: #868887;font-style: italic; } -.terminal-1537339898-r11 { fill: #98729f } + .terminal-585364002-r1 { fill: #c5c8c6 } +.terminal-585364002-r2 { fill: #98a84b } +.terminal-585364002-r3 { fill: #9a9b99 } +.terminal-585364002-r4 { fill: #608ab1 } +.terminal-585364002-r5 { fill: #d0b344 } +.terminal-585364002-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-585364002-r7 { fill: #98a84b;font-weight: bold } +.terminal-585364002-r8 { fill: #868887 } +.terminal-585364002-r9 { fill: #d08442 } +.terminal-585364002-r10 { fill: #868887;font-style: italic; } +.terminal-585364002-r11 { fill: #98729f } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -187,53 +187,53 @@ - + - - $ nf-core modules info abacas - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -╭─ Module: abacas  ────────────────────────────────────────────────────────────────────────────────╮ -│ 🌐 Repository: https://github.com/nf-core/modules.git                                            │ -│ 🔧 Tools: abacas                                                                                 │ -│ 📖 Description: contiguate draft genome assembly                                                 │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ -                  ╷                                                                   ╷              -📥 Inputs        Description                                                             Pattern -╺━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━╸ - meta  (map)     │Groovy Map containing sample information e.g. [ id:'test',         │ -                  │single_end:false ]                                                 │ -╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ - scaffold  (file)│Fasta file containing scaffold                                     │*.{fasta,fa} -╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ - fasta  (file)   │FASTA reference file                                               │*.{fasta,fa} -                  ╵                                                                   ╵              -                  ╷                                                                   ╷              -📤 Outputs       Description                                                             Pattern -╺━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━╸ - meta  (map)     │Groovy Map containing sample information e.g. [ id:'test',         │ -                  │single_end:false ]                                                 │ -╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ - results  (files)│List containing abacas output files [ 'test.abacas.bin',           │ *.{abacas}* -                  │'test.abacas.fasta', 'test.abacas.gaps', 'test.abacas.gaps.tab',   │ -                  │'test.abacas.nucmer.delta', 'test.abacas.nucmer.filtered.delta',   │ -                  │'test.abacas.nucmer.tiling', 'test.abacas.tab',                    │ -                  │'test.abacas.unused.contigs.out', 'test.abacas.MULTIFASTA.fa' ]    │ -╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ - versions  (file)│File containing software versions                                  │versions.yml -                  ╵                                                                   ╵              - - 💻  Installation command: nf-core modules install abacas - + + $ nf-core modules info abacas + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +╭─ Module: abacas  ────────────────────────────────────────────────────────────────────────────────╮ +│ 🌐 Repository: https://github.com/nf-core/modules.git                                            │ +│ 🔧 Tools: abacas                                                                                 │ +│ 📖 Description: contiguate draft genome assembly                                                 │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +                  ╷                                                                   ╷              +📥 Inputs        Description                                                             Pattern +╺━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━╸ + meta  (map)     │Groovy Map containing sample information e.g. [ id:'test',         │ +                  │single_end:false ]                                                 │ +╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ + scaffold  (file)│Fasta file containing scaffold                                     │*.{fasta,fa} +╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ + fasta  (file)   │FASTA reference file                                               │*.{fasta,fa} +                  ╵                                                                   ╵              +                  ╷                                                                   ╷              +📤 Outputs       Description                                                             Pattern +╺━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━╸ + meta  (map)     │Groovy Map containing sample information e.g. [ id:'test',         │ +                  │single_end:false ]                                                 │ +╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ + results  (files)│List containing abacas output files [ 'test.abacas.bin',           │ *.{abacas}* +                  │'test.abacas.fasta', 'test.abacas.gaps', 'test.abacas.gaps.tab',   │ +                  │'test.abacas.nucmer.delta', 'test.abacas.nucmer.filtered.delta',   │ +                  │'test.abacas.nucmer.tiling', 'test.abacas.tab',                    │ +                  │'test.abacas.unused.contigs.out', 'test.abacas.MULTIFASTA.fa' ]    │ +╶─────────────────┼───────────────────────────────────────────────────────────────────┼────────────╴ + versions  (file)│File containing software versions                                  │versions.yml +                  ╵                                                                   ╵              + + 💻  Installation command: nf-core modules install abacas + diff --git a/docs/images/nf-core-modules-install.svg b/docs/images/nf-core-modules-install.svg index 9385dba62f..3e53a93b38 100644 --- a/docs/images/nf-core-modules-install.svg +++ b/docs/images/nf-core-modules-install.svg @@ -19,76 +19,76 @@ font-weight: 700; } - .terminal-2221378565-matrix { + .terminal-2562821165-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2221378565-title { + .terminal-2562821165-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2221378565-r1 { fill: #c5c8c6 } -.terminal-2221378565-r2 { fill: #98a84b } -.terminal-2221378565-r3 { fill: #9a9b99 } -.terminal-2221378565-r4 { fill: #608ab1 } -.terminal-2221378565-r5 { fill: #d0b344 } + .terminal-2562821165-r1 { fill: #c5c8c6 } +.terminal-2562821165-r2 { fill: #98a84b } +.terminal-2562821165-r3 { fill: #9a9b99 } +.terminal-2562821165-r4 { fill: #608ab1 } +.terminal-2562821165-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -100,26 +100,26 @@ - + - - $ nf-core modules install abacas - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Installing 'abacas' -INFO     Use the following statement to include this module:                                         - - include { ABACAS } from '../modules/nf-core/abacas/main'                                            - + + $ nf-core modules install abacas + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Installing 'abacas' +INFO     Use the following statement to include this module:                                         + + include { ABACAS } from '../modules/nf-core/abacas/main'                                            + diff --git a/docs/images/nf-core-modules-lint.svg b/docs/images/nf-core-modules-lint.svg index 08d62c2f3c..a7f87b39c9 100644 --- a/docs/images/nf-core-modules-lint.svg +++ b/docs/images/nf-core-modules-lint.svg @@ -19,67 +19,67 @@ font-weight: 700; } - .terminal-1850825410-matrix { + .terminal-1450662634-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1850825410-title { + .terminal-1450662634-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1850825410-r1 { fill: #c5c8c6 } -.terminal-1850825410-r2 { fill: #98a84b } -.terminal-1850825410-r3 { fill: #9a9b99 } -.terminal-1850825410-r4 { fill: #608ab1 } -.terminal-1850825410-r5 { fill: #d0b344 } + .terminal-1450662634-r1 { fill: #c5c8c6 } +.terminal-1450662634-r2 { fill: #98a84b } +.terminal-1450662634-r3 { fill: #9a9b99 } +.terminal-1450662634-r4 { fill: #608ab1 } +.terminal-1450662634-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -91,23 +91,23 @@ - + - - $ nf-core modules lint multiqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Linting modules repo: '.' -INFO     Linting module: 'multiqc' + + $ nf-core modules lint multiqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Linting modules repo: '.' +INFO     Linting module: 'multiqc' diff --git a/docs/images/nf-core-modules-list-local.svg b/docs/images/nf-core-modules-list-local.svg index cff9db10e3..a8b366dddf 100644 --- a/docs/images/nf-core-modules-list-local.svg +++ b/docs/images/nf-core-modules-list-local.svg @@ -19,108 +19,108 @@ font-weight: 700; } - .terminal-136384798-matrix { + .terminal-1258228559-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-136384798-title { + .terminal-1258228559-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-136384798-r1 { fill: #c5c8c6 } -.terminal-136384798-r2 { fill: #98a84b } -.terminal-136384798-r3 { fill: #9a9b99 } -.terminal-136384798-r4 { fill: #608ab1 } -.terminal-136384798-r5 { fill: #d0b344 } -.terminal-136384798-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-136384798-r7 { fill: #868887;font-style: italic; } + .terminal-1258228559-r1 { fill: #c5c8c6 } +.terminal-1258228559-r2 { fill: #98a84b } +.terminal-1258228559-r3 { fill: #9a9b99 } +.terminal-1258228559-r4 { fill: #608ab1 } +.terminal-1258228559-r5 { fill: #d0b344 } +.terminal-1258228559-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-1258228559-r7 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -132,36 +132,36 @@ - + - - $ nf-core modules list local - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Modules installed in '.':                                                                   - -┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ -Module Name        Repository        Version SHA        Message           Date       -┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ -│ custom/dumpsoftwar… │ https://github.co… │ 76cc4938c1f6ea5c7d… │ give execution     │ 2023-04-28 │ -│                     │                    │                     │ permissions to     │            │ -│                     │                    │                     │ dumpsoftwareversi… │            │ -│                     │                    │                     │ (#3347)            │            │ -│ fastqc              │ https://github.co… │ c8e35eb2055c099720… │ Bulk change conda  │ 2022-12-13 │ -│                     │                    │                     │ syntax for all     │            │ -│                     │                    │                     │ modules (#2654)    │            │ -│ multiqc             │ https://github.co… │ f2d63bd5b68925f98f… │ fix meta.ymls for  │ 2023-04-28 │ -│                     │                    │                     │ dumpsoftware and   │            │ -[..truncated..] + + $ nf-core modules list local + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Modules installed in '.':                                                                   + +┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓ +Module Name        Repository        Version SHA        Message           Date       +┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩ +│ custom/dumpsoftwar… │ https://github.co… │ 911696ea0b62df80e9… │ Remove quay from   │ 2023-05-04 │ +│                     │                    │                     │ biocontainers      │            │ +│                     │                    │                     │ (#3380)            │            │ +│ fastqc              │ https://github.co… │ bd8092b67b5103bdd5… │ Add                │ 2023-07-01 │ +│                     │                    │                     │ singularity.regis… │            │ +│                     │                    │                     │ = 'quay.io' for    │            │ +│                     │                    │                     │ tests (#3499)      │            │ +│ multiqc             │ https://github.co… │ 911696ea0b62df80e9… │ Remove quay from   │ 2023-05-04 │ +│                     │                    │                     │ biocontainers      │            │ +[..truncated..] diff --git a/docs/images/nf-core-modules-list-remote.svg b/docs/images/nf-core-modules-list-remote.svg index 1896cb078b..8156a97f4c 100644 --- a/docs/images/nf-core-modules-list-remote.svg +++ b/docs/images/nf-core-modules-list-remote.svg @@ -19,109 +19,109 @@ font-weight: 700; } - .terminal-3884145572-matrix { + .terminal-2763676620-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3884145572-title { + .terminal-2763676620-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3884145572-r1 { fill: #c5c8c6 } -.terminal-3884145572-r2 { fill: #98a84b } -.terminal-3884145572-r3 { fill: #9a9b99 } -.terminal-3884145572-r4 { fill: #608ab1 } -.terminal-3884145572-r5 { fill: #d0b344 } -.terminal-3884145572-r6 { fill: #1984e9;text-decoration: underline; } -.terminal-3884145572-r7 { fill: #c5c8c6;font-weight: bold } -.terminal-3884145572-r8 { fill: #868887;font-style: italic; } + .terminal-2763676620-r1 { fill: #c5c8c6 } +.terminal-2763676620-r2 { fill: #98a84b } +.terminal-2763676620-r3 { fill: #9a9b99 } +.terminal-2763676620-r4 { fill: #608ab1 } +.terminal-2763676620-r5 { fill: #d0b344 } +.terminal-2763676620-r6 { fill: #1984e9;text-decoration: underline; } +.terminal-2763676620-r7 { fill: #c5c8c6;font-weight: bold } +.terminal-2763676620-r8 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -133,36 +133,36 @@ - + - - $ nf-core modules list remote - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Modules available from https://github.com/nf-core/modules.git(master):                     - -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -Module Name                                           -┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ -│ abacas                                                │ -│ abricate/run                                          │ -│ abricate/summary                                      │ -│ adapterremoval                                        │ -│ adapterremovalfixprefix                               │ -│ admixture                                             │ -│ affy/justrma                                          │ -│ agat/convertspgff2gtf                                 │ -│ agat/convertspgxf2gxf                                 │ -[..truncated..] + + $ nf-core modules list remote + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Modules available from https://github.com/nf-core/modules.git(master):                     + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +Module Name                                           +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ abacas                                                │ +│ abricate/run                                          │ +│ abricate/summary                                      │ +│ adapterremoval                                        │ +│ adapterremovalfixprefix                               │ +│ admixture                                             │ +│ affy/justrma                                          │ +│ agat/convertspgff2gtf                                 │ +│ agat/convertspgxf2gxf                                 │ +[..truncated..] diff --git a/docs/images/nf-core-modules-patch.svg b/docs/images/nf-core-modules-patch.svg index b5cf52459b..7e07e6fdd2 100644 --- a/docs/images/nf-core-modules-patch.svg +++ b/docs/images/nf-core-modules-patch.svg @@ -19,65 +19,65 @@ font-weight: 700; } - .terminal-314906117-matrix { + .terminal-3451393581-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-314906117-title { + .terminal-3451393581-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-314906117-r1 { fill: #c5c8c6 } -.terminal-314906117-r2 { fill: #98a84b } -.terminal-314906117-r3 { fill: #9a9b99 } -.terminal-314906117-r4 { fill: #608ab1 } -.terminal-314906117-r5 { fill: #d0b344 } -.terminal-314906117-r6 { fill: #cc555a;font-weight: bold } + .terminal-3451393581-r1 { fill: #c5c8c6 } +.terminal-3451393581-r2 { fill: #98a84b } +.terminal-3451393581-r3 { fill: #9a9b99 } +.terminal-3451393581-r4 { fill: #608ab1 } +.terminal-3451393581-r5 { fill: #d0b344 } +.terminal-3451393581-r6 { fill: #cc555a;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -89,22 +89,22 @@ - + - - $ nf-core modules patch fastqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -ERROR    Module 'modules/nf-core/fastqc' is unchanged. No patch to compute                           + + $ nf-core modules patch fastqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +ERROR    Module 'modules/nf-core/fastqc' is unchanged. No patch to compute                           diff --git a/docs/images/nf-core-modules-remove.svg b/docs/images/nf-core-modules-remove.svg index 9ccbb37c09..aa232cbf40 100644 --- a/docs/images/nf-core-modules-remove.svg +++ b/docs/images/nf-core-modules-remove.svg @@ -19,64 +19,64 @@ font-weight: 700; } - .terminal-3716230484-matrix { + .terminal-3202493823-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3716230484-title { + .terminal-3202493823-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3716230484-r1 { fill: #c5c8c6 } -.terminal-3716230484-r2 { fill: #98a84b } -.terminal-3716230484-r3 { fill: #9a9b99 } -.terminal-3716230484-r4 { fill: #608ab1 } -.terminal-3716230484-r5 { fill: #d0b344 } + .terminal-3202493823-r1 { fill: #c5c8c6 } +.terminal-3202493823-r2 { fill: #98a84b } +.terminal-3202493823-r3 { fill: #9a9b99 } +.terminal-3202493823-r4 { fill: #608ab1 } +.terminal-3202493823-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -88,22 +88,22 @@ - + - - $ nf-core modules remove abacas - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Removed files for 'abacas' and it's dependencies 'abacas'.                                  + + $ nf-core modules remove abacas + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Removed files for 'abacas' and its dependencies 'abacas'.                                   diff --git a/docs/images/nf-core-modules-test.svg b/docs/images/nf-core-modules-test.svg index 3c6eeaca9e..ca5e1e151e 100644 --- a/docs/images/nf-core-modules-test.svg +++ b/docs/images/nf-core-modules-test.svg @@ -19,71 +19,71 @@ font-weight: 700; } - .terminal-2841448410-matrix { + .terminal-3109163010-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2841448410-title { + .terminal-3109163010-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2841448410-r1 { fill: #c5c8c6 } -.terminal-2841448410-r2 { fill: #98a84b } -.terminal-2841448410-r3 { fill: #9a9b99 } -.terminal-2841448410-r4 { fill: #608ab1 } -.terminal-2841448410-r5 { fill: #d0b344 } -.terminal-2841448410-r6 { fill: #cc555a } + .terminal-3109163010-r1 { fill: #c5c8c6 } +.terminal-3109163010-r2 { fill: #98a84b } +.terminal-3109163010-r3 { fill: #9a9b99 } +.terminal-3109163010-r4 { fill: #608ab1 } +.terminal-3109163010-r5 { fill: #d0b344 } +.terminal-3109163010-r6 { fill: #cc555a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -95,24 +95,24 @@ - + - - $ nf-core modules test samtools/view --no-prompts - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -────────────────────────────────────────── samtools/view ─────────────────────────────────────────── -WARNING  You have uncommitted changes. Make sure to commit last changes before running the tests.    -INFO     Running pytest for module 'samtools/view' + + $ nf-core modules test samtools/view --no-prompts + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +────────────────────────────────────────── samtools/view ─────────────────────────────────────────── +WARNING  You have uncommitted changes. Make sure to commit last changes before running the tests.    +INFO     Running pytest for module 'samtools/view' diff --git a/docs/images/nf-core-modules-update.svg b/docs/images/nf-core-modules-update.svg index b4766f98c4..f10bf15c33 100644 --- a/docs/images/nf-core-modules-update.svg +++ b/docs/images/nf-core-modules-update.svg @@ -19,76 +19,76 @@ font-weight: 700; } - .terminal-2020623448-matrix { + .terminal-3796124800-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2020623448-title { + .terminal-3796124800-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2020623448-r1 { fill: #c5c8c6 } -.terminal-2020623448-r2 { fill: #98a84b } -.terminal-2020623448-r3 { fill: #9a9b99 } -.terminal-2020623448-r4 { fill: #608ab1 } -.terminal-2020623448-r5 { fill: #d0b344 } + .terminal-3796124800-r1 { fill: #c5c8c6 } +.terminal-3796124800-r2 { fill: #98a84b } +.terminal-3796124800-r3 { fill: #9a9b99 } +.terminal-3796124800-r4 { fill: #608ab1 } +.terminal-3796124800-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -100,26 +100,26 @@ - + - - $ nf-core modules update --all --no-preview - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO    'modules/nf-core/abacas' is already up to date                                              -INFO     Updating 'nf-core/custom/dumpsoftwareversions' -INFO     Updating 'nf-core/fastqc' -INFO     Updating 'nf-core/multiqc' -INFO     Updates complete ✨                                                                         + + $ nf-core modules update --all --no-preview + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO    'modules/nf-core/abacas' is already up to date                                              +INFO     Updating 'nf-core/custom/dumpsoftwareversions' +INFO     Updating 'nf-core/fastqc' +INFO     Updating 'nf-core/multiqc' +INFO     Updates complete ✨                                                                         diff --git a/docs/images/nf-core-schema-build.svg b/docs/images/nf-core-schema-build.svg index 21bb725c6d..880a7b13ca 100644 --- a/docs/images/nf-core-schema-build.svg +++ b/docs/images/nf-core-schema-build.svg @@ -19,72 +19,72 @@ font-weight: 700; } - .terminal-3584346773-matrix { + .terminal-1769917115-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3584346773-title { + .terminal-1769917115-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3584346773-r1 { fill: #c5c8c6 } -.terminal-3584346773-r2 { fill: #98a84b } -.terminal-3584346773-r3 { fill: #9a9b99 } -.terminal-3584346773-r4 { fill: #608ab1 } -.terminal-3584346773-r5 { fill: #d0b344 } -.terminal-3584346773-r6 { fill: #98a84b;font-weight: bold } -.terminal-3584346773-r7 { fill: #868887;font-weight: bold } -.terminal-3584346773-r8 { fill: #868887 } -.terminal-3584346773-r9 { fill: #4e707b;font-weight: bold } -.terminal-3584346773-r10 { fill: #68a0b3;font-weight: bold } + .terminal-1769917115-r1 { fill: #c5c8c6 } +.terminal-1769917115-r2 { fill: #98a84b } +.terminal-1769917115-r3 { fill: #9a9b99 } +.terminal-1769917115-r4 { fill: #608ab1 } +.terminal-1769917115-r5 { fill: #d0b344 } +.terminal-1769917115-r6 { fill: #98a84b;font-weight: bold } +.terminal-1769917115-r7 { fill: #868887;font-weight: bold } +.terminal-1769917115-r8 { fill: #868887 } +.terminal-1769917115-r9 { fill: #4e707b;font-weight: bold } +.terminal-1769917115-r10 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -96,23 +96,23 @@ - + - - $ nf-core schema build --no-prompts - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO    [] Default parameters match schema validation -INFO    [] Pipeline schema looks valid(found 31 params) -INFO     Writing schema with 32 params: './nextflow_schema.json' + + $ nf-core schema build --no-prompts + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO    [] Default parameters match schema validation +INFO    [] Pipeline schema looks valid(found 30 params) +INFO     Writing schema with 31 params: './nextflow_schema.json' diff --git a/docs/images/nf-core-schema-lint.svg b/docs/images/nf-core-schema-lint.svg index ec9dcbb236..1fa52d8f30 100644 --- a/docs/images/nf-core-schema-lint.svg +++ b/docs/images/nf-core-schema-lint.svg @@ -19,76 +19,76 @@ font-weight: 700; } - .terminal-4052376265-matrix { + .terminal-3481033456-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4052376265-title { + .terminal-3481033456-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4052376265-r1 { fill: #c5c8c6 } -.terminal-4052376265-r2 { fill: #98a84b } -.terminal-4052376265-r3 { fill: #9a9b99 } -.terminal-4052376265-r4 { fill: #608ab1 } -.terminal-4052376265-r5 { fill: #d0b344 } -.terminal-4052376265-r6 { fill: #cc555a } -.terminal-4052376265-r7 { fill: #d0b344;font-weight: bold } -.terminal-4052376265-r8 { fill: #98a84b;font-weight: bold } -.terminal-4052376265-r9 { fill: #868887;font-weight: bold } -.terminal-4052376265-r10 { fill: #868887 } -.terminal-4052376265-r11 { fill: #4e707b;font-weight: bold } + .terminal-3481033456-r1 { fill: #c5c8c6 } +.terminal-3481033456-r2 { fill: #98a84b } +.terminal-3481033456-r3 { fill: #9a9b99 } +.terminal-3481033456-r4 { fill: #608ab1 } +.terminal-3481033456-r5 { fill: #d0b344 } +.terminal-3481033456-r6 { fill: #cc555a } +.terminal-3481033456-r7 { fill: #d0b344;font-weight: bold } +.terminal-3481033456-r8 { fill: #98a84b;font-weight: bold } +.terminal-3481033456-r9 { fill: #868887;font-weight: bold } +.terminal-3481033456-r10 { fill: #868887 } +.terminal-3481033456-r11 { fill: #4e707b;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -100,24 +100,24 @@ - + - - $ nf-core schema lint - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -WARNING [!] Default parameter 'outdir' is empty or null. It is advisable to remove the default from -the schema -INFO    [] Default parameters match schema validation -INFO    [] Pipeline schema looks valid(found 32 params) + + $ nf-core schema lint + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +WARNING [!] Default parameter 'outdir' is empty or null. It is advisable to remove the default from +the schema +INFO    [] Default parameters match schema validation +INFO    [] Pipeline schema looks valid(found 31 params) diff --git a/docs/images/nf-core-schema-validate.svg b/docs/images/nf-core-schema-validate.svg index b7fe83a26e..c33cadae84 100644 --- a/docs/images/nf-core-schema-validate.svg +++ b/docs/images/nf-core-schema-validate.svg @@ -19,71 +19,71 @@ font-weight: 700; } - .terminal-3684760685-matrix { + .terminal-2439576725-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3684760685-title { + .terminal-2439576725-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3684760685-r1 { fill: #c5c8c6 } -.terminal-3684760685-r2 { fill: #98a84b } -.terminal-3684760685-r3 { fill: #9a9b99 } -.terminal-3684760685-r4 { fill: #608ab1 } -.terminal-3684760685-r5 { fill: #d0b344 } -.terminal-3684760685-r6 { fill: #98a84b;font-weight: bold } -.terminal-3684760685-r7 { fill: #868887;font-weight: bold } -.terminal-3684760685-r8 { fill: #868887 } -.terminal-3684760685-r9 { fill: #4e707b;font-weight: bold } + .terminal-2439576725-r1 { fill: #c5c8c6 } +.terminal-2439576725-r2 { fill: #98a84b } +.terminal-2439576725-r3 { fill: #9a9b99 } +.terminal-2439576725-r4 { fill: #608ab1 } +.terminal-2439576725-r5 { fill: #d0b344 } +.terminal-2439576725-r6 { fill: #98a84b;font-weight: bold } +.terminal-2439576725-r7 { fill: #868887;font-weight: bold } +.terminal-2439576725-r8 { fill: #868887 } +.terminal-2439576725-r9 { fill: #4e707b;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -95,23 +95,23 @@ - + - - $ nf-core schema validate nf-core-rnaseq/3_8 nf-params.json - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO    [] Default parameters match schema validation -INFO    [] Pipeline schema looks valid(found 93 params) -INFO    [] Input parameters look valid + + $ nf-core schema validate nf-core-rnaseq/3_8 nf-params.json + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO    [] Default parameters match schema validation +INFO    [] Pipeline schema looks valid(found 93 params) +INFO    [] Input parameters look valid diff --git a/docs/images/nf-core-subworkflows-create-test.svg b/docs/images/nf-core-subworkflows-create-test.svg index 9ecec3ff4d..04edf19367 100644 --- a/docs/images/nf-core-subworkflows-create-test.svg +++ b/docs/images/nf-core-subworkflows-create-test.svg @@ -19,84 +19,84 @@ font-weight: 700; } - .terminal-846289372-matrix { + .terminal-3329251498-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-846289372-title { + .terminal-3329251498-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-846289372-r1 { fill: #c5c8c6 } -.terminal-846289372-r2 { fill: #98a84b } -.terminal-846289372-r3 { fill: #9a9b99 } -.terminal-846289372-r4 { fill: #608ab1 } -.terminal-846289372-r5 { fill: #d0b344 } -.terminal-846289372-r6 { fill: #ff2c7a } -.terminal-846289372-r7 { fill: #98729f } + .terminal-3329251498-r1 { fill: #c5c8c6 } +.terminal-3329251498-r2 { fill: #98a84b } +.terminal-3329251498-r3 { fill: #9a9b99 } +.terminal-3329251498-r4 { fill: #608ab1 } +.terminal-3329251498-r5 { fill: #d0b344 } +.terminal-3329251498-r6 { fill: #ff2c7a } +.terminal-3329251498-r7 { fill: #98729f } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -108,28 +108,28 @@ - + - - $ nf-core subworkflows create-test-yml bam_stats_samtools --no-prompts --force - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Looking for test workflow entry points:                                                     -'tests/subworkflows/nf-core/bam_stats_samtools/main.nf' -──────────────────────────────────────────────────────────────────────────────────────────────────── -INFO     Building test meta for entry point 'test_bam_stats_samtools' -INFO     Running 'bam_stats_samtools' test with command:                                             -nextflow run ./tests/subworkflows/nf-core/bam_stats_samtools -entry test_bam_stats_samtools --c ./tests/config/nextflow.config --outdir /tmp/tmporwv9usk -work-dir /tmp/tmpgshpshl3 + + $ nf-core subworkflows create-test-yml bam_stats_samtools --no-prompts --force + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Looking for test workflow entry points:                                                     +'tests/subworkflows/nf-core/bam_stats_samtools/main.nf' +──────────────────────────────────────────────────────────────────────────────────────────────────── +INFO     Building test meta for entry point 'test_bam_stats_samtools' +INFO     Running 'bam_stats_samtools' test with command:                                             +nextflow run ./tests/subworkflows/nf-core/bam_stats_samtools -entry test_bam_stats_samtools +-c ./tests/config/nextflow.config --outdir /tmp/tmpc5x73b37 -work-dir /tmp/tmpcka4vu1g diff --git a/docs/images/nf-core-subworkflows-create.svg b/docs/images/nf-core-subworkflows-create.svg index df2311a2fd..1b6b3ad41b 100644 --- a/docs/images/nf-core-subworkflows-create.svg +++ b/docs/images/nf-core-subworkflows-create.svg @@ -19,94 +19,94 @@ font-weight: 700; } - .terminal-3762021705-matrix { + .terminal-2703091057-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3762021705-title { + .terminal-2703091057-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3762021705-r1 { fill: #c5c8c6 } -.terminal-3762021705-r2 { fill: #98a84b } -.terminal-3762021705-r3 { fill: #9a9b99 } -.terminal-3762021705-r4 { fill: #608ab1 } -.terminal-3762021705-r5 { fill: #d0b344 } -.terminal-3762021705-r6 { fill: #68a0b3;font-weight: bold } -.terminal-3762021705-r7 { fill: #98729f } -.terminal-3762021705-r8 { fill: #ff2c7a } + .terminal-2703091057-r1 { fill: #c5c8c6 } +.terminal-2703091057-r2 { fill: #98a84b } +.terminal-2703091057-r3 { fill: #9a9b99 } +.terminal-2703091057-r4 { fill: #608ab1 } +.terminal-2703091057-r5 { fill: #d0b344 } +.terminal-2703091057-r6 { fill: #68a0b3;font-weight: bold } +.terminal-2703091057-r7 { fill: #98729f } +.terminal-2703091057-r8 { fill: #ff2c7a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -118,31 +118,31 @@ - + - - $ nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --force - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Repository type: modules -INFO    Press enter to use default values (shown in brackets)or type your own responses.  -ctrl+click underlined text to open links. -INFO     Created / edited following files:                                                           -           ./subworkflows/nf-core/bam_stats_samtools/main.nf -           ./subworkflows/nf-core/bam_stats_samtools/meta.yml -           ./tests/subworkflows/nf-core/bam_stats_samtools/main.nf -           ./tests/subworkflows/nf-core/bam_stats_samtools/test.yml -           ./tests/subworkflows/nf-core/bam_stats_samtools/nextflow.config -           ./tests/config/pytest_modules.yml + + $ nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --force + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Repository type: modules +INFO    Press enter to use default values (shown in brackets)or type your own responses.  +ctrl+click underlined text to open links. +INFO     Created / edited following files:                                                           +           ./subworkflows/nf-core/bam_stats_samtools/main.nf +           ./subworkflows/nf-core/bam_stats_samtools/meta.yml +           ./tests/subworkflows/nf-core/bam_stats_samtools/main.nf +           ./tests/subworkflows/nf-core/bam_stats_samtools/test.yml +           ./tests/subworkflows/nf-core/bam_stats_samtools/nextflow.config +           ./tests/config/pytest_modules.yml diff --git a/docs/images/nf-core-subworkflows-info.svg b/docs/images/nf-core-subworkflows-info.svg index ce903ed11b..d29a99bbef 100644 --- a/docs/images/nf-core-subworkflows-info.svg +++ b/docs/images/nf-core-subworkflows-info.svg @@ -19,304 +19,304 @@ font-weight: 700; } - .terminal-1571342018-matrix { + .terminal-2817640170-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1571342018-title { + .terminal-2817640170-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1571342018-r1 { fill: #c5c8c6 } -.terminal-1571342018-r2 { fill: #98a84b } -.terminal-1571342018-r3 { fill: #9a9b99 } -.terminal-1571342018-r4 { fill: #608ab1 } -.terminal-1571342018-r5 { fill: #d0b344 } -.terminal-1571342018-r6 { fill: #c5c8c6;font-weight: bold } -.terminal-1571342018-r7 { fill: #98a84b;font-weight: bold } -.terminal-1571342018-r8 { fill: #868887 } -.terminal-1571342018-r9 { fill: #d08442 } -.terminal-1571342018-r10 { fill: #868887;font-style: italic; } -.terminal-1571342018-r11 { fill: #98729f } + .terminal-2817640170-r1 { fill: #c5c8c6 } +.terminal-2817640170-r2 { fill: #98a84b } +.terminal-2817640170-r3 { fill: #9a9b99 } +.terminal-2817640170-r4 { fill: #608ab1 } +.terminal-2817640170-r5 { fill: #d0b344 } +.terminal-2817640170-r6 { fill: #c5c8c6;font-weight: bold } +.terminal-2817640170-r7 { fill: #98a84b;font-weight: bold } +.terminal-2817640170-r8 { fill: #868887 } +.terminal-2817640170-r9 { fill: #d08442 } +.terminal-2817640170-r10 { fill: #868887;font-style: italic; } +.terminal-2817640170-r11 { fill: #98729f } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -328,100 +328,100 @@ - + - - $ nf-core subworkflows info bam_rseqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -╭─ Subworkflow: bam_rseqc  ────────────────────────────────────────────────────────────────────────╮ -│ 🌐 Repository: https://github.com/nf-core/modules.git                                            │ -│ 📖 Description: Subworkflow to run multiple commands in the RSeqC package                        │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ -                       ╷                                                                   ╷         -📥 Inputs             Description                                                        Pattern -╺━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━╸ - meta  (map)          │Groovy Map containing sample information e.g. [ id:'test',         │ -                       │single_end:false ]                                                 │ -╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ - bam  (file)          │BAM file to calculate statistics                                   │*.{bam} -╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ - bai  (file)          │Index for input BAM file                                           │*.{bai} -╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ - bed  (file)          │BED file for the reference gene model                              │*.{bed} -╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ - rseqc_modules  (list)│List of rseqc modules to run e.g. [ 'bam_stat', 'infer_experiment' │ -                       │]                                                                  │ -                       ╵                                                                   ╵         -                                     ╷                                   ╷                           -📤 Outputs                          Description                                          Pattern -╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━╸ - bamstat_txt  (file)                │bam statistics report              │           *.bam_stat.txt -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - innerdistance_distance  (file)     │the inner distances                │     *.inner_distance.txt -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - innerdistance_freq  (file)         │frequencies of different insert    │*.inner_distance_freq.txt -                                     │sizes                              │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - innerdistance_mean  (file)         │mean/median values of inner        │*.inner_distance_mean.txt -                                     │distances                          │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - innerdistance_pdf  (file)          │distribution plot of inner         │*.inner_distance_plot.pdf -                                     │distances                          │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - innerdistance_rscript  (file)      │script to reproduce the plot       │  *.inner_distance_plot.R -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - inferexperiment_txt  (file)        │infer_experiment results report    │   *.infer_experiment.txt -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_bed  (file)     │bed file of annotated junctions    │           *.junction.bed -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_interact_bed   │Interact bed file                  │           *.Interact.bed -(file)                              │                                   │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_xls  (file)     │xls file with junction information │                    *.xls -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_pdf  (file)     │junction plot                      │           *.junction.pdf -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_events_pdf     │events plot                        │             *.events.pdf -(file)                              │                                   │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_rscript  (file) │Rscript to reproduce the plots     │                      *.r -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionannotation_log  (file)     │Log file generated by tool         │                    *.log -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionsaturation_pdf  (file)     │Junction saturation report         │                    *.pdf -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - junctionsaturation_rscript  (file) │Junction saturation R-script       │                      *.r -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - readdistribution_txt  (file)       │the read distribution report       │  *.read_distribution.txt -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - readduplication_seq_xls  (file)    │Read duplication rate determined   │         *seq.DupRate.xls -                                     │from mapping position of read      │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - readduplication_pos_xls  (file)    │Read duplication rate determined   │         *pos.DupRate.xls -                                     │from sequence of read              │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - readduplication_pdf  (file)        │plot of duplication rate           │                    *.pdf -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - readduplication_rscript  (file)    │script to reproduce the plot       │                      *.R -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - tin_txt  (file)                    │TXT file containing tin.py results │                    *.txt -                                     │summary                            │ -╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ - versions  (file)                   │File containing software versions  │             versions.yml -                                     ╵                                   ╵                           - - 💻  Installation command: nf-core subworkflows install bam_rseqc - + + $ nf-core subworkflows info bam_rseqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +╭─ Subworkflow: bam_rseqc  ────────────────────────────────────────────────────────────────────────╮ +│ 🌐 Repository: https://github.com/nf-core/modules.git                                            │ +│ 📖 Description: Subworkflow to run multiple commands in the RSeqC package                        │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +                       ╷                                                                   ╷         +📥 Inputs             Description                                                        Pattern +╺━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━╸ + meta  (map)          │Groovy Map containing sample information e.g. [ id:'test',         │ +                       │single_end:false ]                                                 │ +╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ + bam  (file)          │BAM file to calculate statistics                                   │*.{bam} +╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ + bai  (file)          │Index for input BAM file                                           │*.{bai} +╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ + bed  (file)          │BED file for the reference gene model                              │*.{bed} +╶──────────────────────┼───────────────────────────────────────────────────────────────────┼───────╴ + rseqc_modules  (list)│List of rseqc modules to run e.g. [ 'bam_stat', 'infer_experiment' │ +                       │]                                                                  │ +                       ╵                                                                   ╵         +                                     ╷                                   ╷                           +📤 Outputs                          Description                                          Pattern +╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━╸ + bamstat_txt  (file)                │bam statistics report              │           *.bam_stat.txt +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + innerdistance_distance  (file)     │the inner distances                │     *.inner_distance.txt +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + innerdistance_freq  (file)         │frequencies of different insert    │*.inner_distance_freq.txt +                                     │sizes                              │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + innerdistance_mean  (file)         │mean/median values of inner        │*.inner_distance_mean.txt +                                     │distances                          │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + innerdistance_pdf  (file)          │distribution plot of inner         │*.inner_distance_plot.pdf +                                     │distances                          │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + innerdistance_rscript  (file)      │script to reproduce the plot       │  *.inner_distance_plot.R +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + inferexperiment_txt  (file)        │infer_experiment results report    │   *.infer_experiment.txt +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_bed  (file)     │bed file of annotated junctions    │           *.junction.bed +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_interact_bed   │Interact bed file                  │           *.Interact.bed +(file)                              │                                   │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_xls  (file)     │xls file with junction information │                    *.xls +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_pdf  (file)     │junction plot                      │           *.junction.pdf +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_events_pdf     │events plot                        │             *.events.pdf +(file)                              │                                   │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_rscript  (file) │Rscript to reproduce the plots     │                      *.r +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionannotation_log  (file)     │Log file generated by tool         │                    *.log +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionsaturation_pdf  (file)     │Junction saturation report         │                    *.pdf +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + junctionsaturation_rscript  (file) │Junction saturation R-script       │                      *.r +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + readdistribution_txt  (file)       │the read distribution report       │  *.read_distribution.txt +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + readduplication_seq_xls  (file)    │Read duplication rate determined   │         *seq.DupRate.xls +                                     │from mapping position of read      │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + readduplication_pos_xls  (file)    │Read duplication rate determined   │         *pos.DupRate.xls +                                     │from sequence of read              │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + readduplication_pdf  (file)        │plot of duplication rate           │                    *.pdf +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + readduplication_rscript  (file)    │script to reproduce the plot       │                      *.R +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + tin_txt  (file)                    │TXT file containing tin.py results │                    *.txt +                                     │summary                            │ +╶────────────────────────────────────┼───────────────────────────────────┼─────────────────────────╴ + versions  (file)                   │File containing software versions  │             versions.yml +                                     ╵                                   ╵                           + + 💻  Installation command: nf-core subworkflows install bam_rseqc + diff --git a/docs/images/nf-core-subworkflows-install.svg b/docs/images/nf-core-subworkflows-install.svg index 7dfa30a301..30edb594bb 100644 --- a/docs/images/nf-core-subworkflows-install.svg +++ b/docs/images/nf-core-subworkflows-install.svg @@ -19,64 +19,64 @@ font-weight: 700; } - .terminal-1967000681-matrix { + .terminal-853085329-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1967000681-title { + .terminal-853085329-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1967000681-r1 { fill: #c5c8c6 } -.terminal-1967000681-r2 { fill: #98a84b } -.terminal-1967000681-r3 { fill: #9a9b99 } -.terminal-1967000681-r4 { fill: #608ab1 } -.terminal-1967000681-r5 { fill: #d0b344 } + .terminal-853085329-r1 { fill: #c5c8c6 } +.terminal-853085329-r2 { fill: #98a84b } +.terminal-853085329-r3 { fill: #9a9b99 } +.terminal-853085329-r4 { fill: #608ab1 } +.terminal-853085329-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -88,22 +88,22 @@ - + - - $ nf-core subworkflows install bam_rseqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Installing 'bam_rseqc' + + $ nf-core subworkflows install bam_rseqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Installing 'bam_rseqc' diff --git a/docs/images/nf-core-subworkflows-lint.svg b/docs/images/nf-core-subworkflows-lint.svg new file mode 100644 index 0000000000..b3dcea1c0c --- /dev/null +++ b/docs/images/nf-core-subworkflows-lint.svg @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $ nf-core subworkflows lint bam_stats_samtools + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Linting modules repo: '.' +INFO     Linting subworkflow: 'bam_stats_samtools' + +╭─[!] 12 Subworkflow Test Warnings───────────────────────────────────────────────────────────────╮ +                                           ╷                          ╷                            +Subworkflow name                         File path               Test message              +╶──────────────────────────────────────────┼──────────────────────────┼──────────────────────────╴ +bam_stats_samtoolssubworkflows/nf-core/ba…Included component  +'SAMTOOLS_INDEX' versions +are not added in main.nf +bam_stats_samtoolssubworkflows/nf-core/ba…Included component  +'SAMTOOLS_SORT' versions  +are not added in main.nf +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in main.nfA +subworkflow SHOULD import +at least two modules +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in main.nf +If in doubt look at other +nf-core/subworkflows to  +see how we are doing  +things! :) +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in main.nf +edit emitted channels +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in main.nf +edit input (take)  +channels +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in main.nf +substitute modules here  +for the modules of your  +subworkflow +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in meta.yml +#Add a description of the +subworkflow and list  +keywords +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in meta.yml +#Add a list of the  +modules and/or  +subworkflows used in the  +subworkflow +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in meta.yml +#List all of the channels +used as input with a  +description and their  +structure +bam_stats_samtoolssubworkflows/nf-core/ba…TODO string in meta.yml +#List all of the channels +used as output with a  +descriptions and their  +structure +bam_stats_samtoolstests/subworkflows/nf-c…TODO string in test.yml +#Please run the following +command to build this  +file: +                                           ╵                          ╵                            +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─[✗] 4 Subworkflow Tests Failed─────────────────────────────────────────────────────────────────╮ +                                           ╷                          ╷                            +Subworkflow name                         File path               Test message              +╶──────────────────────────────────────────┼──────────────────────────┼──────────────────────────╴ +bam_stats_samtoolssubworkflows/nf-core/ba…Deprecated section  +'modules' not found in  +meta.yml +bam_stats_samtoolstests/subworkflows/nf-c…Included  +module/subworkflow  +samtools/index missing in +test.yml +bam_stats_samtoolstests/subworkflows/nf-c…Included  +module/subworkflow  +samtools/sort missing in  +test.yml +bam_stats_samtoolstests/subworkflows/nf-c…Included  +module/subworkflow  +samtools missing in  +test.yml +                                           ╵                          ╵                            +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭───────────────────────╮ +LINT RESULTS SUMMARY +├───────────────────────┤ +[✔]  22 Tests Passed  +[!]  12 Test Warnings +[✗]   4 Tests Failed  +╰───────────────────────╯ + + + + diff --git a/docs/images/nf-core-subworkflows-list-local.svg b/docs/images/nf-core-subworkflows-list-local.svg index cd62723604..715c95f093 100644 --- a/docs/images/nf-core-subworkflows-list-local.svg +++ b/docs/images/nf-core-subworkflows-list-local.svg @@ -19,67 +19,67 @@ font-weight: 700; } - .terminal-1433277432-matrix { + .terminal-334238752-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1433277432-title { + .terminal-334238752-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1433277432-r1 { fill: #c5c8c6 } -.terminal-1433277432-r2 { fill: #98a84b } -.terminal-1433277432-r3 { fill: #9a9b99 } -.terminal-1433277432-r4 { fill: #608ab1 } -.terminal-1433277432-r5 { fill: #d0b344 } + .terminal-334238752-r1 { fill: #c5c8c6 } +.terminal-334238752-r2 { fill: #98a84b } +.terminal-334238752-r3 { fill: #9a9b99 } +.terminal-334238752-r4 { fill: #608ab1 } +.terminal-334238752-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -91,23 +91,23 @@ - + - - $ nf-core subworkflows list local - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     No nf-core subworkflows found in '.' - + + $ nf-core subworkflows list local + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     No nf-core subworkflows found in '.' + diff --git a/docs/images/nf-core-subworkflows-list-remote.svg b/docs/images/nf-core-subworkflows-list-remote.svg index a14e7b006d..da584195cd 100644 --- a/docs/images/nf-core-subworkflows-list-remote.svg +++ b/docs/images/nf-core-subworkflows-list-remote.svg @@ -19,109 +19,109 @@ font-weight: 700; } - .terminal-1417169261-matrix { + .terminal-929385462-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1417169261-title { + .terminal-929385462-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1417169261-r1 { fill: #c5c8c6 } -.terminal-1417169261-r2 { fill: #98a84b } -.terminal-1417169261-r3 { fill: #9a9b99 } -.terminal-1417169261-r4 { fill: #608ab1 } -.terminal-1417169261-r5 { fill: #d0b344 } -.terminal-1417169261-r6 { fill: #1984e9;text-decoration: underline; } -.terminal-1417169261-r7 { fill: #c5c8c6;font-weight: bold } -.terminal-1417169261-r8 { fill: #868887;font-style: italic; } + .terminal-929385462-r1 { fill: #c5c8c6 } +.terminal-929385462-r2 { fill: #98a84b } +.terminal-929385462-r3 { fill: #9a9b99 } +.terminal-929385462-r4 { fill: #608ab1 } +.terminal-929385462-r5 { fill: #d0b344 } +.terminal-929385462-r6 { fill: #1984e9;text-decoration: underline; } +.terminal-929385462-r7 { fill: #c5c8c6;font-weight: bold } +.terminal-929385462-r8 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -133,36 +133,36 @@ - + - - $ nf-core subworkflows list remote - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Subworkflows available from https://github.com/nf-core/modules.git(master):                - -┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -Subworkflow Name                              -┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ -│ bam_create_som_pon_gatk                       │ -│ bam_dedup_stats_samtools_umitools             │ -│ bam_docounts_contamination_angsd              │ -│ bam_markduplicates_picard                     │ -│ bam_ngscheckmate                              │ -│ bam_qc_picard                                 │ -│ bam_rseqc                                     │ -│ bam_sort_stats_samtools                       │ -│ bam_split_by_region                           │ -[..truncated..] + + $ nf-core subworkflows list remote + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Subworkflows available from https://github.com/nf-core/modules.git(master):                + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +Subworkflow Name                              +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ bam_create_som_pon_gatk                       │ +│ bam_dedup_stats_samtools_umitools             │ +│ bam_docounts_contamination_angsd              │ +│ bam_markduplicates_picard                     │ +│ bam_markduplicates_samtools                   │ +│ bam_ngscheckmate                              │ +│ bam_qc_picard                                 │ +│ bam_rseqc                                     │ +│ bam_sort_stats_samtools                       │ +[..truncated..] diff --git a/docs/images/nf-core-subworkflows-remove.svg b/docs/images/nf-core-subworkflows-remove.svg index 055c1c378a..8c62f7f198 100644 --- a/docs/images/nf-core-subworkflows-remove.svg +++ b/docs/images/nf-core-subworkflows-remove.svg @@ -19,76 +19,76 @@ font-weight: 700; } - .terminal-2348150658-matrix { + .terminal-3426807734-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2348150658-title { + .terminal-3426807734-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2348150658-r1 { fill: #c5c8c6 } -.terminal-2348150658-r2 { fill: #98a84b } -.terminal-2348150658-r3 { fill: #9a9b99 } -.terminal-2348150658-r4 { fill: #608ab1 } -.terminal-2348150658-r5 { fill: #d0b344 } + .terminal-3426807734-r1 { fill: #c5c8c6 } +.terminal-3426807734-r2 { fill: #98a84b } +.terminal-3426807734-r3 { fill: #9a9b99 } +.terminal-3426807734-r4 { fill: #608ab1 } +.terminal-3426807734-r5 { fill: #d0b344 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -100,26 +100,26 @@ - + - - $ nf-core subworkflows remove bam_rseqc - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -INFO     Removed files for 'rseqc/bamstat' and it's dependencies 'rseqc/bamstat'.                    -INFO     Removed files for 'rseqc/inferexperiment' and it's dependencies 'rseqc/inferexperiment'.    -INFO     Removed files for 'rseqc/innerdistance' and it's dependencies 'rseqc/innerdistance'.        -INFO     Removed files for 'bam_rseqc' and it's dependencies 'bam_rseqc, rseqc_bamstat,  -rseqc_inferexperiment, rseqc_innerdistance'.                                                + + $ nf-core subworkflows remove bam_rseqc + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +INFO     Removed files for 'rseqc/bamstat' and its dependencies 'rseqc/bamstat'.                     +INFO     Removed files for 'rseqc/inferexperiment' and its dependencies 'rseqc/inferexperiment'.     +INFO     Removed files for 'rseqc/innerdistance' and its dependencies 'rseqc/innerdistance'.         +INFO     Removed files for 'bam_rseqc' and its dependencies 'bam_rseqc, rseqc_bamstat,  +rseqc_inferexperiment, rseqc_innerdistance'.                                                diff --git a/docs/images/nf-core-subworkflows-test.svg b/docs/images/nf-core-subworkflows-test.svg index 459502886a..fd30636860 100644 --- a/docs/images/nf-core-subworkflows-test.svg +++ b/docs/images/nf-core-subworkflows-test.svg @@ -19,71 +19,71 @@ font-weight: 700; } - .terminal-3302954755-matrix { + .terminal-3601078059-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3302954755-title { + .terminal-3601078059-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3302954755-r1 { fill: #c5c8c6 } -.terminal-3302954755-r2 { fill: #98a84b } -.terminal-3302954755-r3 { fill: #9a9b99 } -.terminal-3302954755-r4 { fill: #608ab1 } -.terminal-3302954755-r5 { fill: #d0b344 } -.terminal-3302954755-r6 { fill: #cc555a } + .terminal-3601078059-r1 { fill: #c5c8c6 } +.terminal-3601078059-r2 { fill: #98a84b } +.terminal-3601078059-r3 { fill: #9a9b99 } +.terminal-3601078059-r4 { fill: #608ab1 } +.terminal-3601078059-r5 { fill: #d0b344 } +.terminal-3601078059-r6 { fill: #cc555a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -95,24 +95,24 @@ - + - - $ nf-core subworkflows test bam_rseqc --no-prompts - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -──────────────────────────────────────────── bam_rseqc ───────────────────────────────────────────── -WARNING  You have uncommitted changes. Make sure to commit last changes before running the tests.    -INFO     Running pytest for subworkflow 'bam_rseqc' + + $ nf-core subworkflows test bam_rseqc --no-prompts + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +──────────────────────────────────────────── bam_rseqc ───────────────────────────────────────────── +WARNING  You have uncommitted changes. Make sure to commit last changes before running the tests.    +INFO     Running pytest for subworkflow 'bam_rseqc' diff --git a/docs/images/nf-core-subworkflows-update.svg b/docs/images/nf-core-subworkflows-update.svg index e58178193d..87a3b96706 100644 --- a/docs/images/nf-core-subworkflows-update.svg +++ b/docs/images/nf-core-subworkflows-update.svg @@ -19,65 +19,65 @@ font-weight: 700; } - .terminal-3091928051-matrix { + .terminal-2039878683-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3091928051-title { + .terminal-2039878683-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3091928051-r1 { fill: #c5c8c6 } -.terminal-3091928051-r2 { fill: #98a84b } -.terminal-3091928051-r3 { fill: #9a9b99 } -.terminal-3091928051-r4 { fill: #608ab1 } -.terminal-3091928051-r5 { fill: #d0b344 } -.terminal-3091928051-r6 { fill: #cc555a;font-weight: bold } + .terminal-2039878683-r1 { fill: #c5c8c6 } +.terminal-2039878683-r2 { fill: #98a84b } +.terminal-2039878683-r3 { fill: #9a9b99 } +.terminal-2039878683-r4 { fill: #608ab1 } +.terminal-2039878683-r5 { fill: #d0b344 } +.terminal-2039878683-r6 { fill: #cc555a;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -89,22 +89,22 @@ - + - - $ nf-core subworkflows update --all --no-preview - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - - -ERROR   'rseqc/junctionannotation' + + $ nf-core subworkflows update --all --no-preview + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + + +ERROR   'rseqc/junctionannotation' diff --git a/docs/images/nf-core-sync.svg b/docs/images/nf-core-sync.svg index d8c77548b5..df1a9b3843 100644 --- a/docs/images/nf-core-sync.svg +++ b/docs/images/nf-core-sync.svg @@ -19,72 +19,72 @@ font-weight: 700; } - .terminal-1911884239-matrix { + .terminal-2865302007-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1911884239-title { + .terminal-2865302007-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1911884239-r1 { fill: #c5c8c6 } -.terminal-1911884239-r2 { fill: #98a84b } -.terminal-1911884239-r3 { fill: #9a9b99 } -.terminal-1911884239-r4 { fill: #608ab1 } -.terminal-1911884239-r5 { fill: #d0b344 } -.terminal-1911884239-r6 { fill: #98729f } -.terminal-1911884239-r7 { fill: #ff2c7a } + .terminal-2865302007-r1 { fill: #c5c8c6 } +.terminal-2865302007-r2 { fill: #98a84b } +.terminal-2865302007-r3 { fill: #9a9b99 } +.terminal-2865302007-r4 { fill: #608ab1 } +.terminal-2865302007-r5 { fill: #d0b344 } +.terminal-2865302007-r6 { fill: #98729f } +.terminal-2865302007-r7 { fill: #ff2c7a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -96,24 +96,24 @@ - + - - $ nf-core sync - -                                          ,--./,-. -          ___     __   __   __   ___     /,-._.--~\ -    |\ | |__  __ /  ` /  \ |__) |__         }  { -    | \| |       \__, \__/ |  \ |___     \`-._,-`-, -                                          `._,._,' - -    nf-core/tools version 2.9 - https://nf-co.re - - -INFO     Pipeline directory: /home/runner/work/tools/tools/tmp/nf-core-nextbigthing -INFO     Original pipeline repository branch is 'master' -INFO     Deleting all files in 'TEMPLATE' branch                                                     -INFO     Making a new template pipeline using pipeline variables                                     + + $ nf-core sync + +                                          ,--./,-. +          ___     __   __   __   ___     /,-._.--~\ +    |\ | |__  __ /  ` /  \ |__) |__         }  { +    | \| |       \__, \__/ |  \ |___     \`-._,-`-, +                                          `._,._,' + +    nf-core/tools version 2.10 - https://nf-co.re + + +INFO     Pipeline directory: /home/runner/work/tools/tools/tmp/nf-core-nextbigthing +INFO     Original pipeline repository branch is 'master' +INFO     Deleting all files in 'TEMPLATE' branch                                                     +INFO     Making a new template pipeline using pipeline variables                                     diff --git a/nf_core/__main__.py b/nf_core/__main__.py index d57d27f1e6..72762ff026 100644 --- a/nf_core/__main__.py +++ b/nf_core/__main__.py @@ -13,6 +13,7 @@ from nf_core import __version__ from nf_core.download import DownloadError from nf_core.modules.modules_repo import NF_CORE_MODULES_REMOTE +from nf_core.params_file import ParamsFileBuilder from nf_core.utils import check_if_outdated, rich_force_colors, setup_nfcore_dir # Set up logging as the root logger @@ -29,7 +30,7 @@ "nf-core": [ { "name": "Commands for users", - "commands": ["list", "launch", "download", "licences"], + "commands": ["list", "launch", "create-params-file", "download", "licences"], }, { "name": "Commands for developers", @@ -221,6 +222,40 @@ def launch(pipeline, id, revision, command_only, params_in, params_out, save_all sys.exit(1) +# nf-core create-params-file +@nf_core_cli.command() +@click.argument("pipeline", required=False, metavar="") +@click.option("-r", "--revision", help="Release/branch/SHA of the pipeline (if remote)") +@click.option( + "-o", + "--output", + type=str, + default="nf-params.yml", + metavar="", + help="Output filename. Defaults to `nf-params.yml`.", +) +@click.option("-f", "--force", is_flag=True, default=False, help="Overwrite existing files") +@click.option( + "-x", "--show-hidden", is_flag=True, default=False, help="Show hidden params which don't normally need changing" +) +def create_params_file(pipeline, revision, output, force, show_hidden): + """ + Build a parameter file for a pipeline. + + Uses the pipeline schema file to generate a YAML parameters file. + Parameters are set to the pipeline defaults and descriptions are shown in comments. + After the output file is generated, it can then be edited as needed before + passing to nextflow using the `-params-file` option. + + Run using a remote pipeline name (such as GitHub `user/repo` or a URL), + a local pipeline directory. + """ + builder = ParamsFileBuilder(pipeline, revision) + + if not builder.write_params_file(output, show_hidden=show_hidden, force=force): + sys.exit(1) + + # nf-core download @nf_core_cli.command() @click.argument("pipeline", required=False, metavar="") @@ -343,12 +378,11 @@ def licences(pipeline, json): @click.option("-d", "--description", type=str, help="A short description of your pipeline") @click.option("-a", "--author", type=str, help="Name of the main author(s)") @click.option("--version", type=str, default="1.0dev", help="The initial version number to use") -@click.option("--no-git", is_flag=True, default=False, help="Do not initialise pipeline as new git repository") @click.option("-f", "--force", is_flag=True, default=False, help="Overwrite output directory if it already exists") @click.option("-o", "--outdir", help="Output directory for new pipeline (default: pipeline name)") @click.option("-t", "--template-yaml", help="Pass a YAML file to customize the template") @click.option("--plain", is_flag=True, help="Use the standard nf-core template") -def create(name, description, author, version, no_git, force, outdir, template_yaml, plain): +def create(name, description, author, version, force, outdir, template_yaml, plain): """ Create a new pipeline using the nf-core template. @@ -358,7 +392,16 @@ def create(name, description, author, version, no_git, force, outdir, template_y from nf_core.create import PipelineCreate try: - create_obj = PipelineCreate(name, description, author, version, no_git, force, outdir, template_yaml, plain) + create_obj = PipelineCreate( + name, + description, + author, + version=version, + force=force, + outdir=outdir, + template_yaml_path=template_yaml, + plain=plain, + ) create_obj.init_pipeline() except UserWarning as e: log.error(e) @@ -877,8 +920,8 @@ def lint( Test modules within a pipeline or a clone of the nf-core/modules repository. """ + from nf_core.components.lint import LintException from nf_core.modules import ModuleLint - from nf_core.modules.lint import ModuleLintException try: module_lint = ModuleLint( @@ -903,7 +946,7 @@ def lint( ) if len(module_lint.failed) > 0: sys.exit(1) - except ModuleLintException as e: + except LintException as e: log.error(e) sys.exit(1) except (UserWarning, LookupError) as e: @@ -1135,6 +1178,76 @@ def local(ctx, keywords, json, dir): # pylint: disable=redefined-builtin sys.exit(1) +# nf-core subworkflows lint +@subworkflows.command() +@click.pass_context +@click.argument("subworkflow", type=str, required=False, metavar="subworkflow name") +@click.option("-d", "--dir", type=click.Path(exists=True), default=".", metavar="") +@click.option( + "-r", + "--registry", + type=str, + metavar="", + default=None, + help="Registry to use for containers. If not specified it will use docker.registry value in the nextflow.config file", +) +@click.option("-k", "--key", type=str, metavar="", multiple=True, help="Run only these lint tests") +@click.option("-a", "--all", is_flag=True, help="Run on all subworkflows") +@click.option("-w", "--fail-warned", is_flag=True, help="Convert warn tests to failures") +@click.option("--local", is_flag=True, help="Run additional lint tests for local subworkflows") +@click.option("--passed", is_flag=True, help="Show passed tests") +@click.option( + "--sort-by", + type=click.Choice(["subworkflow", "test"]), + default="test", + help="Sort lint output by subworkflow or test name.", + show_default=True, +) +def lint( + ctx, subworkflow, dir, registry, key, all, fail_warned, local, passed, sort_by +): # pylint: disable=redefined-outer-name + """ + Lint one or more subworkflows in a directory. + + Checks DSL2 subworkflow code against nf-core guidelines to ensure + that all subworkflows follow the same standards. + + Test subworkflows within a pipeline or a clone of the + nf-core/modules repository. + """ + from nf_core.components.lint import LintException + from nf_core.subworkflows import SubworkflowLint + + try: + subworkflow_lint = SubworkflowLint( + dir, + fail_warned=fail_warned, + registry=ctx.params["registry"], + remote_url=ctx.obj["modules_repo_url"], + branch=ctx.obj["modules_repo_branch"], + no_pull=ctx.obj["modules_repo_no_pull"], + hide_progress=ctx.obj["hide_progress"], + ) + subworkflow_lint.lint( + subworkflow=subworkflow, + registry=registry, + key=key, + all_subworkflows=all, + print_results=True, + local=local, + show_passed=passed, + sort_by=sort_by, + ) + if len(subworkflow_lint.failed) > 0: + sys.exit(1) + except LintException as e: + log.error(e) + sys.exit(1) + except (UserWarning, LookupError) as e: + log.critical(e) + sys.exit(1) + + # nf-core subworkflows info @subworkflows.command() @click.pass_context diff --git a/nf_core/bump_version.py b/nf_core/bump_version.py index b462ee1377..ada7f0b994 100644 --- a/nf_core/bump_version.py +++ b/nf_core/bump_version.py @@ -45,16 +45,35 @@ def bump_pipeline_version(pipeline_obj, new_version): ], ) # multiqc_config.yaml + multiqc_new_version = "dev" if "dev" in new_version else new_version update_file_version( Path("assets", "multiqc_config.yml"), pipeline_obj, [ + ( + "/dev", + f"/{multiqc_new_version}", + ), ( rf"{re.escape(current_version)}", - f"{new_version}", - ) + f"{multiqc_new_version}", + ), ], ) + # nf-test snap files + pipeline_name = pipeline_obj.nf_config.get("manifest.name", "").strip(" '\"") + snap_files = [f for f in Path().glob("tests/pipeline/*.snap")] + for snap_file in snap_files: + update_file_version( + snap_file, + pipeline_obj, + [ + ( + f"{pipeline_name}={current_version}", + f"{pipeline_name}={new_version}", + ) + ], + ) def bump_nextflow_version(pipeline_obj, new_version): diff --git a/nf_core/components/components_utils.py b/nf_core/components/components_utils.py index 9a0565296e..73378d12ca 100644 --- a/nf_core/components/components_utils.py +++ b/nf_core/components/components_utils.py @@ -128,7 +128,7 @@ def prompt_component_version_sha(component_name, component_type, modules_repo, i def get_components_to_install(subworkflow_dir): """ - Parse the subworkflow test main.nf file to retrieve all imported modules and subworkflows. + Parse the subworkflow main.nf file to retrieve all imported modules and subworkflows. """ modules = [] subworkflows = [] diff --git a/nf_core/components/lint/__init__.py b/nf_core/components/lint/__init__.py new file mode 100644 index 0000000000..ed0730d7b4 --- /dev/null +++ b/nf_core/components/lint/__init__.py @@ -0,0 +1,305 @@ +""" +Code for linting modules and subworkflows in the nf-core/modules repository and +in nf-core pipelines +""" + +from __future__ import print_function + +import logging +import operator +import os +from pathlib import Path + +import rich +from rich.markdown import Markdown +from rich.table import Table + +import nf_core.modules.modules_utils +import nf_core.utils +from nf_core.components.components_command import ComponentCommand +from nf_core.components.nfcore_component import NFCoreComponent +from nf_core.lint_utils import console +from nf_core.modules.modules_json import ModulesJson +from nf_core.utils import plural_s as _s + +log = logging.getLogger(__name__) + + +class LintException(Exception): + """Exception raised when there was an error with module or subworkflow linting""" + + pass + + +class LintResult: + """An object to hold the results of a lint test""" + + def __init__(self, component, lint_test, message, file_path): + self.component = component + self.lint_test = lint_test + self.message = message + self.file_path = file_path + self.component_name = component.component_name + + +class ComponentLint(ComponentCommand): + """ + An object for linting modules and subworkflows either in a clone of the 'nf-core/modules' + repository or in any nf-core pipeline directory + """ + + def __init__( + self, + component_type, + dir, + fail_warned=False, + remote_url=None, + branch=None, + no_pull=False, + registry=None, + hide_progress=False, + ): + super().__init__( + component_type, + dir=dir, + remote_url=remote_url, + branch=branch, + no_pull=no_pull, + hide_progress=hide_progress, + ) + + self.fail_warned = fail_warned + self.passed = [] + self.warned = [] + self.failed = [] + if self.component_type == "modules": + self.lint_tests = self.get_all_module_lint_tests(self.repo_type == "pipeline") + else: + self.lint_tests = self.get_all_subworkflow_lint_tests(self.repo_type == "pipeline") + + if self.repo_type == "pipeline": + modules_json = ModulesJson(self.dir) + modules_json.check_up_to_date() + self.all_remote_components = [] + for repo_url, components in modules_json.get_all_components(self.component_type).items(): + if remote_url is not None and remote_url != repo_url: + continue + for org, comp in components: + self.all_remote_components.append( + NFCoreComponent( + comp, + repo_url, + Path(self.dir, self.component_type, org, comp), + self.repo_type, + Path(self.dir), + self.component_type, + ) + ) + if not self.all_remote_components: + raise LookupError( + f"No {self.component_type} from {self.modules_repo.remote_url} installed in pipeline." + ) + local_component_dir = Path(self.dir, self.component_type, "local") + self.all_local_components = [] + if local_component_dir.exists(): + self.all_local_components = [ + NFCoreComponent( + comp, + None, + Path(local_component_dir, comp), + self.repo_type, + Path(self.dir), + self.component_type, + remote_component=False, + ) + for comp in self.get_local_components() + ] + self.config = nf_core.utils.fetch_wf_config(self.dir, cache_config=True) + else: + component_dir = Path( + self.dir, + self.default_modules_path if self.component_type == "modules" else self.default_subworkflows_path, + ) + self.all_remote_components = [ + NFCoreComponent(m, None, component_dir / m, self.repo_type, Path(self.dir), self.component_type) + for m in self.get_components_clone_modules() + ] + self.all_local_components = [] + if not self.all_remote_components: + raise LookupError(f"No {self.component_type} in '{self.component_type}' directory") + + # This could be better, perhaps glob for all nextflow.config files in? + self.config = nf_core.utils.fetch_wf_config(Path(self.dir).joinpath("tests", "config"), cache_config=True) + + if registry is None: + self.registry = self.config.get("docker.registry", "quay.io") + else: + self.registry = registry + log.debug(f"Registry set to {self.registry}") + + self.lint_config = None + self.modules_json = None + + @staticmethod + def get_all_module_lint_tests(is_pipeline): + if is_pipeline: + return [ + "module_patch", + "module_version", + "main_nf", + "meta_yml", + "module_todos", + "module_deprecations", + "module_changes", + ] + else: + return ["main_nf", "meta_yml", "module_todos", "module_deprecations", "module_tests"] + + @staticmethod + def get_all_subworkflow_lint_tests(is_pipeline): + if is_pipeline: + return ["main_nf", "meta_yml", "subworkflow_changes", "subworkflow_todos", "subworkflow_version"] + else: + return ["main_nf", "meta_yml", "subworkflow_todos", "subworkflow_tests"] + + def set_up_pipeline_files(self): + self.load_lint_config() + self.modules_json = ModulesJson(self.dir) + self.modules_json.load() + + # Only continue if a lint config has been loaded + if self.lint_config: + for test_name in self.lint_tests: + if self.lint_config.get(test_name, {}) is False: + log.info(f"Ignoring lint test: {test_name}") + self.lint_tests.remove(test_name) + + def filter_tests_by_key(self, key): + """Filters the tests by the supplied key""" + # Check that supplied test keys exist + bad_keys = [k for k in key if k not in self.lint_tests] + if len(bad_keys) > 0: + raise AssertionError( + "Test name{} not recognised: '{}'".format( + _s(bad_keys), + "', '".join(bad_keys), + ) + ) + + # If -k supplied, only run these tests + self.lint_tests = [k for k in self.lint_tests if k in key] + + def _print_results(self, show_passed=False, sort_by="test"): + """Print linting results to the command line. + + Uses the ``rich`` library to print a set of formatted tables to the command line + summarising the linting results. + """ + + log.debug("Printing final results") + + sort_order = ["lint_test", "component_name", "message"] + if sort_by == "module" or sort_by == "subworkflow": + sort_order = ["component_name", "lint_test", "message"] + + # Sort the results + self.passed.sort(key=operator.attrgetter(*sort_order)) + self.warned.sort(key=operator.attrgetter(*sort_order)) + self.failed.sort(key=operator.attrgetter(*sort_order)) + + # Find maximum module name length + max_name_len = 40 + for tests in [self.passed, self.warned, self.failed]: + try: + for lint_result in tests: + max_name_len = max(len(lint_result.component_name), max_name_len) + except: + pass + + # Helper function to format test links nicely + def format_result(test_results, table): + """ + Given an list of error message IDs and the message texts, return a nicely formatted + string for the terminal with appropriate ASCII colours. + """ + # TODO: Row styles don't work current as table-level style overrides. + # Leaving it here in case there is a future fix + last_modname = False + even_row = False + for lint_result in test_results: + if last_modname and lint_result.component_name != last_modname: + even_row = not even_row + last_modname = lint_result.component_name + table.add_row( + Markdown(f"{lint_result.component_name}"), + os.path.relpath(lint_result.file_path, self.dir), + Markdown(f"{lint_result.message}"), + style="dim" if even_row else None, + ) + return table + + # Print blank line for spacing + console.print("") + + # Table of passed tests + if len(self.passed) > 0 and show_passed: + table = Table(style="green", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") + table.add_column(f"{self.component_type[:-1].title()} name", width=max_name_len) + table.add_column("File path") + table.add_column("Test message") + table = format_result(self.passed, table) + console.print( + rich.panel.Panel( + table, + title=rf"[bold][✔] {len(self.passed)} {self.component_type[:-1].title()} Test{_s(self.passed)} Passed", + title_align="left", + style="green", + padding=0, + ) + ) + + # Table of warning tests + if len(self.warned) > 0: + table = Table(style="yellow", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") + table.add_column(f"{self.component_type[:-1].title()} name", width=max_name_len) + table.add_column("File path") + table.add_column("Test message") + table = format_result(self.warned, table) + console.print( + rich.panel.Panel( + table, + title=rf"[bold][!] {len(self.warned)} {self.component_type[:-1].title()} Test Warning{_s(self.warned)}", + title_align="left", + style="yellow", + padding=0, + ) + ) + + # Table of failing tests + if len(self.failed) > 0: + table = Table(style="red", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") + table.add_column(f"{self.component_type[:-1].title()} name", width=max_name_len) + table.add_column("File path") + table.add_column("Test message") + table = format_result(self.failed, table) + console.print( + rich.panel.Panel( + table, + title=rf"[bold][✗] {len(self.failed)} {self.component_type[:-1].title()} Test{_s(self.failed)} Failed", + title_align="left", + style="red", + padding=0, + ) + ) + + def print_summary(self): + """Print a summary table to the console.""" + table = Table(box=rich.box.ROUNDED) + table.add_column("[bold green]LINT RESULTS SUMMARY", no_wrap=True) + table.add_row( + rf"[✔] {len(self.passed):>3} Test{_s(self.passed)} Passed", + style="green", + ) + table.add_row(rf"[!] {len(self.warned):>3} Test Warning{_s(self.warned)}", style="yellow") + table.add_row(rf"[✗] {len(self.failed):>3} Test{_s(self.failed)} Failed", style="red") + console.print(table) diff --git a/nf_core/components/nfcore_component.py b/nf_core/components/nfcore_component.py new file mode 100644 index 0000000000..4413854128 --- /dev/null +++ b/nf_core/components/nfcore_component.py @@ -0,0 +1,71 @@ +""" +The NFCoreComponent class holds information and utility functions for a single module or subworkflow +""" +from pathlib import Path + + +class NFCoreComponent: + """ + A class to hold the information about a nf-core module or subworkflow. + Includes functionality for linting. + """ + + def __init__( + self, component_name, repo_url, component_dir, repo_type, base_dir, component_type, remote_component=True + ): + """ + Initialize the object + + Args: + component_name (str): The name of the module or subworkflow + repo_url (str): The URL of the repository + component_dir (Path): The absolute path to the module or subworkflow + repo_type (str): Either 'pipeline' or 'modules' depending on + whether the directory is a pipeline or clone + of nf-core/modules. + base_dir (Path): The absolute path to the pipeline base dir + component_type (str): Either 'modules' or 'subworkflows' + remote_component (bool): Whether the module is to be treated as a + nf-core or local component + """ + self.component_name = component_name + self.repo_url = repo_url + self.component_dir = component_dir + self.repo_type = repo_type + self.base_dir = base_dir + self.passed = [] + self.warned = [] + self.failed = [] + self.inputs = [] + self.outputs = [] + self.has_meta = False + self.git_sha = None + self.is_patched = False + + if remote_component: + # Initialize the important files + self.main_nf = self.component_dir / "main.nf" + self.meta_yml = self.component_dir / "meta.yml" + + repo_dir = self.component_dir.parts[: self.component_dir.parts.index(self.component_name.split("/")[0])][-1] + self.org = repo_dir + self.test_dir = Path(self.base_dir, "tests", component_type, repo_dir, self.component_name) + self.test_yml = self.test_dir / "test.yml" + self.test_main_nf = self.test_dir / "main.nf" + + if self.repo_type == "pipeline": + patch_fn = f"{self.component_name.replace('/', '-')}.diff" + patch_path = Path(self.component_dir, patch_fn) + if patch_path.exists(): + self.is_patched = True + self.patch_path = patch_path + else: + # The main file is just the local module + self.main_nf = self.component_dir + self.component_name = self.component_dir.stem + # These attributes are only used by nf-core modules + # so just initialize them to None + self.meta_yml = None + self.test_dir = None + self.test_yml = None + self.test_main_nf = None diff --git a/nf_core/components/remove.py b/nf_core/components/remove.py index 99df757992..8d884db6c4 100644 --- a/nf_core/components/remove.py +++ b/nf_core/components/remove.py @@ -157,7 +157,7 @@ def remove(self, component, removed_by=None, removed_components=None, force=Fals removed_components.append(component_name.replace("/", "_")) # print removed dependencies if removed_components: - log.info(f"Removed files for '{component}' and it's dependencies '{', '.join(removed_components)}'.") + log.info(f"Removed files for '{component}' and its dependencies '{', '.join(removed_components)}'.") else: log.info(f"Removed files for '{component}'.") else: diff --git a/nf_core/create.py b/nf_core/create.py index 089469f04c..470623f551 100644 --- a/nf_core/create.py +++ b/nf_core/create.py @@ -57,7 +57,7 @@ def __init__( default_branch=None, ): self.template_params, skip_paths_keys, self.template_yaml = self.create_param_dict( - name, description, author, version, template_yaml_path, plain + name, description, author, version, template_yaml_path, plain, outdir if outdir else "." ) skippable_paths = { @@ -90,16 +90,28 @@ def __init__( outdir = os.path.join(os.getcwd(), self.template_params["name_noslash"]) self.outdir = Path(outdir) - def create_param_dict(self, name, description, author, version, template_yaml_path, plain): + def create_param_dict(self, name, description, author, version, template_yaml_path, plain, pipeline_dir): """Creates a dictionary of parameters for the new pipeline. Args: + name (str): Name for the pipeline. + description (str): Description for the pipeline. + author (str): Authors name of the pipeline. + version (str): Version flag. template_yaml_path (str): Path to YAML file containing template parameters. + plain (bool): If true the pipeline template will be initialized plain, without customisation. + pipeline_dir (str): Path to the pipeline directory. """ + # Try reading config file + _, config_yml = nf_core.utils.load_tools_config(pipeline_dir) + + # Obtain template customization info from template yaml file or `.nf-core.yml` config file try: if template_yaml_path is not None: with open(template_yaml_path, "r") as f: template_yaml = yaml.safe_load(f) + elif "template" in config_yml: + template_yaml = config_yml["template"] else: template_yaml = {} except FileNotFoundError: @@ -169,17 +181,21 @@ def create_param_dict(self, name, description, author, version, template_yaml_pa param_dict["logo_dark"] = f"{param_dict['name_noslash']}_logo_dark.png" param_dict["version"] = version - _, config_yml = nf_core.utils.load_tools_config() if ( "lint" in config_yml and "nextflow_config" in config_yml["lint"] and "manifest.name" in config_yml["lint"]["nextflow_config"] ): return param_dict, skip_paths, template_yaml - if param_dict["prefix"] == "nf-core": - # Check that the pipeline name matches the requirements - if not re.match(r"^[a-z]+$", param_dict["short_name"]): + + # Check that the pipeline name matches the requirements + if not re.match(r"^[a-z]+$", param_dict["short_name"]): + if param_dict["prefix"] == "nf-core": raise UserWarning("[red]Invalid workflow name: must be lowercase without punctuation.") + else: + log.warning( + "Your workflow name is not lowercase without punctuation. This may cause Nextflow errors.\nConsider changing the name to avoid special characters." + ) return param_dict, skip_paths, template_yaml @@ -187,9 +203,7 @@ def customize_template(self, template_areas): """Customizes the template parameters. Args: - name (str): Name for the pipeline. - description (str): Description for the pipeline. - author (str): Authors name of the pipeline. + template_areas (list): List of available template areas to skip. """ template_yaml = {} prefix = questionary.text("Pipeline prefix", style=nf_core.utils.nfcore_question_style).unsafe_ask() @@ -351,11 +365,13 @@ def render_template(self): # Update the .nf-core.yml with linting configurations self.fix_linting() - log.debug("Dumping pipeline template yml to file") if self.template_yaml: - with open(self.outdir / "pipeline_template.yml", "w") as fh: - yaml.safe_dump(self.template_yaml, fh) - run_prettier_on_file(self.outdir / "pipeline_template.yml") + config_fn, config_yml = nf_core.utils.load_tools_config(self.outdir) + with open(self.outdir / config_fn, "w") as fh: + config_yml.update(template=self.template_yaml) + yaml.safe_dump(config_yml, fh) + log.debug(f"Dumping pipeline template yml to pipeline config file '{config_fn.name}'") + run_prettier_on_file(self.outdir / config_fn) def update_nextflow_schema(self): """ diff --git a/nf_core/download.py b/nf_core/download.py index f049b41ab5..9ca786b5e3 100644 --- a/nf_core/download.py +++ b/nf_core/download.py @@ -693,7 +693,7 @@ def find_container_images(self, workflow_directory): # for DSL2 syntax in process scope of configs config_regex = re.compile( - r"[\s{}=$]*(?P(?(?:.(?!(?(?(?:.(?!(?[\'\"]) The quote character is captured into the quote group \1. The pattern (?:.(?!\1))*.? is used to match any character (.) not followed by the closing quote character (?!\1). This capture happens greedy *, but we add a .? to ensure that we don't match the whole file until the last occurrence of the closing quote character, but rather stop at the first occurrence. \1 inserts the matched quote character into the regex, either " or '. - It may be followed by whitespace or closing bracket [\s}]* + It may be followed by whitespace or closing bracket [\\s}]* re.DOTALL is used to account for the string to be spread out across multiple lines. """ container_regex = re.compile( - r"container\s+[\s{}=$]*(?P[\'\"])(?P(?:.(?!\1))*.?)\1[\s}]*", re.DOTALL + r"container\s+[\\s{}=$]*(?P[\'\"])(?P(?:.(?!\1))*.?)\1[\\s}]*", re.DOTALL ) local_module_findings = re.findall(container_regex, search_space) @@ -748,8 +750,8 @@ def find_container_images(self, workflow_directory): # Like above run on shallow copy, because length may change at runtime. module_findings = self.rectify_raw_container_matches(module_findings[:]) - # Remove duplicates and sort - self.containers = sorted(list(set(previous_findings + config_findings + module_findings))) + # Again clean list, in case config declares Docker URI but module or previous finding already had the http:// download + self.containers = self.prioritize_direct_download(previous_findings + config_findings + module_findings) def rectify_raw_container_matches(self, raw_findings): """Helper function to rectify the raw extracted container matches into fully qualified container names. @@ -781,6 +783,16 @@ def rectify_raw_container_matches(self, raw_findings): """ cleaned_matches = [] + # Thanks Stack Overflow for the regex: https://stackoverflow.com/a/3809435/713980 + url_regex = ( + r"https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)" + ) + # Thanks Stack Overflow for the regex: https://stackoverflow.com/a/39672069/713980 + docker_regex = r"^(?:(?=[^:\/]{1,253})(?!-)[a-zA-Z0-9-]{1,63}(?(?(?(?:.(?!(? 2: + address = container + absolute_URI = True + else: + address = f"docker://{library}/{container.replace('docker://', '')}" + absolute_URI = False + if shutil.which("singularity"): singularity_command = ["singularity", "pull", "--name", output_path, address] elif shutil.which("apptainer"): @@ -1236,6 +1286,7 @@ def singularity_pull_image(self, container, out_path, cache_path, library, progr container=container, registry=library, address=address, + absolute_URI=absolute_URI, out_path=out_path if out_path else cache_path or "", singularity_command=singularity_command, error_msg=lines, @@ -1521,10 +1572,11 @@ def bare_clone(self, destination): class ContainerError(Exception): """A class of errors related to pulling containers with Singularity/Apptainer""" - def __init__(self, container, registry, address, out_path, singularity_command, error_msg): + def __init__(self, container, registry, address, absolute_URI, out_path, singularity_command, error_msg): self.container = container self.registry = registry self.address = address + self.absolute_URI = absolute_URI self.out_path = out_path self.singularity_command = singularity_command self.error_msg = error_msg @@ -1581,10 +1633,15 @@ class ImageNotFound(FileNotFoundError): def __init__(self, error_log): self.error_log = error_log - self.message = ( - f'[bold red]"Pulling "{self.error_log.container}" from "{self.error_log.address}" failed.[/]\n' - ) - self.helpmessage = f'Saving image of "{self.error_log.container}" failed.\nPlease troubleshoot the command \n"{" ".join(self.error_log.singularity_command)}" manually.f\n' + if not self.error_log.absolute_URI: + self.message = ( + f'[bold red]"Pulling "{self.error_log.container}" from "{self.error_log.address}" failed.[/]\n' + ) + self.helpmessage = f'Saving image of "{self.error_log.container}" failed.\nPlease troubleshoot the command \n"{" ".join(self.error_log.singularity_command)}" manually.f\n' + else: + self.message = f'[bold red]"The pipeline requested the download of non-existing container image "{self.error_log.address}"[/]\n' + self.helpmessage = f'Please try to rerun \n"{" ".join(self.error_log.singularity_command)}" manually with a different registry.f\n' + super().__init__(self.message) class InvalidTag(AttributeError): @@ -1612,6 +1669,11 @@ class OtherError(RuntimeError): def __init__(self, error_log): self.error_log = error_log - self.message = f'[bold red]"{self.error_log.container}" failed for unclear reasons.[/]\n' - self.helpmessage = f'Pulling of "{self.error_log.container}" failed.\nPlease troubleshoot the command \n"{" ".join(self.error_log.singularity_command)}" manually.\n' + if not self.error_log.absolute_URI: + self.message = f'[bold red]"{self.error_log.container}" failed for unclear reasons.[/]\n' + self.helpmessage = f'Pulling of "{self.error_log.container}" failed.\nPlease troubleshoot the command \n"{" ".join(self.error_log.singularity_command)}" manually.\n' + else: + self.message = f'[bold red]"The pipeline requested the download of non-existing container image "{self.error_log.address}"[/]\n' + self.helpmessage = f'Please try to rerun \n"{" ".join(self.error_log.singularity_command)}" manually with a different registry.f\n' + super().__init__(self.message, self.helpmessage, self.error_log) diff --git a/nf_core/launch.py b/nf_core/launch.py index 648c8775f8..363506c448 100644 --- a/nf_core/launch.py +++ b/nf_core/launch.py @@ -216,7 +216,7 @@ def get_pipeline_schema(self): log.error(e) return False - self.pipeline_revision = nf_core.utils.prompt_pipeline_release_branch(wf_releases, wf_branches) + self.pipeline_revision, _ = nf_core.utils.prompt_pipeline_release_branch(wf_releases, wf_branches) self.nextflow_cmd += f" -r {self.pipeline_revision}" # Get schema from name, load it and lint it diff --git a/nf_core/lint/__init__.py b/nf_core/lint/__init__.py index a998c964a0..70f7ea925f 100644 --- a/nf_core/lint/__init__.py +++ b/nf_core/lint/__init__.py @@ -58,7 +58,7 @@ def run_linting( # Verify that the requested tests exist if key: all_tests = set(PipelineLint._get_all_lint_tests(release_mode)).union( - set(nf_core.modules.lint.ModuleLint.get_all_lint_tests(is_pipeline=True)) + set(nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=True)) ) bad_keys = [k for k in key if k not in all_tests] if len(bad_keys) > 0: @@ -96,7 +96,7 @@ def run_linting( if key: # Select only the module lint tests module_lint_tests = list( - set(key).intersection(set(nf_core.modules.lint.ModuleLint.get_all_lint_tests(is_pipeline=True))) + set(key).intersection(set(nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=True))) ) else: # If no key is supplied, run the default modules tests @@ -115,10 +115,10 @@ def run_linting( return lint_obj, module_lint_obj # Run the module lint tests - if len(module_lint_obj.all_local_modules) > 0: - module_lint_obj.lint_modules(module_lint_obj.all_local_modules, local=True) - if len(module_lint_obj.all_remote_modules) > 0: - module_lint_obj.lint_modules(module_lint_obj.all_remote_modules, local=False) + if len(module_lint_obj.all_local_components) > 0: + module_lint_obj.lint_modules(module_lint_obj.all_local_components, local=True) + if len(module_lint_obj.all_remote_components) > 0: + module_lint_obj.lint_modules(module_lint_obj.all_remote_components, local=False) # Print the results lint_obj._print_results(show_passed) diff --git a/nf_core/lint/files_exist.py b/nf_core/lint/files_exist.py index 02baae7db8..117704d1f1 100644 --- a/nf_core/lint/files_exist.py +++ b/nf_core/lint/files_exist.py @@ -78,6 +78,7 @@ def files_exist(self): Singularity parameters.settings.json + pipeline_template.yml # saving information in .nf-core.yml .nf-core.yaml # NB: Should be yml, not yaml bin/markdown_to_html.r conf/aws.config @@ -181,6 +182,7 @@ def files_exist(self): files_fail_ifexists = [ "Singularity", "parameters.settings.json", + "pipeline_template.yml", # saving information in .nf-core.yml ".nf-core.yaml", # yml not yaml os.path.join("bin", "markdown_to_html.r"), os.path.join("conf", "aws.config"), diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index 9eff60091f..a1b831ae2d 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -72,12 +72,13 @@ def multiqc_config(self): # Check that the minimum plugins exist and are coming first in the summary try: version = self.nf_config.get("manifest.version", "").strip(" '\"") + version = "dev" if "dev" in version else version if "report_comment" not in mqc_yml: raise AssertionError() if mqc_yml["report_comment"].strip() != ( - f'This report has been generated by the nf-core/{self.pipeline_name} analysis pipeline. For information about how to ' - f'interpret these results, please see the documentation.' ): raise AssertionError() diff --git a/nf_core/module-template/tests/test.yml b/nf_core/module-template/tests/test.yml index 4f38dec298..a2cedb73d3 100644 --- a/nf_core/module-template/tests/test.yml +++ b/nf_core/module-template/tests/test.yml @@ -3,7 +3,7 @@ # nf-core modules create-test-yml {{ tool }}{%- if subtool %}/{{ subtool }}{%- endif %} {% endif -%} - name: "{{ component }}{{ ' '+subtool if subtool else '' }}" - command: nextflow run ./tests/modules/{{ org }}/{{ component_dir }} -entry test_{{ component_name_underscore }} -c ./tests/config/nextflow.config -c ./tests/modules/{{ org }}/{{ component_dir }}/nextflow.config + command: nextflow run ./tests/modules/{{ org }}/{{ component_dir }} -entry test_{{ component_name_underscore }} -c ./tests/config/nextflow.config tags: - "{{ component }}{% if subtool -%}" - "{{ component }}/{{ subtool }}{%- endif %}" diff --git a/nf_core/modules/bump_versions.py b/nf_core/modules/bump_versions.py index c925e497fa..e8c5060c89 100644 --- a/nf_core/modules/bump_versions.py +++ b/nf_core/modules/bump_versions.py @@ -83,7 +83,7 @@ def bump_versions(self, module=None, all_modules=False, show_uptodate=False): else: module = questionary.autocomplete( "Tool name:", - choices=[m.module_name for m in nfcore_modules], + choices=[m.component_name for m in nfcore_modules], style=nf_core.utils.nfcore_question_style, ).unsafe_ask() @@ -93,7 +93,7 @@ def bump_versions(self, module=None, all_modules=False, show_uptodate=False): raise nf_core.modules.modules_utils.ModuleException( "You cannot specify a tool and request all tools to be bumped." ) - nfcore_modules = [m for m in nfcore_modules if m.module_name == module] + nfcore_modules = [m for m in nfcore_modules if m.component_name == module] if len(nfcore_modules) == 0: raise nf_core.modules.modules_utils.ModuleException(f"Could not find the specified module: '{module}'") @@ -106,20 +106,22 @@ def bump_versions(self, module=None, all_modules=False, show_uptodate=False): ) with progress_bar: bump_progress = progress_bar.add_task( - "Bumping nf-core modules versions", total=len(nfcore_modules), test_name=nfcore_modules[0].module_name + "Bumping nf-core modules versions", + total=len(nfcore_modules), + test_name=nfcore_modules[0].component_name, ) for mod in nfcore_modules: - progress_bar.update(bump_progress, advance=1, test_name=mod.module_name) + progress_bar.update(bump_progress, advance=1, test_name=mod.component_name) self.bump_module_version(mod) self._print_results() def bump_module_version(self, module): """ - Bump the bioconda and container version of a single NFCoreModule + Bump the bioconda and container version of a single NFCoreComponent Args: - module: NFCoreModule + module: NFCoreComponent """ config_version = None # Extract bioconda version from `main.nf` @@ -127,15 +129,15 @@ def bump_module_version(self, module): # If multiple versions - don't update! (can't update mulled containers) if not bioconda_packages or len(bioconda_packages) > 1: - self.failed.append(("Ignoring mulled container", module.module_name)) + self.failed.append(("Ignoring mulled container", module.component_name)) return False # Don't update if blocked in blacklist self.bump_versions_config = self.tools_config.get("bump-versions", {}) - if module.module_name in self.bump_versions_config: - config_version = self.bump_versions_config[module.module_name] + if module.component_name in self.bump_versions_config: + config_version = self.bump_versions_config[module.component_name] if not config_version: - self.ignored.append(("Omitting module due to config.", module.module_name)) + self.ignored.append(("Omitting module due to config.", module.component_name)) return False # check for correct version and newer versions @@ -148,12 +150,12 @@ def bump_module_version(self, module): try: response = nf_core.utils.anaconda_package(bp) except (LookupError, ValueError): - self.failed.append((f"Conda version not specified correctly: {module.main_nf}", module.module_name)) + self.failed.append((f"Conda version not specified correctly: {module.main_nf}", module.component_name)) return False # Check that required version is available at all if bioconda_version not in response.get("versions"): - self.failed.append((f"Conda package had unknown version: `{module.main_nf}`", module.module_name)) + self.failed.append((f"Conda package had unknown version: `{module.main_nf}`", module.component_name)) return False # Check version is latest available @@ -162,12 +164,12 @@ def bump_module_version(self, module): last_ver = config_version if last_ver is not None and last_ver != bioconda_version: - log.debug(f"Updating version for {module.module_name}") + log.debug(f"Updating version for {module.component_name}") # Get docker and singularity container links try: docker_img, singularity_img = nf_core.utils.get_biocontainer_tag(bioconda_tool_name, last_ver) except LookupError as e: - self.failed.append((f"Could not download container tags: {e}", module.module_name)) + self.failed.append((f"Could not download container tags: {e}", module.component_name)) return False patterns = [ @@ -203,7 +205,7 @@ def bump_module_version(self, module): content = "\n".join(newcontent) + "\n" else: self.failed.append( - (f"Did not find pattern {pattern[0]} in module {module.module_name}", module.module_name) + (f"Did not find pattern {pattern[0]} in module {module.component_name}", module.component_name) ) return False @@ -214,13 +216,13 @@ def bump_module_version(self, module): self.updated.append( ( f"Module updated: {bioconda_version} --> {last_ver}", - module.module_name, + module.component_name, ) ) return True else: - self.up_to_date.append((f"Module version up to date: {module.module_name}", module.module_name)) + self.up_to_date.append((f"Module version up to date: {module.component_name}", module.component_name)) return True def get_bioconda_version(self, module): @@ -235,7 +237,7 @@ def get_bioconda_version(self, module): if "bioconda::" in l: bioconda_packages = [b for b in l.split() if "bioconda::" in b] except FileNotFoundError: - log.error(f"Could not read `main.nf` of {module.module_name} module.") + log.error(f"Could not read `main.nf` of {module.component_name} module.") return bioconda_packages diff --git a/nf_core/modules/lint/__init__.py b/nf_core/modules/lint/__init__.py index 9d8fb177cd..83d583dffb 100644 --- a/nf_core/modules/lint/__init__.py +++ b/nf_core/modules/lint/__init__.py @@ -9,44 +9,20 @@ from __future__ import print_function import logging -import operator import os -from pathlib import Path import questionary import rich -from rich.markdown import Markdown -from rich.table import Table import nf_core.modules.modules_utils import nf_core.utils -from nf_core.components.components_command import ComponentCommand +from nf_core.components.lint import ComponentLint, LintException, LintResult from nf_core.lint_utils import console -from nf_core.modules.modules_json import ModulesJson -from nf_core.modules.nfcore_module import NFCoreModule -from nf_core.utils import plural_s as _s log = logging.getLogger(__name__) -class ModuleLintException(Exception): - """Exception raised when there was an error with module linting""" - - pass - - -class LintResult: - """An object to hold the results of a lint test""" - - def __init__(self, mod, lint_test, message, file_path): - self.mod = mod - self.lint_test = lint_test - self.message = message - self.file_path = file_path - self.module_name = mod.module_name - - -class ModuleLint(ComponentCommand): +class ModuleLint(ComponentLint): """ An object for linting modules either in a clone of the 'nf-core/modules' repository or in any nf-core pipeline directory @@ -73,86 +49,16 @@ def __init__( hide_progress=False, ): super().__init__( - "modules", + component_type="modules", dir=dir, + fail_warned=fail_warned, remote_url=remote_url, branch=branch, no_pull=no_pull, + registry=registry, hide_progress=hide_progress, ) - self.fail_warned = fail_warned - self.passed = [] - self.warned = [] - self.failed = [] - self.lint_tests = self.get_all_lint_tests(self.repo_type == "pipeline") - - if self.repo_type == "pipeline": - modules_json = ModulesJson(self.dir) - modules_json.check_up_to_date() - self.all_remote_modules = [] - for repo_url, components in modules_json.get_all_components(self.component_type).items(): - if remote_url is not None and remote_url != repo_url: - continue - for org, comp in components: - self.all_remote_modules.append( - NFCoreModule( - comp, - repo_url, - Path(self.dir, self.component_type, org, comp), - self.repo_type, - Path(self.dir), - ) - ) - if not self.all_remote_modules: - raise LookupError(f"No modules from {self.modules_repo.remote_url} installed in pipeline.") - local_module_dir = Path(self.dir, "modules", "local") - self.all_local_modules = [] - if local_module_dir.exists(): - self.all_local_modules = [ - NFCoreModule( - m, None, Path(local_module_dir, m), self.repo_type, Path(self.dir), remote_module=False - ) - for m in self.get_local_components() - ] - self.config = nf_core.utils.fetch_wf_config(self.dir, cache_config=True) - else: - module_dir = Path(self.dir, self.default_modules_path) - self.all_remote_modules = [ - NFCoreModule(m, None, module_dir / m, self.repo_type, Path(self.dir)) - for m in self.get_components_clone_modules() - ] - self.all_local_modules = [] - if not self.all_remote_modules: - raise LookupError("No modules in 'modules' directory") - - # This could be better, perhaps glob for all nextflow.config files in? - self.config = nf_core.utils.fetch_wf_config(Path(self.dir).joinpath("tests", "config"), cache_config=True) - - if registry is None: - self.registry = self.config.get("docker.registry", "quay.io") - else: - self.registry = registry - log.debug(f"Registry set to {self.registry}") - - self.lint_config = None - self.modules_json = None - - @staticmethod - def get_all_lint_tests(is_pipeline): - if is_pipeline: - return [ - "module_patch", - "module_version", - "main_nf", - "meta_yml", - "module_todos", - "module_deprecations", - "module_changes", - ] - else: - return ["main_nf", "meta_yml", "module_todos", "module_deprecations", "module_tests"] - def lint( self, module=None, @@ -187,7 +93,7 @@ def lint( :returns: A ModuleLint object containing information of the passed, warned and failed tests """ - + # TODO: consider unifying modules and subworkflows lint() function and add it to the ComponentLint class # Prompt for module or all if module is None and not all_modules: questions = [ @@ -202,7 +108,7 @@ def lint( "name": "tool_name", "message": "Tool name:", "when": lambda x: x["all_modules"] == "Named module", - "choices": [m.module_name for m in self.all_remote_modules], + "choices": [m.component_name for m in self.all_remote_components], }, ] answers = questionary.unsafe_prompt(questions, style=nf_core.utils.nfcore_question_style) @@ -212,14 +118,14 @@ def lint( # Only lint the given module if module: if all_modules: - raise ModuleLintException("You cannot specify a tool and request all tools to be linted.") + raise LintException("You cannot specify a tool and request all tools to be linted.") local_modules = [] - remote_modules = [m for m in self.all_remote_modules if m.module_name == module] + remote_modules = [m for m in self.all_remote_components if m.component_name == module] if len(remote_modules) == 0: - raise ModuleLintException(f"Could not find the specified module: '{module}'") + raise LintException(f"Could not find the specified module: '{module}'") else: - local_modules = self.all_local_modules - remote_modules = self.all_remote_modules + local_modules = self.all_local_components + remote_modules = self.all_remote_components if self.repo_type == "modules": log.info(f"Linting modules repo: [magenta]'{self.dir}'") @@ -249,43 +155,17 @@ def lint( self._print_results(show_passed=show_passed, sort_by=sort_by) self.print_summary() - def set_up_pipeline_files(self): - self.load_lint_config() - self.modules_json = ModulesJson(self.dir) - self.modules_json.load() - - # Only continue if a lint config has been loaded - if self.lint_config: - for test_name in self.lint_tests: - if self.lint_config.get(test_name, {}) is False: - log.info(f"Ignoring lint test: {test_name}") - self.lint_tests.remove(test_name) - - def filter_tests_by_key(self, key): - """Filters the tests by the supplied key""" - # Check that supplied test keys exist - bad_keys = [k for k in key if k not in self.lint_tests] - if len(bad_keys) > 0: - raise AssertionError( - "Test name{} not recognised: '{}'".format( - _s(bad_keys), - "', '".join(bad_keys), - ) - ) - - # If -k supplied, only run these tests - self.lint_tests = [k for k in self.lint_tests if k in key] - def lint_modules(self, modules, registry="quay.io", local=False, fix_version=False): """ Lint a list of modules Args: - modules ([NFCoreModule]): A list of module objects + modules ([NFCoreComponent]): A list of module objects registry (str): The container registry to use. Should be quay.io in most situations. local (boolean): Whether the list consist of local or nf-core modules fix_version (boolean): Fix the module version if a newer version is available """ + # TODO: consider unifying modules and subworkflows lint_modules() function and add it to the ComponentLint class progress_bar = rich.progress.Progress( "[bold blue]{task.description}", rich.progress.BarColumn(bar_width=None), @@ -298,11 +178,11 @@ def lint_modules(self, modules, registry="quay.io", local=False, fix_version=Fal lint_progress = progress_bar.add_task( f"Linting {'local' if local else 'nf-core'} modules", total=len(modules), - test_name=modules[0].module_name, + test_name=modules[0].component_name, ) for mod in modules: - progress_bar.update(lint_progress, advance=1, test_name=mod.module_name) + progress_bar.update(lint_progress, advance=1, test_name=mod.component_name) self.lint_module(mod, progress_bar, registry=registry, local=local, fix_version=fix_version) def lint_module(self, mod, progress_bar, registry, local=False, fix_version=False): @@ -321,7 +201,7 @@ def lint_module(self, mod, progress_bar, registry, local=False, fix_version=Fals (repo_type==modules), files that are relevant for module testing are also examined """ - + # TODO: consider unifying modules and subworkflows lint_module() function and add it to the ComponentLint class # Only check the main script in case of a local module if local: self.main_nf(mod, fix_version, self.registry, progress_bar) @@ -348,118 +228,3 @@ def lint_module(self, mod, progress_bar, registry, local=False, fix_version=Fals self.failed += warned self.failed += [LintResult(mod, *m) for m in mod.failed] - - def _print_results(self, show_passed=False, sort_by="test"): - """Print linting results to the command line. - - Uses the ``rich`` library to print a set of formatted tables to the command line - summarising the linting results. - """ - - log.debug("Printing final results") - - sort_order = ["lint_test", "module_name", "message"] - if sort_by == "module": - sort_order = ["module_name", "lint_test", "message"] - - # Sort the results - self.passed.sort(key=operator.attrgetter(*sort_order)) - self.warned.sort(key=operator.attrgetter(*sort_order)) - self.failed.sort(key=operator.attrgetter(*sort_order)) - - # Find maximum module name length - max_mod_name_len = 40 - for tests in [self.passed, self.warned, self.failed]: - try: - for lint_result in tests: - max_mod_name_len = max(len(lint_result.module_name), max_mod_name_len) - except: - pass - - # Helper function to format test links nicely - def format_result(test_results, table): - """ - Given an list of error message IDs and the message texts, return a nicely formatted - string for the terminal with appropriate ASCII colours. - """ - # TODO: Row styles don't work current as table-level style overrides. - # I'd like to make an issue about this on the rich repo so leaving here in case there is a future fix - last_modname = False - even_row = False - for lint_result in test_results: - if last_modname and lint_result.module_name != last_modname: - even_row = not even_row - last_modname = lint_result.module_name - table.add_row( - Markdown(f"{lint_result.module_name}"), - os.path.relpath(lint_result.file_path, self.dir), - Markdown(f"{lint_result.message}"), - style="dim" if even_row else None, - ) - return table - - # Print blank line for spacing - console.print("") - - # Table of passed tests - if len(self.passed) > 0 and show_passed: - table = Table(style="green", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") - table.add_column("Module name", width=max_mod_name_len) - table.add_column("File path") - table.add_column("Test message") - table = format_result(self.passed, table) - console.print( - rich.panel.Panel( - table, - title=rf"[bold][✔] {len(self.passed)} Module Test{_s(self.passed)} Passed", - title_align="left", - style="green", - padding=0, - ) - ) - - # Table of warning tests - if len(self.warned) > 0: - table = Table(style="yellow", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") - table.add_column("Module name", width=max_mod_name_len) - table.add_column("File path") - table.add_column("Test message") - table = format_result(self.warned, table) - console.print( - rich.panel.Panel( - table, - title=rf"[bold][!] {len(self.warned)} Module Test Warning{_s(self.warned)}", - title_align="left", - style="yellow", - padding=0, - ) - ) - - # Table of failing tests - if len(self.failed) > 0: - table = Table(style="red", box=rich.box.MINIMAL, pad_edge=False, border_style="dim") - table.add_column("Module name", width=max_mod_name_len) - table.add_column("File path") - table.add_column("Test message") - table = format_result(self.failed, table) - console.print( - rich.panel.Panel( - table, - title=rf"[bold][✗] {len(self.failed)} Module Test{_s(self.failed)} Failed", - title_align="left", - style="red", - padding=0, - ) - ) - - def print_summary(self): - """Print a summary table to the console.""" - table = Table(box=rich.box.ROUNDED) - table.add_column("[bold green]LINT RESULTS SUMMARY", no_wrap=True) - table.add_row( - rf"[✔] {len(self.passed):>3} Test{_s(self.passed)} Passed", - style="green", - ) - table.add_row(rf"[!] {len(self.warned):>3} Test Warning{_s(self.warned)}", style="yellow") - table.add_row(rf"[✗] {len(self.failed):>3} Test{_s(self.failed)} Failed", style="red") - console.print(table) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index 18d95bd37e..deb47b5799 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -45,10 +45,10 @@ def main_nf(module_lint_object, module, fix_version, registry, progress_bar): lines = None if module.is_patched: lines = ModulesDiffer.try_apply_patch( - module.module_name, + module.component_name, module_lint_object.modules_repo.repo_path, module.patch_path, - Path(module.module_dir).relative_to(module.base_dir), + Path(module.component_dir).relative_to(module.base_dir), reverse=True, ).get("main.nf") if lines is None: @@ -346,8 +346,9 @@ def check_process_section(self, lines, registry, fix_version, progress_bar): if url is None: continue try: + container_url = "https://" + urlunparse(url) if not url.scheme == "https" else urlunparse(url) response = requests.head( - "https://" + urlunparse(url) if not url.scheme == "https" else urlunparse(url), + container_url, stream=True, allow_redirects=True, ) @@ -360,10 +361,10 @@ def check_process_section(self, lines, registry, fix_version, progress_bar): self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf)) continue if not response.ok: - self.failed.append( + self.warned.append( ( "container_links", - f"Unable to connect to {response.url}, status code: {response.status_code}", + f"Unable to connect to container registry, code: {response.status_code}, url: {response.url}", self.main_nf, ) ) diff --git a/nf_core/modules/lint/meta_yml.py b/nf_core/modules/lint/meta_yml.py index dd5e954f25..446cf6dbb8 100644 --- a/nf_core/modules/lint/meta_yml.py +++ b/nf_core/modules/lint/meta_yml.py @@ -25,10 +25,10 @@ def meta_yml(module_lint_object, module): meta_yaml = None if module.is_patched: lines = ModulesDiffer.try_apply_patch( - module.module_name, + module.component_name, module_lint_object.modules_repo.repo_path, module.patch_path, - Path(module.module_dir).relative_to(module.base_dir), + Path(module.component_dir).relative_to(module.base_dir), reverse=True, ).get("meta.yml") if lines is not None: @@ -59,7 +59,7 @@ def meta_yml(module_lint_object, module): module.failed.append( ( "meta_yml_valid", - f"The `meta.yml` of the module {module.module_name} is not valid: {e.message}.{hint}", + f"The `meta.yml` of the module {module.component_name} is not valid: {e.message}.{hint}", module.meta_yml, ) ) diff --git a/nf_core/modules/lint/module_changes.py b/nf_core/modules/lint/module_changes.py index 61b416e5f7..0f4c2aad25 100644 --- a/nf_core/modules/lint/module_changes.py +++ b/nf_core/modules/lint/module_changes.py @@ -27,10 +27,14 @@ def module_changes(module_lint_object, module): # the patch in reverse before comparing with the remote tempdir_parent = Path(tempfile.mkdtemp()) tempdir = tempdir_parent / "tmp_module_dir" - shutil.copytree(module.module_dir, tempdir) + shutil.copytree(module.component_dir, tempdir) try: new_lines = ModulesDiffer.try_apply_patch( - module.module_name, module_lint_object.modules_repo.repo_path, module.patch_path, tempdir, reverse=True + module.component_name, + module_lint_object.modules_repo.repo_path, + module.patch_path, + tempdir, + reverse=True, ) for file, lines in new_lines.items(): with open(tempdir / file, "w") as fh: @@ -39,19 +43,21 @@ def module_changes(module_lint_object, module): # This error is already reported by module_patch, so just return return else: - tempdir = module.module_dir + tempdir = module.component_dir module.branch = module_lint_object.modules_json.get_component_branch( - "modules", module.module_name, module.repo_url, module.org + "modules", module.component_name, module.repo_url, module.org ) modules_repo = nf_core.modules.modules_repo.ModulesRepo(remote_url=module.repo_url, branch=module.branch) - for f, same in modules_repo.module_files_identical(module.module_name, tempdir, module.git_sha).items(): + for f, same in modules_repo.component_files_identical( + module.component_name, tempdir, module.git_sha, "modules" + ).items(): if same: module.passed.append( ( "check_local_copy", "Local copy of module up to date", - f"{Path(module.module_dir, f)}", + f"{Path(module.component_dir, f)}", ) ) else: @@ -59,6 +65,6 @@ def module_changes(module_lint_object, module): ( "check_local_copy", "Local copy of module does not match remote", - f"{Path(module.module_dir, f)}", + f"{Path(module.component_dir, f)}", ) ) diff --git a/nf_core/modules/lint/module_deprecations.py b/nf_core/modules/lint/module_deprecations.py index 8ab5b68c2e..79a255bbf6 100644 --- a/nf_core/modules/lint/module_deprecations.py +++ b/nf_core/modules/lint/module_deprecations.py @@ -8,12 +8,12 @@ def module_deprecations(_, module): """ Check that the modules are up to the latest nf-core standard """ - module.wf_path = module.module_dir - if "functions.nf" in os.listdir(module.module_dir): + module.wf_path = module.component_dir + if "functions.nf" in os.listdir(module.component_dir): module.failed.append( ( "module_deprecations", "Deprecated file `functions.nf` found. No longer required for the latest nf-core/modules syntax!", - module.module_dir, + module.component_dir, ) ) diff --git a/nf_core/modules/lint/module_patch.py b/nf_core/modules/lint/module_patch.py index 6d91b44816..d52962eabb 100644 --- a/nf_core/modules/lint/module_patch.py +++ b/nf_core/modules/lint/module_patch.py @@ -1,10 +1,10 @@ from pathlib import Path +from ...components.nfcore_component import NFCoreComponent from ..modules_differ import ModulesDiffer -from ..nfcore_module import NFCoreModule -def module_patch(module_lint_obj, module: NFCoreModule): +def module_patch(module_lint_obj, module: NFCoreComponent): """ Lint a patch file found in a module @@ -34,7 +34,7 @@ def check_patch_valid(module, patch_path): file creation or deletion we issue a lint warning. Args: - module (NFCoreModule): The module currently being linted + module (NFCoreComponent): The module currently being linted patch_path (Path): The absolute path to the patch file. Returns: @@ -154,7 +154,7 @@ def patch_reversible(module_lint_object, module, patch_path): Try applying a patch in reverse to see if it is up to date Args: - module (NFCoreModule): The module currently being linted + module (NFCoreComponent): The module currently being linted patch_path (Path): The absolute path to the patch file. Returns: @@ -162,10 +162,10 @@ def patch_reversible(module_lint_object, module, patch_path): """ try: ModulesDiffer.try_apply_patch( - module.module_name, + module.component_name, module_lint_object.modules_repo.repo_path, patch_path, - Path(module.module_dir).relative_to(module.base_dir), + Path(module.component_dir).relative_to(module.base_dir), reverse=True, ) except LookupError: diff --git a/nf_core/modules/lint/module_tests.py b/nf_core/modules/lint/module_tests.py index 0b76acb944..212b378748 100644 --- a/nf_core/modules/lint/module_tests.py +++ b/nf_core/modules/lint/module_tests.py @@ -38,7 +38,7 @@ def module_tests(_, module): pytest_yml_path = os.path.join(module.base_dir, "tests", "config", "pytest_modules.yml") with open(pytest_yml_path, "r") as fh: pytest_yml = yaml.safe_load(fh) - if module.module_name in pytest_yml.keys(): + if module.component_name in pytest_yml.keys(): module.passed.append(("test_pytest_yml", "correct entry in pytest_modules.yml", pytest_yml_path)) else: module.failed.append(("test_pytest_yml", "missing entry in pytest_modules.yml", pytest_yml_path)) @@ -48,14 +48,13 @@ def module_tests(_, module): # Lint the test.yml file try: with open(module.test_yml, "r") as fh: - # TODO: verify that the tags are correct test_yml = yaml.safe_load(fh) # Verify that tags are correct all_tags_correct = True for test in test_yml: for tag in test["tags"]: - if not tag in [module.module_name, module.module_name.split("/")[0]]: + if not tag in [module.component_name, module.component_name.split("/")[0]]: all_tags_correct = False # Look for md5sums of empty files diff --git a/nf_core/modules/lint/module_todos.py b/nf_core/modules/lint/module_todos.py index b48725cd9e..ee12307512 100644 --- a/nf_core/modules/lint/module_todos.py +++ b/nf_core/modules/lint/module_todos.py @@ -33,11 +33,11 @@ def module_todos(_, module): """ # Main module directory - mod_results = pipeline_todos(None, root_dir=module.module_dir) + mod_results = pipeline_todos(None, root_dir=module.component_dir) for i, warning in enumerate(mod_results["warned"]): module.warned.append(("module_todo", warning, mod_results["file_paths"][i])) for i, passed in enumerate(mod_results["passed"]): - module.passed.append(("module_todo", passed, module.module_dir)) + module.passed.append(("module_todo", passed, module.component_dir)) # Module tests directory test_results = pipeline_todos(None, root_dir=module.test_dir) diff --git a/nf_core/modules/lint/module_version.py b/nf_core/modules/lint/module_version.py index 1cf142e8eb..d08658f5da 100644 --- a/nf_core/modules/lint/module_version.py +++ b/nf_core/modules/lint/module_version.py @@ -23,7 +23,7 @@ def module_version(module_lint_object, module): modules_json_path = Path(module_lint_object.dir, "modules.json") # Verify that a git_sha exists in the `modules.json` file for this module - version = module_lint_object.modules_json.get_module_version(module.module_name, module.repo_url, module.org) + version = module_lint_object.modules_json.get_module_version(module.component_name, module.repo_url, module.org) if version is None: module.failed.append(("git_sha", "No git_sha entry in `modules.json`", modules_json_path)) return @@ -34,14 +34,14 @@ def module_version(module_lint_object, module): # Check whether a new version is available try: module.branch = module_lint_object.modules_json.get_component_branch( - "modules", module.module_name, module.repo_url, module.org + "modules", module.component_name, module.repo_url, module.org ) modules_repo = nf_core.modules.modules_repo.ModulesRepo(remote_url=module.repo_url, branch=module.branch) - module_git_log = modules_repo.get_component_git_log(module.module_name, "modules") + module_git_log = modules_repo.get_component_git_log(module.component_name, "modules") if version == next(module_git_log)["git_sha"]: - module.passed.append(("module_version", "Module is the latest version", module.module_dir)) + module.passed.append(("module_version", "Module is the latest version", module.component_dir)) else: - module.warned.append(("module_version", "New version available", module.module_dir)) + module.warned.append(("module_version", "New version available", module.component_dir)) except UserWarning: - module.warned.append(("module_version", "Failed to fetch git log", module.module_dir)) + module.warned.append(("module_version", "Failed to fetch git log", module.component_dir)) diff --git a/nf_core/modules/modules_json.py b/nf_core/modules/modules_json.py index e9e77f65c7..9c3d1ae9b1 100644 --- a/nf_core/modules/modules_json.py +++ b/nf_core/modules/modules_json.py @@ -354,7 +354,11 @@ def find_correct_commit_sha(self, component_type, component_name, component_path for commit in modules_repo.get_component_git_log(component_name, component_type, depth=1000) ) for commit_sha in commit_shas: - if all(modules_repo.module_files_identical(component_name, component_path, commit_sha).values()): + if all( + modules_repo.component_files_identical( + component_name, component_path, commit_sha, component_type + ).values() + ): return commit_sha return None diff --git a/nf_core/modules/modules_utils.py b/nf_core/modules/modules_utils.py index 47826d3804..a5af06b996 100644 --- a/nf_core/modules/modules_utils.py +++ b/nf_core/modules/modules_utils.py @@ -3,7 +3,7 @@ import urllib from pathlib import Path -from .nfcore_module import NFCoreModule +from ..components.nfcore_component import NFCoreComponent log = logging.getLogger(__name__) @@ -81,10 +81,17 @@ def get_installed_modules(dir, repo_type="modules"): else: nfcore_modules.append(m) - # Make full (relative) file paths and create NFCoreModule objects + # Make full (relative) file paths and create NFCoreComponent objects local_modules = [os.path.join(local_modules_dir, m) for m in local_modules] nfcore_modules = [ - NFCoreModule(m, "nf-core/modules", Path(nfcore_modules_dir, m), repo_type=repo_type, base_dir=Path(dir)) + NFCoreComponent( + m, + "nf-core/modules", + Path(nfcore_modules_dir, m), + repo_type=repo_type, + base_dir=Path(dir), + component_type="modules", + ) for m in nfcore_modules ] diff --git a/nf_core/modules/nfcore_module.py b/nf_core/modules/nfcore_module.py deleted file mode 100644 index 431ef23381..0000000000 --- a/nf_core/modules/nfcore_module.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -The NFCoreModule class holds information and utility functions for a single module -""" -from pathlib import Path - - -class NFCoreModule: - """ - A class to hold the information about a nf-core module - Includes functionality for linting - """ - - def __init__(self, module_name, repo_url, module_dir, repo_type, base_dir, remote_module=True): - """ - Initialize the object - - Args: - module_dir (Path): The absolute path to the module - repo_type (str): Either 'pipeline' or 'modules' depending on - whether the directory is a pipeline or clone - of nf-core/modules. - base_dir (Path): The absolute path to the pipeline base dir - remote_module (bool): Whether the module is to be treated as a - nf-core or local module - """ - self.module_name = module_name - self.repo_url = repo_url - self.module_dir = module_dir - self.repo_type = repo_type - self.base_dir = base_dir - self.passed = [] - self.warned = [] - self.failed = [] - self.inputs = [] - self.outputs = [] - self.has_meta = False - self.git_sha = None - self.is_patched = False - - if remote_module: - # Initialize the important files - self.main_nf = self.module_dir / "main.nf" - self.meta_yml = self.module_dir / "meta.yml" - - repo_dir = self.module_dir.parts[: self.module_dir.parts.index(self.module_name.split("/")[0])][-1] - self.org = repo_dir - self.test_dir = Path(self.base_dir, "tests", "modules", repo_dir, self.module_name) - self.test_yml = self.test_dir / "test.yml" - self.test_main_nf = self.test_dir / "main.nf" - - if self.repo_type == "pipeline": - patch_fn = f"{self.module_name.replace('/', '-')}.diff" - patch_path = Path(self.module_dir, patch_fn) - if patch_path.exists(): - self.is_patched = True - self.patch_path = patch_path - else: - # The main file is just the local module - self.main_nf = self.module_dir - self.module_name = self.module_dir.stem - # These attributes are only used by nf-core modules - # so just initialize them to None - self.meta_yml = None - self.test_dir = None - self.test_yml = None - self.test_main_nf = None diff --git a/nf_core/modules/patch.py b/nf_core/modules/patch.py index 4890345052..198bb70de5 100644 --- a/nf_core/modules/patch.py +++ b/nf_core/modules/patch.py @@ -202,7 +202,9 @@ def remove(self, module): # Write changes to module.json self.modules_json.remove_patch_entry(module, self.modules_repo.remote_url, module_dir) - if not all(self.modules_repo.module_files_identical(module, module_path, module_version).values()): + if not all( + self.modules_repo.component_files_identical(module, module_path, module_version, "modules").values() + ): log.error( f"Module files do not appear to match the remote for the commit sha in the 'module.json': {module_version}\n" f"Recommend reinstalling with 'nf-core modules install --force --sha {module_version} {module}' " diff --git a/nf_core/modules/test_yml_builder.py b/nf_core/modules/test_yml_builder.py index 7ab9e464d4..3c23416fd4 100644 --- a/nf_core/modules/test_yml_builder.py +++ b/nf_core/modules/test_yml_builder.py @@ -177,7 +177,7 @@ def build_single_test(self, entry_point): # See https://github.com/nf-core/tools/issues/1562 default_val = ( f"nextflow run ./tests/modules/{self.org}/{self.module_name} -entry {entry_point} " - f"-c ./tests/config/nextflow.config -c ./tests/modules/{self.org}/{self.module_name}/nextflow.config" + f"-c ./tests/config/nextflow.config" ) if self.no_prompts: ep_test["command"] = default_val diff --git a/nf_core/params_file.py b/nf_core/params_file.py new file mode 100644 index 0000000000..39986b95c2 --- /dev/null +++ b/nf_core/params_file.py @@ -0,0 +1,278 @@ +""" Create a YAML parameter file """ + +from __future__ import print_function + +import json +import logging +import os +import textwrap +from typing import Literal, Optional + +import questionary +import rich +import rich.columns + +import nf_core.list +import nf_core.utils +from nf_core.schema import PipelineSchema + +log = logging.getLogger(__name__) + +INTRO = ( + "This is an example parameter file to pass to the `-params-file` option " + "of nextflow run with the {pipeline_name} pipeline." +) + +USAGE = "Uncomment lines with a single '#' if you want to pass the parameter " "to the pipeline." + +H1_SEPERATOR = "## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +H2_SEPERATOR = "## ----------------------------------------------------------------------------" + +ModeLiteral = Literal["both", "start", "end", "none"] + + +def _print_wrapped(text, fill_char="-", mode="both", width=80, indent=0, drop_whitespace=True): + """Helper function to format text for the params-file template. + + Args: + text (str): Text to print + fill_char (str, optional): + Character to use for creating dividers. Defaults to '-'. + mode (str, optional): + Where to place dividers. Defaults to "both". + width (int, optional): + Maximum line-width of the output text. Defaults to 80. + indent (int, optional): + Number of spaces to indent the text. Defaults to 0. + drop_whitespace (bool, optional): + Whether to drop whitespace from the start and end of lines. + """ + if len(fill_char) != 1: + raise ValueError("fill_char must be a single character") + + prefix = "## " + out = "" + + if mode in ("both", "start"): + out += prefix.ljust(width, fill_char) + "\n" + + wrap_indent = f"{prefix}{' ' * indent}" + + textlines = textwrap.wrap( + text, + width=width - len(prefix), + initial_indent=wrap_indent, + subsequent_indent=wrap_indent, + drop_whitespace=drop_whitespace, + ) + + for line in textlines: + out += line + "\n" + + if mode in ("both", "end"): + out += prefix.ljust(width, fill_char) + "\n" + + return out + + +class ParamsFileBuilder: + """Class to hold config option to launch a pipeline. + + Args: + pipeline (str, optional): + Path to a local pipeline path or a remote pipeline. + revision (str, optional): + Revision of the pipeline to use. + """ + + def __init__( + self, + pipeline=None, + revision=None, + ): + """Initialise the ParamFileBuilder class + + Args: + pipeline (str, optional): Path to a local pipeline path or a remote pipeline. + revision (str, optional): Revision of the pipeline to use. + """ + self.pipeline = pipeline + self.pipeline_revision = revision + self.schema_obj: Optional[PipelineSchema] = None + + # Fetch remote workflows + self.wfs = nf_core.list.Workflows() + self.wfs.get_remote_workflows() + + def get_pipeline(self): + """ + Prompt the user for a pipeline name and get the schema + """ + # Prompt for pipeline if not supplied + if self.pipeline is None: + launch_type = questionary.select( + "Generate parameter file for local pipeline " "or remote GitHub pipeline?", + choices=["Remote pipeline", "Local path"], + style=nf_core.utils.nfcore_question_style, + ).unsafe_ask() + + if launch_type == "Remote pipeline": + try: + self.pipeline = nf_core.utils.prompt_remote_pipeline_name(self.wfs) + except AssertionError as e: + log.error(e.args[0]) + return False + else: + self.pipeline = questionary.path( + "Path to workflow:", style=nf_core.utils.nfcore_question_style + ).unsafe_ask() + + # Get the schema + self.schema_obj = nf_core.schema.PipelineSchema() + self.schema_obj.get_schema_path(self.pipeline, local_only=False, revision=self.pipeline_revision) + self.schema_obj.get_wf_params() + + def format_group(self, definition, show_hidden=False): + """Format a group of parameters of the schema as commented YAML. + + Args: + definition (dict): Definition of the group from the schema + show_hidden (bool): Whether to include hidden parameters + + Returns: + str: Formatted output for a group + """ + out = "" + title = definition.get("title", definition) + description = definition.get("description", "") + properties = definition.get("properties") + + hidden_props = set() + for param_key, param_props in properties.items(): + if param_props.get("hidden", False): + hidden_props.add(param_key) + + out += _print_wrapped(title, "=", mode="both") + if description: + out += _print_wrapped(description, mode="none") + + out += "\n" + if len(hidden_props) > 0: + out += _print_wrapped(f"({len(hidden_props)} hidden parameters are not shown)", mode="none") + out += "\n\n" + + required_props = definition.get("required", []) + + for prop_key, props in properties.items(): + param_out = self.format_param(prop_key, props, required_props, show_hidden=show_hidden) + if param_out is not None: + out += param_out + out += "\n" + + return out + + def format_param(self, name, properties, required_properties=(), show_hidden=False): + """ + Format a single parameter of the schema as commented YAML + + Args: + name (str): Name of the parameter + properties (dict): Properties of the parameter + required_properties (list): List of required properties + show_hidden (bool): Whether to include hidden parameters + + Returns: + str: Section of a params-file.yml for given parameter + None: + If the parameter is skipped because it is hidden and + show_hidden is not set + """ + out = "" + hidden = properties.get("hidden", False) + + if not show_hidden and hidden: + return None + + description = properties.get("description", "") + self.schema_obj.get_schema_defaults() + default = properties.get("default") + typ = properties.get("type") + required = name in required_properties + + out += _print_wrapped(name, "-", mode="both") + + if description: + out += _print_wrapped(description + "\n", mode="none", indent=4) + + if typ: + out += _print_wrapped(f"Type: {typ}", mode="none", indent=4) + + out += _print_wrapped("\n", mode="end") + out += f"# {name} = {json.dumps(default)}\n" + + return out + + def generate_params_file(self, show_hidden=False): + """Generate the contents of a parameter template file. + + Assumes the pipeline has been fetched (if remote) and the schema loaded. + + Args: + show_hidden (bool): Whether to include hidden parameters + + Returns: + str: Formatted output for the pipeline schema + """ + schema = self.schema_obj.schema + pipeline_name = self.schema_obj.pipeline_manifest.get("name", self.pipeline) + pipeline_version = self.schema_obj.pipeline_manifest.get("version", "0.0.0") + + # Build the header section + out = "" + + out += _print_wrapped(f"{pipeline_name} {pipeline_version}", "~", mode="both", indent=4) + out += _print_wrapped(INTRO.format(pipeline_name=pipeline_name), " ", mode="none", indent=4) + out += _print_wrapped("\n", " ", mode="none", indent=4, drop_whitespace=False) + out += _print_wrapped(USAGE, "-", mode="end", indent=4) + out += "\n" + + # Add all parameter groups + for definition in schema.get("definitions", {}).values(): + out += self.format_group(definition, show_hidden=show_hidden) + out += "\n" + + return out + + def write_params_file(self, output_fn="nf-params.yaml", show_hidden=False, force=False): + """Build a template file for the pipeline schema. + + Args: + output_fn (str, optional): Filename to write the template to. + show_hidden (bool, optional): + Include parameters marked as hidden in the output + force (bool, optional): Whether to overwrite existing output file. + + Returns: + bool: True if the template was written successfully, False otherwise + """ + + self.get_pipeline() + + try: + self.schema_obj.load_schema() + self.schema_obj.validate_schema() + except AssertionError as e: + log.error(f'Pipeline schema file is invalid ("{self.schema_obj.schema_filename}"): {e}') + log.info("Please fix this file, then try again.") + return False + + schema_out = self.generate_params_file(show_hidden=show_hidden) + + if os.path.exists(output_fn) and not force: + log.error(f"File '{output_fn}' exists! Please delete first, or use '--force'") + return False + with open(output_fn, "w") as fh: + fh.write(schema_out) + log.info(f"Parameter file written to '{output_fn}'") + + return True diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index ea27a5843a..4ecfbfe335 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -2,6 +2,7 @@ "name": "nfcore", "image": "nfcore/gitpod:latest", "remoteUser": "gitpod", + "runArgs": ["--privileged"], // Configure tool-specific properties. "customizations": { diff --git a/nf_core/pipeline-template/.github/CONTRIBUTING.md b/nf_core/pipeline-template/.github/CONTRIBUTING.md index ecdda0f86b..6a1b9a9176 100644 --- a/nf_core/pipeline-template/.github/CONTRIBUTING.md +++ b/nf_core/pipeline-template/.github/CONTRIBUTING.md @@ -11,7 +11,9 @@ Contributions to the code are even more welcome ;) {% if branded -%} -> If you need help using or modifying {{ name }} then the best place to ask is on the nf-core Slack [#{{ short_name }}](https://nfcore.slack.com/channels/{{ short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). +:::info +If you need help using or modifying {{ name }} then the best place to ask is on the nf-core Slack [#{{ short_name }}](https://nfcore.slack.com/channels/{{ short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). +::: {% endif -%} diff --git a/nf_core/pipeline-template/.github/workflows/linting.yml b/nf_core/pipeline-template/.github/workflows/linting.yml index 8cf670e808..29fc466ed6 100644 --- a/nf_core/pipeline-template/.github/workflows/linting.yml +++ b/nf_core/pipeline-template/.github/workflows/linting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.11" architecture: "x64" - name: Install dependencies diff --git a/nf_core/pipeline-template/.github/workflows/release-announcments.yml b/nf_core/pipeline-template/.github/workflows/release-announcments.yml new file mode 100644 index 0000000000..ad497db4e1 --- /dev/null +++ b/nf_core/pipeline-template/.github/workflows/release-announcments.yml @@ -0,0 +1,68 @@ +name: release-announcements +# Automatic release toot and tweet anouncements{%- raw %} +on: + release: + types: [published] + workflow_dispatch: + +jobs: + toot: + runs-on: ubuntu-latest + steps: + - uses: rzr/fediverse-action@master + with: + access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} + host: "mstdn.science" # custom host if not "mastodon.social" (default) + # GitHub event payload + # 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 }}! + + Please see the changelog: ${{ github.event.release.html_url }} + + send-tweet: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install tweepy==4.14.0 + - name: Send tweet + shell: python + run: | + import os + import tweepy + + client = tweepy.Client( + access_token=os.getenv("TWITTER_ACCESS_TOKEN"), + access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"), + consumer_key=os.getenv("TWITTER_CONSUMER_KEY"), + consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"), + ) + tweet = os.getenv("TWEET") + client.create_tweet(text=tweet) + env: + TWEET: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + + bsky-post: + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@v0.0.2 + with: + post: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + #{%- endraw %} diff --git a/nf_core/pipeline-template/CITATIONS.md b/nf_core/pipeline-template/CITATIONS.md index ceaba0cb5f..6edf8f620c 100644 --- a/nf_core/pipeline-template/CITATIONS.md +++ b/nf_core/pipeline-template/CITATIONS.md @@ -12,7 +12,7 @@ - [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) - > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. Available online https://www.bioinformatics.babraham.ac.uk/projects/fastqc/. + > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. - [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) diff --git a/nf_core/pipeline-template/CODE_OF_CONDUCT.md b/nf_core/pipeline-template/CODE_OF_CONDUCT.md index f4fd052f1f..c089ec78c4 100644 --- a/nf_core/pipeline-template/CODE_OF_CONDUCT.md +++ b/nf_core/pipeline-template/CODE_OF_CONDUCT.md @@ -1,18 +1,20 @@ -# Code of Conduct at nf-core (v1.0) +# Code of Conduct at nf-core (v1.4) ## Our Pledge -In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core, pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: +In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: - Age +- Ability - Body size +- Caste - Familial status - Gender identity and expression - Geographical location - Level of experience - Nationality and national origins - Native language -- Physical and neurological ability +- Neurodiversity - Race or ethnicity - Religion - Sexual identity and orientation @@ -22,80 +24,133 @@ Please note that the list above is alphabetised and is therefore not ranked in a ## Preamble -> Note: This Code of Conduct (CoC) has been drafted by the nf-core Safety Officer and been edited after input from members of the nf-core team and others. "We", in this document, refers to the Safety Officer and members of the nf-core core team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will amended periodically to keep it up-to-date, and in case of any dispute, the most current version will apply. +:::note +This Code of Conduct (CoC) has been drafted by Renuka Kudva, Cris Tuñí, and Michael Heuer, with input from the nf-core Core Team and Susanna Marquez from the nf-core community. "We", in this document, refers to the Safety Officers and members of the nf-core Core Team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will be amended periodically to keep it up-to-date. In case of any dispute, the most current version will apply. +::: -An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). Our current safety officer is Renuka Kudva. +An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). + +Our Safety Officers are Saba Nafees, Cris Tuñí, and Michael Heuer. nf-core is a young and growing community that welcomes contributions from anyone with a shared vision for [Open Science Policies](https://www.fosteropenscience.eu/taxonomy/term/8). Open science policies encompass inclusive behaviours and we strive to build and maintain a safe and inclusive environment for all individuals. -We have therefore adopted this code of conduct (CoC), which we require all members of our community and attendees in nf-core events to adhere to in all our workspaces at all times. Workspaces include but are not limited to Slack, meetings on Zoom, Jitsi, YouTube live etc. +We have therefore adopted this CoC, which we require all members of our community and attendees of nf-core events to adhere to in all our workspaces at all times. Workspaces include, but are not limited to, Slack, meetings on Zoom, gather.town, YouTube live etc. -Our CoC will be strictly enforced and the nf-core team reserve the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. +Our CoC will be strictly enforced and the nf-core team reserves the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. -We ask all members of our community to help maintain a supportive and productive workspace and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. +We ask all members of our community to help maintain supportive and productive workspaces and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. -Questions, concerns or ideas on what we can include? Contact safety [at] nf-co [dot] re +Questions, concerns, or ideas on what we can include? Contact members of the Safety Team on Slack or email safety [at] nf-co [dot] re. ## Our Responsibilities -The safety officer is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. +Members of the Safety Team (the Safety Officers) are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. -The safety officer in consultation with the nf-core core team have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +The Safety Team, in consultation with the nf-core core team, have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this CoC, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Members of the core team or the safety officer who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and be subject to the same actions as others in violation of the CoC. +Members of the core team or the Safety Team who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and will be subject to the same actions as others in violation of the CoC. -## When are where does this Code of Conduct apply? +## When and where does this Code of Conduct apply? -Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events. This includes but is not limited to the following listed alphabetically and therefore in no order of preference: +Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events, such as hackathons, workshops, bytesize, and collaborative workspaces on gather.town. These guidelines include, but are not limited to, the following (listed alphabetically and therefore in no order of preference): - Communicating with an official project email address. - Communicating with community members within the nf-core Slack channel. - Participating in hackathons organised by nf-core (both online and in-person events). -- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence. -- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, Jitsi, YouTube live etc. +- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence, and on the nf-core gather.town workspace. +- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, gather.town, Jitsi, YouTube live etc. - Representing nf-core on social media. This includes both official and personal accounts. ## nf-core cares 😊 -nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include but are not limited to the following (listed in alphabetical order): +nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include, but are not limited to, the following (listed in alphabetical order): - Ask for consent before sharing another community member’s personal information (including photographs) on social media. - Be respectful of differing viewpoints and experiences. We are all here to learn from one another and a difference in opinion can present a good learning opportunity. -- Celebrate your accomplishments at events! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) +- Celebrate your accomplishments! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) - Demonstrate empathy towards other community members. (We don’t all have the same amount of time to dedicate to nf-core. If tasks are pending, don’t hesitate to gently remind members of your team. If you are leading a task, ask for help if you feel overwhelmed.) - Engage with and enquire after others. (This is especially important given the geographically remote nature of the nf-core community, so let’s do this the best we can) - Focus on what is best for the team and the community. (When in doubt, ask) -- Graciously accept constructive criticism, yet be unafraid to question, deliberate, and learn. +- Accept feedback, yet be unafraid to question, deliberate, and learn. - Introduce yourself to members of the community. (We’ve all been outsiders and we know that talking to strangers can be hard for some, but remember we’re interested in getting to know you and your visions for open science!) -- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communications to be kind.**) +- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communication to be kind.**) - Take breaks when you feel like you need them. -- Using welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack.) +- Use welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack) ## nf-core frowns on 😕 -The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this code of conduct. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces. +The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this CoC. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces: - Deliberate intimidation, stalking or following and sustained disruption of communication among participants of the community. This includes hijacking shared screens through actions such as using the annotate tool in conferencing software such as Zoom. - “Doxing” i.e. posting (or threatening to post) another person’s personal identifying information online. - Spamming or trolling of individuals on social media. -- Use of sexual or discriminatory imagery, comments, or jokes and unwelcome sexual attention. -- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion or work experience. +- Use of sexual or discriminatory imagery, comments, jokes, or unwelcome sexual attention. +- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion, or work experience. ### Online Trolling -The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the added issue of online trolling. This is unacceptable, reports of such behaviour will be taken very seriously, and perpetrators will be excluded from activities immediately. +The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the risk of online trolling. This is unacceptable — reports of such behaviour will be taken very seriously and perpetrators will be excluded from activities immediately. -All community members are required to ask members of the group they are working within for explicit consent prior to taking screenshots of individuals during video calls. +All community members are **required** to ask members of the group they are working with for explicit consent prior to taking screenshots of individuals during video calls. -## Procedures for Reporting CoC violations +## Procedures for reporting CoC violations If someone makes you feel uncomfortable through their behaviours or actions, report it as soon as possible. -You can reach out to members of the [nf-core core team](https://nf-co.re/about) and they will forward your concerns to the safety officer(s). +You can reach out to members of the Safety Team (Saba Nafees, Cris Tuñí, and Michael Heuer) on Slack. Alternatively, contact a member of the nf-core core team [nf-core core team](https://nf-co.re/about), and they will forward your concerns to the Safety Team. + +Issues directly concerning members of the Core Team or the Safety Team will be dealt with by other members of the core team and the safety manager — possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson and details will be shared in due course. + +All reports will be handled with the utmost discretion and confidentiality. + +You can also report any CoC violations to safety [at] nf-co [dot] re. In your email report, please do your best to include: + +- Your contact information. +- Identifying information (e.g. names, nicknames, pseudonyms) of the participant who has violated the Code of Conduct. +- The behaviour that was in violation and the circumstances surrounding the incident. +- The approximate time of the behaviour (if different than the time the report was made). +- Other people involved in the incident, if applicable. +- If you believe the incident is ongoing. +- If there is a publicly available record (e.g. mailing list record, a screenshot). +- Any additional information. + +After you file a report, one or more members of our Safety Team will contact you to follow up on your report. + +## Who will read and handle reports + +All reports will be read and handled by the members of the Safety Team at nf-core. + +If members of the Safety Team are deemed to have a conflict of interest with a report, they will be required to recuse themselves as per our Code of Conduct and will not have access to any follow-ups. + +To keep this first report confidential from any of the Safety Team members, please submit your first report by direct messaging on Slack/direct email to any of the nf-core members you are comfortable disclosing the information to, and be explicit about which member(s) you do not consent to sharing the information with. + +## Reviewing reports + +After receiving the report, members of the Safety Team will review the incident report to determine whether immediate action is required, for example, whether there is immediate threat to participants’ safety. + +The Safety Team, in consultation with members of the nf-core core team, will assess the information to determine whether the report constitutes a Code of Conduct violation, for them to decide on a course of action. + +In the case of insufficient information, one or more members of the Safety Team may contact the reporter, the reportee, or any other attendees to obtain more information. -Issues directly concerning members of the core team will be dealt with by other members of the core team and the safety manager, and possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson, and details will be shared in due course. +Once additional information is gathered, the Safety Team will collectively review and decide on the best course of action to take, if any. The Safety Team reserves the right to not act on a report. -All reports will be handled with utmost discretion and confidentially. +## Confidentiality + +All reports, and any additional information included, are only shared with the team of safety officers (and possibly members of the core team, in case the safety officer is in violation of the CoC). We will respect confidentiality requests for the purpose of protecting victims of abuse. + +We will not name harassment victims, beyond discussions between the safety officer and members of the nf-core team, without the explicit consent of the individuals involved. + +## Enforcement + +Actions taken by the nf-core’s Safety Team may include, but are not limited to: + +- Asking anyone to stop a behaviour. +- Asking anyone to leave the event and online spaces either temporarily, for the remainder of the event, or permanently. +- Removing access to the gather.town and Slack, either temporarily or permanently. +- Communicating to all participants to reinforce our expectations for conduct and remind what is unacceptable behaviour; this may be public for practical reasons. +- Communicating to all participants that an incident has taken place and how we will act or have acted — this may be for the purpose of letting event participants know we are aware of and dealing with the incident. +- Banning anyone from participating in nf-core-managed spaces, future events, and activities, either temporarily or permanently. +- No action. ## Attribution and Acknowledgements @@ -106,6 +161,22 @@ All reports will be handled with utmost discretion and confidentially. ## Changelog -### v1.0 - March 12th, 2021 +### v1.4 - February 8th, 2022 + +- Included a new member of the Safety Team. Corrected a typographical error in the text. + +### v1.3 - December 10th, 2021 + +- Added a statement that the CoC applies to nf-core gather.town workspaces. Corrected typographical errors in the text. + +### v1.2 - November 12th, 2021 + +- Removed information specific to reporting CoC violations at the Hackathon in October 2021. + +### v1.1 - October 14th, 2021 + +- Updated with names of new Safety Officers and specific information for the hackathon in October 2021. + +### v1.0 - March 15th, 2021 - Complete rewrite from original [Contributor Covenant](http://contributor-covenant.org/) CoC. diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index e66746dcd5..cddf8d13c6 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -3,7 +3,7 @@ # ![{{ name }}](docs/images/{{ logo_light }}#gh-light-mode-only) ![{{ name }}](docs/images/{{ logo_dark }}#gh-dark-mode-only) {% endif -%} -{% if gh_badges -%} +{% if github_badges -%} [![GitHub Actions CI Status](https://github.com/{{ name }}/workflows/nf-core%20CI/badge.svg)](https://github.com/{{ name }}/actions?query=workflow%3A%22nf-core+CI%22) [![GitHub Actions Linting Status](https://github.com/{{ name }}/workflows/nf-core%20linting/badge.svg)](https://github.com/{{ name }}/actions?query=workflow%3A%22nf-core+linting%22){% endif -%} {% if branded -%}[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/{{ short_name }}/results){% endif -%} @@ -43,10 +43,11 @@ ## Usage -> **Note** -> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how -> to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) -> with `-profile test` before running the workflow on actual data. +:::note +If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how +to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) +with `-profile test` before running the workflow on actual data. +::: + + This lint test runs through all files in the subworkflows and searches for these lines. + If any are found they will throw a warning. + + .. tip:: Note that many GUI code editors have plugins to list all instances of *TODO* + in a given project directory. This is a very quick and convenient way to get + started on your pipeline! + + """ + + # Main subworkflow directory + swf_results = pipeline_todos(None, root_dir=subworkflow.component_dir) + for i, warning in enumerate(swf_results["warned"]): + subworkflow.warned.append(("subworkflow_todo", warning, swf_results["file_paths"][i])) + for i, passed in enumerate(swf_results["passed"]): + subworkflow.passed.append(("subworkflow_todo", passed, subworkflow.component_dir)) + + # Module tests directory + test_results = pipeline_todos(None, root_dir=subworkflow.test_dir) + for i, warning in enumerate(test_results["warned"]): + subworkflow.warned.append(("subworkflow_todo", warning, test_results["file_paths"][i])) + for i, passed in enumerate(test_results["passed"]): + subworkflow.passed.append(("subworkflow_todo", passed, subworkflow.test_dir)) diff --git a/nf_core/subworkflows/lint/subworkflow_version.py b/nf_core/subworkflows/lint/subworkflow_version.py new file mode 100644 index 0000000000..5801abd885 --- /dev/null +++ b/nf_core/subworkflows/lint/subworkflow_version.py @@ -0,0 +1,53 @@ +""" +Verify that a subworkflow has a correct entry in the modules.json file +""" + +import logging +from pathlib import Path + +import nf_core +import nf_core.modules.modules_repo +import nf_core.modules.modules_utils + +log = logging.getLogger(__name__) + + +def subworkflow_version(subworkflow_lint_object, subworkflow): + """ + Verifies that the subworkflow has a version specified in the ``modules.json`` file + + It checks whether the subworkflow has an entry in the ``modules.json`` file + containing a commit SHA. If that is true, it verifies that there are no + newer version of the subworkflow available. + """ + + modules_json_path = Path(subworkflow_lint_object.dir, "modules.json") + # Verify that a git_sha exists in the `modules.json` file for this module + version = subworkflow_lint_object.modules_json.get_subworkflow_version( + subworkflow.component_name, subworkflow.repo_url, subworkflow.org + ) + if version is None: + subworkflow.failed.append(("git_sha", "No git_sha entry in `modules.json`", modules_json_path)) + return + + subworkflow.git_sha = version + subworkflow.passed.append(("git_sha", "Found git_sha entry in `modules.json`", modules_json_path)) + + # Check whether a new version is available + try: + subworkflow.branch = subworkflow_lint_object.modules_json.get_component_branch( + "subworkflows", subworkflow.component_name, subworkflow.repo_url, subworkflow.org + ) + modules_repo = nf_core.modules.modules_repo.ModulesRepo( + remote_url=subworkflow.repo_url, branch=subworkflow.branch + ) + + subworkflow_git_log = modules_repo.get_component_git_log(subworkflow.component_name, "subworkflows") + if version == next(subworkflow_git_log)["git_sha"]: + subworkflow.passed.append( + ("subworkflow_version", "Subworkflow is in the latest version", subworkflow.component_dir) + ) + else: + subworkflow.warned.append(("subworkflow_version", "New version available", subworkflow.component_dir)) + except UserWarning: + subworkflow.warned.append(("subworkflow_version", "Failed to fetch git log", subworkflow.component_dir)) diff --git a/nf_core/subworkflows/test_yml_builder.py b/nf_core/subworkflows/test_yml_builder.py index 2ad50d4e25..468465c9df 100644 --- a/nf_core/subworkflows/test_yml_builder.py +++ b/nf_core/subworkflows/test_yml_builder.py @@ -185,7 +185,7 @@ def build_single_test(self, entry_point): while len(ep_test["tags"]) == 0: tag_defaults = ["subworkflows"] tag_defaults.append("subworkflows/" + self.subworkflow) - tag_defaults += self.parse_module_tags() + tag_defaults += self.parse_module_tags(self.subworkflow_dir) if self.no_prompts: ep_test["tags"] = sorted(tag_defaults) else: @@ -199,12 +199,12 @@ def build_single_test(self, entry_point): return ep_test - def parse_module_tags(self): + def parse_module_tags(self, subworkflow_dir): """ - Parse the subworkflow test main.nf file to retrieve all imported modules for adding tags. + Parse the subworkflow main.nf file to retrieve all imported modules for adding tags. """ tags = [] - with open(Path(self.subworkflow_dir, "main.nf"), "r") as fh: + with open(Path(subworkflow_dir, "main.nf"), "r") as fh: for line in fh: regex = re.compile( r"include(?: *{ *)([a-zA-Z\_0-9]*)(?: *as *)?(?:[a-zA-Z\_0-9]*)?(?: *})(?: *from *)(?:'|\")(.*)(?:'|\")" diff --git a/nf_core/sync.py b/nf_core/sync.py index 332b524cbb..5402a6121d 100644 --- a/nf_core/sync.py +++ b/nf_core/sync.py @@ -8,9 +8,11 @@ import shutil import git +import questionary import requests import requests_cache import rich +import yaml from git import GitCommandError, InvalidGitRepositoryError import nf_core @@ -42,6 +44,7 @@ class PipelineSync: make_pr (bool): Set this to `True` to create a GitHub pull-request with the changes gh_username (str): GitHub username gh_repo (str): GitHub repository name + template_yaml_path (str): Path to template.yml file for pipeline creation settings. DEPRECATED Attributes: pipeline_dir (str): Path to target pipeline directory @@ -52,7 +55,6 @@ class PipelineSync: required_config_vars (list): List of nextflow variables required to make template pipeline gh_username (str): GitHub username gh_repo (str): GitHub repository name - template_yaml (str): Path to template.yml file for pipeline creation settings. """ def __init__( @@ -80,11 +82,28 @@ def __init__( self.gh_repo = gh_repo self.pr_url = "" - self.template_yaml_path = template_yaml_path - # Save contents of template.yml for using outside of git. - if self.template_yaml_path is not None: - with open(self.template_yaml_path, "r") as template_yaml: - self.template_yaml_cache = template_yaml.read() + self.config_yml_path, self.config_yml = nf_core.utils.load_tools_config(self.pipeline_dir) + + # Throw deprecation warning if template_yaml_path is set + if template_yaml_path is not None: + log.warning( + f"The `template_yaml_path` argument is deprecated. Saving pipeline creation settings in .nf-core.yml instead. Please remove {template_yaml_path} file." + ) + if "template" in self.config_yml: + overwrite_template = questionary.confirm( + f"A template section already exists in '{self.config_yml_path}'. Do you want to overwrite?", + style=nf_core.utils.nfcore_question_style, + default=False, + ).unsafe_ask() + if overwrite_template or "template" not in self.config_yml: + with open(template_yaml_path, "r") as f: + self.config_yml["template"] = yaml.safe_load(f) + with open(self.config_yml_path, "w") as fh: + yaml.safe_dump(self.config_yml, fh) + log.info(f"Saved pipeline creation settings to '{self.config_yml_path}'") + raise SystemExit( + f"Please commit your changes and delete the {template_yaml_path} file. Then run the sync command again." + ) # Set up the API auth if supplied on the command line self.gh_api = nf_core.utils.gh_api @@ -213,7 +232,7 @@ def delete_template_branch_files(self): # Delete everything log.info("Deleting all files in 'TEMPLATE' branch") for the_file in os.listdir(self.pipeline_dir): - if the_file == ".git" or the_file == self.template_yaml_path: + if the_file == ".git": continue file_path = os.path.join(self.pipeline_dir, the_file) log.debug(f"Deleting {file_path}") @@ -234,10 +253,10 @@ def make_template_pipeline(self): # Only show error messages from pipeline creation logging.getLogger("nf_core.create").setLevel(logging.ERROR) - # Re-write the template yaml from cache which may have been updated - if self.template_yaml_path and self.template_yaml_cache: - with open(self.template_yaml_path, "w") as template_path: - template_path.write(self.template_yaml_cache) + # Re-write the template yaml info from .nf-core.yml config + if "template" in self.config_yml: + with open(self.config_yml_path, "w") as config_path: + yaml.safe_dump(self.config_yml, config_path) try: nf_core.create.PipelineCreate( @@ -248,13 +267,9 @@ def make_template_pipeline(self): force=True, outdir=self.pipeline_dir, author=self.wf_config["manifest.author"].strip('"').strip("'"), - template_yaml_path=self.template_yaml_path, plain=True, ).init_pipeline() except Exception as err: - if self.template_yaml_path: - # If sync fails, remove template_yaml_path before raising error. - os.remove(self.template_yaml_path) # Reset to where you were to prevent git getting messed up. self.repo.git.reset("--hard") raise SyncException(f"Failed to rebuild pipeline from template with error:\n{err}") @@ -338,7 +353,7 @@ def make_pull_request(self): f"resolving any merge conflicts in the `{self.merge_branch}` branch (or your own fork, if you prefer). " "Once complete, make a new minor release of your pipeline.\n\n" "For instructions on how to merge this PR, please see " - "[https://nf-co.re/developers/sync](https://nf-co.re/developers/sync#merging-automated-prs).\n\n" + "[https://nf-co.re/docs/contributing/sync/](https://nf-co.re/docs/contributing/sync/#merging-automated-prs).\n\n" "For more information about this release of [nf-core/tools](https://github.com/nf-core/tools), " "please see the `v{tag}` [release page](https://github.com/nf-core/tools/releases/tag/{tag})." ).format(tag=nf_core.__version__) diff --git a/nf_core/synced_repo.py b/nf_core/synced_repo.py index f78142c031..41e0853f2e 100644 --- a/nf_core/synced_repo.py +++ b/nf_core/synced_repo.py @@ -281,12 +281,12 @@ def install_component(self, component_name, install_dir, commit, component_type) self.checkout_branch() return True - def module_files_identical(self, module_name, base_path, commit): + def component_files_identical(self, component_name, base_path, commit, component_type): """ - Checks whether the module files in a pipeline are identical to the ones in the remote + Checks whether the module or subworkflow files in a pipeline are identical to the ones in the remote Args: - module_name (str): The name of the module - base_path (str): The path to the module in the pipeline + component_name (str): The name of the module or subworkflow + base_path (str): The path to the module/subworkflow in the pipeline Returns: (bool): Whether the pipeline files are identical to the repo files @@ -295,14 +295,14 @@ def module_files_identical(self, module_name, base_path, commit): self.checkout_branch() else: self.checkout(commit) - module_files = ["main.nf", "meta.yml"] - files_identical = {file: True for file in module_files} - module_dir = self.get_component_dir(module_name, "modules") - for file in module_files: + component_files = ["main.nf", "meta.yml"] + files_identical = {file: True for file in component_files} + component_dir = self.get_component_dir(component_name, component_type) + for file in component_files: try: - files_identical[file] = filecmp.cmp(os.path.join(module_dir, file), os.path.join(base_path, file)) + files_identical[file] = filecmp.cmp(os.path.join(component_dir, file), os.path.join(base_path, file)) except FileNotFoundError: - log.debug(f"Could not open file: {os.path.join(module_dir, file)}") + log.debug(f"Could not open file: {os.path.join(component_dir, file)}") continue self.checkout_branch() return files_identical diff --git a/nf_core/utils.py b/nf_core/utils.py index 31738edabe..8b73a10921 100644 --- a/nf_core/utils.py +++ b/nf_core/utils.py @@ -733,6 +733,7 @@ def get_tag_date(tag_date): # Obtain common builds from Docker and Singularity images common_keys = list(all_docker.keys() & all_singularity.keys()) current_date = None + docker_image_name = docker_image["image_name"].lstrip("quay.io/") if docker_image is not None else None for k in common_keys: # Get the most recent common image date = max(all_docker[k]["date"], all_docker[k]["date"]) diff --git a/setup.py b/setup.py index 8e384ef21a..c04d9fd0b1 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup -version = "2.9" +version = "2.10" with open("README.md") as f: readme = f.read() diff --git a/tests/data/mock_module_containers/modules/mock_docker_single_quay_io.nf b/tests/data/mock_module_containers/modules/mock_docker_single_quay_io.nf new file mode 100644 index 0000000000..fad0e26e3d --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_docker_single_quay_io.nf @@ -0,0 +1,8 @@ +process MOCK { + label 'process_fake' + + conda (params.enable_conda ? "bioconda::singlequay=1.9" : null) + container "quay.io/biocontainers/singlequay:1.9--pyh9f0ad1d_0" + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var1.nf b/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var1.nf new file mode 100644 index 0000000000..c92f69b42c --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var1.nf @@ -0,0 +1,10 @@ +process MOCK { + label 'process_fake' + + conda "bioconda::dsltwoapptainervarone=1.1.0" + container "${ (workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer') && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/dsltwoapptainervarone:1.1.0--py38h7be5676_2': + 'biocontainers/dsltwoapptainervarone:1.1.0--py38h7be5676_2' }" + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var2.nf b/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var2.nf new file mode 100644 index 0000000000..412c73d285 --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_apptainer_var2.nf @@ -0,0 +1,10 @@ +process MOCK { + label 'process_fake' + + conda "bioconda::dsltwoapptainervartwo=1.1.0" + container "${ ['singularity', 'apptainer'].contains(workflow.containerEngine) && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/dsltwoapptainervartwo:1.1.0--hdfd78af_0': + 'biocontainers/dsltwoapptainervartwo:1.1.0--hdfd78af_0' }" + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_current.nf b/tests/data/mock_module_containers/modules/mock_dsl2_current.nf new file mode 100644 index 0000000000..65cd8086ac --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_current.nf @@ -0,0 +1,10 @@ +process MOCK { + label 'process_fake' + + conda "bioconda::dsltwocurrent=1.2.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/dsltwocurrent:1.2.1--pyhdfd78af_0': + 'biocontainers/dsltwocurrent:1.2.1--pyhdfd78af_0' }" + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_current_inverted.nf b/tests/data/mock_module_containers/modules/mock_dsl2_current_inverted.nf new file mode 100644 index 0000000000..d5a369c742 --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_current_inverted.nf @@ -0,0 +1,10 @@ +process MOCK { + label 'process_fake' + + conda "bioconda::dsltwocurrentinv=3.3.2" + container "${ !workflow.containerEngine == 'singularity' && task.ext.singularity_pull_docker_container ? + 'biocontainers/dsltwocurrentinv:3.3.2--h1b792b2_1' : + 'https://depot.galaxyproject.org/singularity/dsltwocurrentinv:3.3.2--h1b792b2_1' }" + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_old.nf b/tests/data/mock_module_containers/modules/mock_dsl2_old.nf new file mode 100644 index 0000000000..11eace3b1c --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_old.nf @@ -0,0 +1,12 @@ +process MOCK { + label 'process_fake' + + conda (params.enable_conda ? "bioconda::dsltwoold=0.23.0" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/dsltwoold:0.23.0--0" + } else { + container "quay.io/biocontainers/dsltwoold:0.23.0--0" + } + + // truncated +} diff --git a/tests/data/mock_module_containers/modules/mock_dsl2_variable.nf b/tests/data/mock_module_containers/modules/mock_dsl2_variable.nf new file mode 100644 index 0000000000..561254069a --- /dev/null +++ b/tests/data/mock_module_containers/modules/mock_dsl2_variable.nf @@ -0,0 +1,19 @@ +process STAR_ALIGN { + // from rnaseq 3.7 + label 'process_fake' + + conda (params.enable_conda ? conda_str : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + "https://depot.galaxyproject.org/singularity/${container_id}" : + "quay.io/biocontainers/${container_id}" }" + + + // Note: 2.7X indices incompatible with AWS iGenomes so use older STAR version + conda_str = "bioconda::star=2.7.10a bioconda::samtools=1.15.1 conda-forge::gawk=5.1.0" + container_id = 'mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:afaaa4c6f5b308b4b6aa2dd8e99e1466b2a6b0cd-0' + if (is_aws_igenome) { + conda_str = "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" + container_id = 'mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' + } + +} diff --git a/tests/subworkflows/lint.py b/tests/subworkflows/lint.py new file mode 100644 index 0000000000..d754985265 --- /dev/null +++ b/tests/subworkflows/lint.py @@ -0,0 +1,57 @@ +import pytest + +import nf_core.subworkflows + +from ..utils import GITLAB_URL + + +def test_subworkflows_lint(self): + """Test linting the fastq_align_bowtie2 subworkflow""" + self.subworkflow_install.install("fastq_align_bowtie2") + subworkflow_lint = nf_core.subworkflows.SubworkflowLint(dir=self.pipeline_dir) + subworkflow_lint.lint(print_results=False, subworkflow="fastq_align_bowtie2") + assert len(subworkflow_lint.failed) == 0, f"Linting failed with {[x.__dict__ for x in subworkflow_lint.failed]}" + assert len(subworkflow_lint.passed) > 0 + assert len(subworkflow_lint.warned) >= 0 + + +def test_subworkflows_lint_empty(self): + """Test linting a pipeline with no subworkflows installed""" + with pytest.raises(LookupError): + nf_core.subworkflows.SubworkflowLint(dir=self.pipeline_dir) + + +def test_subworkflows_lint_new_subworkflow(self): + """lint a new subworkflow""" + subworkflow_lint = nf_core.subworkflows.SubworkflowLint(dir=self.nfcore_modules) + subworkflow_lint.lint(print_results=True, all_subworkflows=True) + assert len(subworkflow_lint.failed) == 0, f"Linting failed with {[x.__dict__ for x in subworkflow_lint.failed]}" + assert len(subworkflow_lint.passed) > 0 + assert len(subworkflow_lint.warned) >= 0 + + +def test_subworkflows_lint_no_gitlab(self): + """Test linting a pipeline with no subworkflows installed""" + with pytest.raises(LookupError): + nf_core.subworkflows.SubworkflowLint(dir=self.pipeline_dir, remote_url=GITLAB_URL) + + +def test_subworkflows_lint_gitlab_subworkflows(self): + """Lint subworkflows from a different remote""" + self.subworkflow_install_gitlab.install("bam_stats_samtools") + subworkflow_lint = nf_core.subworkflows.SubworkflowLint(dir=self.pipeline_dir, remote_url=GITLAB_URL) + subworkflow_lint.lint(print_results=False, all_subworkflows=True) + assert len(subworkflow_lint.failed) == 2 + assert len(subworkflow_lint.passed) > 0 + assert len(subworkflow_lint.warned) >= 0 + + +def test_subworkflows_lint_multiple_remotes(self): + """Lint subworkflows from a different remote""" + self.subworkflow_install_gitlab.install("bam_stats_samtools") + self.subworkflow_install.install("fastq_align_bowtie2") + subworkflow_lint = nf_core.subworkflows.SubworkflowLint(dir=self.pipeline_dir, remote_url=GITLAB_URL) + subworkflow_lint.lint(print_results=False, all_modules=True) + assert len(subworkflow_lint.failed) == 1 + assert len(subworkflow_lint.passed) > 0 + assert len(subworkflow_lint.warned) >= 0 diff --git a/tests/test_cli.py b/tests/test_cli.py index 57e909e575..fc172deba9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -236,7 +236,6 @@ def test_create(self, mock_create): "description": "pipeline description", "author": "Kalle Anka", "version": "1.2.3", - "no-git": None, "force": None, "outdir": "/path/outdir", "template-yaml": "file.yaml", @@ -251,12 +250,11 @@ def test_create(self, mock_create): params["name"], params["description"], params["author"], - params["version"], - "no-git" in params, - "force" in params, - params["outdir"], - params["template-yaml"], - "plain" in params, + version=params["version"], + force="force" in params, + outdir=params["outdir"], + template_yaml_path=params["template-yaml"], + plain="plain" in params, ) mock_create.return_value.init_pipeline.assert_called_once() diff --git a/tests/test_create.py b/tests/test_create.py index 298eeecde5..1cc073cb54 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -6,6 +6,7 @@ from unittest import mock import git +import yaml import nf_core.create @@ -58,6 +59,8 @@ def test_pipeline_creation_initiation(self, tmp_path): assert os.path.isdir(os.path.join(pipeline.outdir, ".git")) assert f" {self.default_branch}\n" in git.Repo.init(pipeline.outdir).git.branch() assert not os.path.exists(os.path.join(pipeline.outdir, "pipeline_template.yml")) + with open(os.path.join(pipeline.outdir, ".nf-core.yml")) as fh: + assert "template" not in fh.read() @with_temporary_folder def test_pipeline_creation_initiation_with_yml(self, tmp_path): @@ -77,11 +80,13 @@ def test_pipeline_creation_initiation_with_yml(self, tmp_path): assert os.path.isdir(os.path.join(pipeline.outdir, ".git")) assert f" {self.default_branch}\n" in git.Repo.init(pipeline.outdir).git.branch() - # Check pipeline yml has been dumped and matches input - pipeline_template = os.path.join(pipeline.outdir, "pipeline_template.yml") - assert os.path.exists(pipeline_template) - with open(pipeline_template) as fh: - assert fh.read() == PIPELINE_TEMPLATE_YML.read_text() + # Check pipeline template yml has been dumped to `.nf-core.yml` and matches input + assert not os.path.exists(os.path.join(pipeline.outdir, "pipeline_template.yml")) + assert os.path.exists(os.path.join(pipeline.outdir, ".nf-core.yml")) + with open(os.path.join(pipeline.outdir, ".nf-core.yml")) as fh: + nfcore_yml = yaml.safe_load(fh) + assert "template" in nfcore_yml + assert nfcore_yml["template"] == yaml.safe_load(PIPELINE_TEMPLATE_YML.read_text()) @mock.patch.object(nf_core.create.PipelineCreate, "customize_template") @mock.patch.object(nf_core.create.questionary, "confirm") @@ -103,11 +108,13 @@ def test_pipeline_creation_initiation_customize_template(self, mock_questionary, assert os.path.isdir(os.path.join(pipeline.outdir, ".git")) assert f" {self.default_branch}\n" in git.Repo.init(pipeline.outdir).git.branch() - # Check pipeline yml has been dumped and matches input - pipeline_template = os.path.join(pipeline.outdir, "pipeline_template.yml") - assert os.path.exists(pipeline_template) - with open(pipeline_template) as fh: - assert fh.read() == PIPELINE_TEMPLATE_YML.read_text() + # Check pipeline template yml has been dumped to `.nf-core.yml` and matches input + assert not os.path.exists(os.path.join(pipeline.outdir, "pipeline_template.yml")) + assert os.path.exists(os.path.join(pipeline.outdir, ".nf-core.yml")) + with open(os.path.join(pipeline.outdir, ".nf-core.yml")) as fh: + nfcore_yml = yaml.safe_load(fh) + assert "template" in nfcore_yml + assert nfcore_yml["template"] == yaml.safe_load(PIPELINE_TEMPLATE_YML.read_text()) @with_temporary_folder def test_pipeline_creation_with_yml_skip(self, tmp_path): @@ -126,11 +133,13 @@ def test_pipeline_creation_with_yml_skip(self, tmp_path): pipeline.init_pipeline() assert not os.path.isdir(os.path.join(pipeline.outdir, ".git")) - # Check pipeline yml has been dumped and matches input - pipeline_template = os.path.join(pipeline.outdir, "pipeline_template.yml") - assert os.path.exists(pipeline_template) - with open(pipeline_template) as fh: - assert fh.read() == PIPELINE_TEMPLATE_YML_SKIP.read_text() + # Check pipeline template yml has been dumped to `.nf-core.yml` and matches input + assert not os.path.exists(os.path.join(pipeline.outdir, "pipeline_template.yml")) + assert os.path.exists(os.path.join(pipeline.outdir, ".nf-core.yml")) + with open(os.path.join(pipeline.outdir, ".nf-core.yml")) as fh: + nfcore_yml = yaml.safe_load(fh) + assert "template" in nfcore_yml + assert nfcore_yml["template"] == yaml.safe_load(PIPELINE_TEMPLATE_YML_SKIP.read_text()) # Check that some of the skipped files are not present assert not os.path.exists(os.path.join(pipeline.outdir, "CODE_OF_CONDUCT.md")) diff --git a/tests/test_download.py b/tests/test_download.py index dd226d9dae..ee0744f660 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -174,10 +174,68 @@ def test__find_container_images_config_nextflow(self, tmp_path, mock_fetch_wf_co assert "nfcore/methylseq:1.4" in download_obj.containers assert "nfcore/sarek:dev" in download_obj.containers assert "https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1" in download_obj.containers - # does not yet pick up nfcore/sarekvep:dev.${params.genome}, because successfully detecting "nfcore/sarek:dev" - # breaks the loop already. However, this loop-breaking is needed to stop iterating over DSL2 syntax if a - # direct download link has been found. Unless we employ a better deduplication, support for this kind of - # free-style if-else switches will sadly remain insufficient. + # does not yet pick up nfcore/sarekvep:dev.${params.genome}, because that is no valid URL or Docker URI. + + # + # Test for 'find_container_images' in modules + # + @with_temporary_folder + @mock.patch("nf_core.utils.fetch_wf_config") + def test_find_container_images_modules(self, tmp_path, mock_fetch_wf_config): + download_obj = DownloadWorkflow(pipeline="dummy", outdir=tmp_path) + mock_fetch_wf_config.return_value = {} + download_obj.find_container_images(Path(__file__).resolve().parent / "data/mock_module_containers") + + # mock_docker_single_quay_io.nf + assert "quay.io/biocontainers/singlequay:1.9--pyh9f0ad1d_0" in download_obj.containers + + # mock_dsl2_apptainer_var1.nf (possible future convention?) + assert ( + "https://depot.galaxyproject.org/singularity/dsltwoapptainervarone:1.1.0--py38h7be5676_2" + in download_obj.containers + ) + assert "biocontainers/dsltwoapptainervarone:1.1.0--py38h7be5676_2" not in download_obj.containers + + # mock_dsl2_apptainer_var2.nf (possible future convention?) + assert ( + "https://depot.galaxyproject.org/singularity/dsltwoapptainervartwo:1.1.0--hdfd78af_0" + in download_obj.containers + ) + assert "biocontainers/dsltwoapptainervartwo:1.1.0--hdfd78af_0" not in download_obj.containers + + # mock_dsl2_current_inverted.nf (new implementation supports if the direct download URL is listed after Docker URI) + assert ( + "https://depot.galaxyproject.org/singularity/dsltwocurrentinv:3.3.2--h1b792b2_1" in download_obj.containers + ) + assert "biocontainers/dsltwocurrentinv:3.3.2--h1b792b2_1" not in download_obj.containers + + # mock_dsl2_current.nf (main nf-core convention, should be the one in far the most modules) + assert ( + "https://depot.galaxyproject.org/singularity/dsltwocurrent:1.2.1--pyhdfd78af_0" in download_obj.containers + ) + assert "biocontainers/dsltwocurrent:1.2.1--pyhdfd78af_0" not in download_obj.containers + + # mock_dsl2_old.nf (initial DSL2 convention) + assert "https://depot.galaxyproject.org/singularity/dsltwoold:0.23.0--0" in download_obj.containers + assert "quay.io/biocontainers/dsltwoold:0.23.0--0" not in download_obj.containers + + # mock_dsl2_variable.nf (currently the edgiest edge case supported) + assert ( + "https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0" + in download_obj.containers + ) + assert ( + "https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:afaaa4c6f5b308b4b6aa2dd8e99e1466b2a6b0cd-0" + in download_obj.containers + ) + assert ( + "quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0" + not in download_obj.containers + ) + assert ( + "quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:afaaa4c6f5b308b4b6aa2dd8e99e1466b2a6b0cd-0" + not in download_obj.containers + ) # # Tests for 'singularity_pull_image' @@ -344,7 +402,8 @@ def test_download_workflow_with_success(self, tmp_dir, mock_download_image, mock # Test Download for Tower # @with_temporary_folder - def test_download_workflow_for_tower(self, tmp_dir): + @mock.patch("nf_core.download.DownloadWorkflow.get_singularity_images") + def test_download_workflow_for_tower(self, tmp_dir, _): download_obj = DownloadWorkflow( pipeline="nf-core/rnaseq", revision=("3.7", "3.9"), @@ -393,11 +452,6 @@ def test_download_workflow_for_tower(self, tmp_dir): # download_obj.download_workflow_tower(location=tmp_dir) will run container image detection for all requested revisions assert isinstance(download_obj.containers, list) and len(download_obj.containers) == 33 - # manually test container image detection for 3.7 revision only - download_obj.containers = [] # empty container list for the test - download_obj.workflow_repo.checkout(download_obj.wf_sha["3.7"]) - download_obj.find_container_images(download_obj.workflow_repo.access()) - assert len(download_obj.containers) == 30 # 30 containers for 3.7 assert ( "https://depot.galaxyproject.org/singularity/bbmap:38.93--he522d1c_0" in download_obj.containers ) # direct definition diff --git a/tests/test_params_file.py b/tests/test_params_file.py new file mode 100644 index 0000000000..824e8fe345 --- /dev/null +++ b/tests/test_params_file.py @@ -0,0 +1,79 @@ +import json +import os +import shutil +import tempfile +from pathlib import Path + +import nf_core.create +import nf_core.schema +from nf_core.params_file import ParamsFileBuilder + + +class TestParamsFileBuilder: + """Class for schema tests""" + + @classmethod + def setup_class(cls): + """Create a new PipelineSchema object""" + cls.schema_obj = nf_core.schema.PipelineSchema() + cls.root_repo_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + + # Create a test pipeline in temp directory + cls.tmp_dir = tempfile.mkdtemp() + cls.template_dir = os.path.join(cls.tmp_dir, "wf") + create_obj = nf_core.create.PipelineCreate( + "testpipeline", "", "", outdir=cls.template_dir, no_git=True, plain=True + ) + create_obj.init_pipeline() + + cls.template_schema = os.path.join(cls.template_dir, "nextflow_schema.json") + cls.params_template_builder = ParamsFileBuilder(cls.template_dir) + cls.invalid_template_schema = os.path.join(cls.template_dir, "nextflow_schema_invalid.json") + + # Remove the allOf section to make the schema invalid + with open(cls.template_schema, "r") as fh: + o = json.load(fh) + del o["allOf"] + + with open(cls.invalid_template_schema, "w") as fh: + json.dump(o, fh) + + @classmethod + def teardown_class(cls): + if os.path.exists(cls.tmp_dir): + shutil.rmtree(cls.tmp_dir) + + def test_build_template(self): + outfile = os.path.join(self.tmp_dir, "params-file.yml") + self.params_template_builder.write_params_file(outfile) + + assert os.path.exists(outfile) + + with open(outfile, "r") as fh: + out = fh.read() + + assert "nf-core/testpipeline" in out + + def test_build_template_invalid_schema(self, caplog): + """Build a schema from a template""" + outfile = os.path.join(self.tmp_dir, "params-file-invalid.yml") + builder = ParamsFileBuilder(self.invalid_template_schema) + res = builder.write_params_file(outfile) + + assert res is False + assert "Pipeline schema file is invalid" in caplog.text + + def test_build_template_file_exists(self, caplog): + """Build a schema from a template""" + + # Creates a new empty file + outfile = Path(self.tmp_dir) / "params-file.yml" + with open(outfile, "w") as fp: + pass + + res = self.params_template_builder.write_params_file(outfile) + + assert res is False + assert f"File '{outfile}' exists!" in caplog.text + + outfile.unlink()