diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index fbf55836..8f39e21b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/funcscan, the standard workflow is 1. Check that there isn't already an issue about your idea in the [nf-core/funcscan issues](https://github.com/nf-core/funcscan/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this 2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/funcscan repository](https://github.com/nf-core/funcscan) to your GitHub account 3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) -4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). +4. Use `nf-core pipelines schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). 5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). @@ -40,7 +40,7 @@ There are typically two types of tests that run: ### Lint tests `nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to. -To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint ` command. +To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core pipelines lint ` command. If any failures or warnings are encountered, please follow the listed URL for more documentation. @@ -75,7 +75,7 @@ If you wish to contribute a new step, please use the following coding standards: 2. Write the process block (see below). 3. Define the output channel if needed (see below). 4. Add any new parameters to `nextflow.config` with a default (see below). -5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool). +5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool). 6. Add sanity checks and validation for all relevant parameters. 7. Perform local tests to validate that the new code works as expected. 8. If applicable, add a new test command in `.github/workflow/ci.yml`. @@ -86,11 +86,11 @@ If you wish to contribute a new step, please use the following coding standards: Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope. -Once there, use `nf-core schema build` to add to `nextflow_schema.json`. +Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`. ### Default processes resource requirements -Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. +Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block. @@ -103,7 +103,7 @@ Please use the following naming schemes, to make it easy to understand what is g ### Nextflow version bumping -If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]` +If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core pipelines bump-version --nextflow . [min-nf-version]` ### Images and figures diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fa844526..b6e5cebd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,7 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/func - [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/funcscan/tree/master/.github/CONTRIBUTING.md) - [ ] If necessary, also make a PR on the nf-core/funcscan _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. -- [ ] Make sure your code lints (`nf-core lint`). +- [ ] Make sure your code lints (`nf-core pipelines lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 6652683e..76d1d684 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -1,18 +1,35 @@ name: nf-core AWS full size tests -# This workflow is triggered on published releases. +# This workflow is triggered on PRs opened against the master branch. # It can be additionally triggered manually with GitHub actions workflow dispatch button. # It runs the -profile 'test_full' on AWS batch on: - release: - types: [published] + pull_request: + branches: + - master workflow_dispatch: + pull_request_review: + types: [submitted] + jobs: run-platform: name: Run AWS full tests - if: github.repository == 'nf-core/funcscan' + # run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered + if: github.repository == 'nf-core/funcscan' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: + - uses: octokit/request-action@v2.x + id: check_approvals + with: + route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: test_variables + if: github.event_name != 'workflow_dispatch' + run: | + JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}' + CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length') + test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required - name: Launch workflow via Seqera Platform uses: seqeralabs/action-tower-launch@v2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd8aa75b..dc442df4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,14 @@ on: - "dev" - "master" release: - types: - - "published" + types: [published] + workflow_dispatch: env: NXF_ANSI_LOG: false - NFTEST_VER: "0.8.4" + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + NFTEST_VER: "0.9.0" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -36,14 +38,21 @@ jobs: fi test: - name: nf-test - needs: define_nxf_versions + name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" + # Only run on push if this is the nf-core dev branch (merged PRs) + if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/funcscan') }}" runs-on: ubuntu-latest strategy: fail-fast: false matrix: - NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} - tags: + NXF_VER: + - "24.04.2" + - "latest-everything" + profile: + - "conda" + - "docker" + - "singularity" + test_name: - "test" - "test_nothing" - "test_bakta" @@ -56,13 +65,23 @@ jobs: - "test_taxonomy_prokka" - "test_preannotated" - "test_preannotated_bgc" - profile: - - "docker" - + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" steps: - name: Check out pipeline code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + - name: Set up Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ matrix.NXF_VER }}" + - name: Check out test data uses: actions/checkout@v3 with: @@ -71,12 +90,32 @@ jobs: path: test-datasets/ fetch-depth: 1 - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 with: - version: "${{ matrix.NXF_VER }}" + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH - - name: Disk space cleanup + - name: Clean up Disk space uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - name: Install nf-test @@ -84,9 +123,9 @@ jobs: wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER sudo mv nf-test /usr/local/bin/ - - name: Run nf-test + - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" run: | - nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml + nf-test test --tag ${{ matrix.test_name }} --profile ${{ matrix.test_name }},${{ matrix.profile }} --junitxml=test.xml - name: Output log on failure if: failure() diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 2d20d644..713dc3e7 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -1,4 +1,4 @@ -name: Test successful pipeline download with 'nf-core download' +name: Test successful pipeline download with 'nf-core pipelines download' # Run the workflow when: # - dispatched manually @@ -8,7 +8,7 @@ on: workflow_dispatch: inputs: testbranch: - description: "The specific branch you wish to utilize for the test execution of nf-core download." + description: "The specific branch you wish to utilize for the test execution of nf-core pipelines download." required: true default: "dev" pull_request: @@ -39,9 +39,11 @@ jobs: with: python-version: "3.12" architecture: "x64" - - uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7 + + - name: Setup Apptainer + uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0 with: - singularity-version: 3.8.3 + apptainer-version: 1.3.4 - name: Install dependencies run: | @@ -54,33 +56,64 @@ jobs: echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} + - name: Make a cache directory for the container images + run: | + mkdir -p ./singularity_container_images + - name: Download the pipeline env: - NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images run: | - nf-core download ${{ env.REPO_LOWERCASE }} \ + nf-core pipelines download ${{ env.REPO_LOWERCASE }} \ --revision ${{ env.REPO_BRANCH }} \ --outdir ./${{ env.REPOTITLE_LOWERCASE }} \ --compress "none" \ --container-system 'singularity' \ - --container-library "quay.io" -l "docker.io" -l "ghcr.io" \ + --container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io" \ --container-cache-utilisation 'amend' \ - --download-configuration + --download-configuration 'yes' - name: Inspect download run: tree ./${{ env.REPOTITLE_LOWERCASE }} + - name: Count the downloaded number of container images + id: count_initial + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Initial container image count: $image_count" + echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV} + - name: Run the downloaded pipeline (stub) id: stub_run_pipeline continue-on-error: true env: - NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results - name: Run the downloaded pipeline (stub run not supported) id: run_pipeline if: ${{ job.steps.stub_run_pipeline.status == failure() }} env: - NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results + + - name: Count the downloaded number of container images + id: count_afterwards + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Post-pipeline run container image count: $image_count" + echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV} + + - name: Compare container image counts + run: | + if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then + initial_count=${{ env.IMAGE_COUNT_INITIAL }} + final_count=${{ env.IMAGE_COUNT_AFTER }} + difference=$((final_count - initial_count)) + echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" + tree ./singularity_container_images + exit 1 + else + echo "The pipeline can be downloaded successfully!" + fi diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 1fcafe88..a502573c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,6 +1,6 @@ name: nf-core linting # This workflow is triggered on pushes and PRs to the repository. -# It runs the `nf-core lint` and markdown lint tests to ensure +# It runs the `nf-core pipelines lint` and markdown lint tests to ensure # that the code meets the nf-core guidelines. on: push: @@ -41,17 +41,32 @@ jobs: python-version: "3.12" architecture: "x64" + - name: read .nf-core.yml + uses: pietrobolcato/action-read-yaml@1.1.0 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nf-core + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Run nf-core pipelines lint + if: ${{ github.base_ref != 'master' }} + env: + GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} + run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md - - name: Run nf-core lint + - name: Run nf-core pipelines lint --release + if: ${{ github.base_ref == 'master' }} env: GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} - run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md + run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md - name: Save PR number if: ${{ always() }} diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 40acc23f..42e519bf 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download lint results - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3 + uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6 with: workflow: linting.yml workflow_conclusion: completed diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index 03ecfcf7..c6ba35df 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -12,7 +12,7 @@ jobs: - name: get topics and convert to hashtags id: get_topics run: | - echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" >> $GITHUB_OUTPUT + echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" | sed 's/-//g' >> $GITHUB_OUTPUT - uses: rzr/fediverse-action@master with: diff --git a/.github/workflows/template_version_comment.yml b/.github/workflows/template_version_comment.yml new file mode 100644 index 00000000..e8aafe44 --- /dev/null +++ b/.github/workflows/template_version_comment.yml @@ -0,0 +1,46 @@ +name: nf-core template version comment +# This workflow is triggered on PRs to check if the pipeline template version matches the latest nf-core version. +# It posts a comment to the PR, even if it comes from a fork. + +on: pull_request_target + +jobs: + template_version: + runs-on: ubuntu-latest + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Read template version from .nf-core.yml + uses: nichmor/minimal-read-yaml@v0.0.2 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + + - name: Install nf-core + run: | + python -m pip install --upgrade pip + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Check nf-core outdated + id: nf_core_outdated + run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV} + + - name: Post nf-core template version comment + uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 + if: | + contains(env.OUTPUT, 'nf-core') + with: + repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} + allow-repeats: false + message: | + > [!WARNING] + > Newer version of the nf-core template is available. + > + > Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. + > Please update your pipeline to the latest version. + > + > For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). + # diff --git a/.gitignore b/.gitignore index 2eef655b..23b0c7de 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ results/ testing/ testing* *.pyc +null/ .nf-test* diff --git a/.gitpod.yml b/.gitpod.yml index 105a1821..46118637 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,17 +4,14 @@ tasks: command: | pre-commit install --install-hooks nextflow self-update - - name: unset JAVA_TOOL_OPTIONS - command: | - unset JAVA_TOOL_OPTIONS vscode: extensions: # based on nf-core.nf-core-extensionpack - - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code + #- esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar - mechatroner.rainbow-csv # Highlight columns in csv files in different colors - # - nextflow.nextflow # Nextflow syntax highlighting + - nextflow.nextflow # Nextflow syntax highlighting - oderwat.indent-rainbow # Highlight indentation level - streetsidesoftware.code-spell-checker # Spelling checker for source code - charliermarsh.ruff # Code linter Ruff diff --git a/.nf-core.yml b/.nf-core.yml index 318ad93d..9ba172bf 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,4 +1,19 @@ -repository_type: pipeline +bump_version: null lint: - actions_ci: False ## TODO: re-activate once nf-test ci.yml structure updated -nf_core_version: "2.14.1" + actions_ci: false +nf_core_version: 3.0.2 +org_path: null +repository_type: pipeline +template: + author: Jasmin Frangenberg, Anan Ibrahim, Louisa Perelo, Moritz E. Beber, James A. Fellows Yates + description: Pipeline for screening for functional components of assembled contigs + force: false + is_nfcore: true + name: funcscan + org: nf-core + outdir: . + skip_features: + - igenomes + - fastqc + version: 2.1.0dev +update: null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4dc0f1dc..9e9f0e1c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - prettier@3.2.5 - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: "2.7.3" + rev: "3.0.3" hooks: - id: editorconfig-checker alias: ec diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e889026..b1fd07b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` +- [#421](https://github.com/nf-core/funcscan/pull/421) Updated to nf-core template 3.0.2 (by @jfy133) +- [#427](https://github.com/nf-core/funcscan/pull/427) AMPcombi now can use multiple other databases for classifications. (by @darcy220606) + ### `Fixed` +- [#427](https://github.com/nf-core/funcscan/pull/427) Fixed the AMP reference database issues reported by users, due to non-ASCII characters. (by @darcy220606) + ### `Dependencies` +| Tool | Previous version | New version | +| -------- | ---------------- | ----------- | +| AMPcombi | 0.2.2 | 2.0.1 | +| Macrel | 1.2.0 | 1.4.0 | +| MultiQC | 1.24.0 | 1.25.1 | + ### `Deprecated` ## v2.0.0 - [2024-09-05] diff --git a/CITATIONS.md b/CITATIONS.md index 426cd614..50655554 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -32,7 +32,7 @@ - [argNorm](https://doi.org/10.5204/rep.eprints.252448) - > Ugarcina Perovic, S., Ramji, V., Chong, H., Duan, Y., Maguire, F., Coelho, L. P. (2024). argNorm: Normalization of antibiotic resistance gene annotations to the Antibiotic Resistance Ontology (ARO). [Preprint] (Unpublished) [DOI: 10.5204/rep.eprints.252448](https://doi.org/10.5204/rep.eprints.252448) + > Ugarcina Perovic, S., Ramji, V., Chong, H., Duan, Y., Maguire, F., Coelho, L. P. (2024). argNorm: Normalization of antibiotic resistance gene annotations to the Antibiotic Resistance Ontology (ARO). [Preprint] (Unpublished) [DOI: 10.5204/rep.eprints.252448](https://doi.org/10.5204/rep.eprints.252448) - [Bakta](https://doi.org/10.1099/mgen.0.000685) diff --git a/README.md b/README.md index d5c9fcda..7753440d 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ [![GitHub Actions Linting Status](https://github.com/nf-core/funcscan/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/funcscan/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/funcscan/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7643099-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7643099) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) -[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) - +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) @@ -72,8 +71,7 @@ nextflow run nf-core/funcscan \ ``` > [!WARNING] -> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; -> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). +> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files). For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/funcscan/usage) and the [parameter documentation](https://nf-co.re/funcscan/parameters). diff --git a/assets/schema_input.json b/assets/schema_input.json index 62b4ece9..c13fd75e 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/nf-core/funcscan/master/assets/schema_input.json", "title": "nf-core/funcscan pipeline - params.input schema", "description": "Schema for the file provided with params.input", @@ -11,36 +11,35 @@ "type": "string", "pattern": "^\\S+$", "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"], - "unique": true + "meta": ["id"] }, "fasta": { "type": "string", "format": "file-path", "exists": true, "pattern": "^\\S+\\.(fasta|fas|fna|fa)(\\.gz)?$", - "errorMessage": "Fasta file for reads must be provided, cannot contain spaces and must have extension `.fa.gz`, `.fna.gz` or `.fasta.gz`", - "unique": true + "errorMessage": "Fasta file for reads must be provided, cannot contain spaces and must have extension `.fa.gz`, `.fna.gz` or `.fasta.gz`" }, "protein": { "type": "string", "format": "file-path", "exists": true, "pattern": "^\\S+\\.(faa|fasta)(\\.gz)?$", - "errorMessage": "Input file for peptide annotations has incorrect file format. File must end in `.fasta` or `.faa`", - "unique": true, - "dependentRequired": ["gbk"] + "errorMessage": "Input file for peptide annotations has incorrect file format. File must end in `.fasta` or `.faa`" }, "gbk": { "type": "string", "format": "file-path", "exists": true, "pattern": "^\\S+\\.(gbk|gbff)(\\.gz)?$", - "errorMessage": "Input file for feature annotations has incorrect file format. File must end in `.gbk.gz` or `.gbff.gz`", - "unique": true, - "dependentRequired": ["protein"] + "errorMessage": "Input file for feature annotations has incorrect file format. File must end in `.gbk.gz` or `.gbff.gz`" } }, - "required": ["sample", "fasta"] - } + "required": ["sample", "fasta"], + "dependentRequired": { + "protein": ["gbk"], + "gbk": ["protein"] + } + }, + "uniqueItems": true } diff --git a/bin/ampcombi_download.py b/bin/ampcombi_download.py index dd1373ce..c9a4f639 100755 --- a/bin/ampcombi_download.py +++ b/bin/ampcombi_download.py @@ -1,78 +1,144 @@ #!/usr/bin/env python3 ######################################### -# Authors: [Anan Ibrahim](https://github.com/brianjohnhaas), [Louisa Perelo](https://github.com/louperelo) +# Authors: [Anan Ibrahim](https://github.com/Darcy220606/AMPcombi), [Louisa Perelo](https://github.com/louperelo) # File: amp_database.py # Source: https://github.com/Darcy220606/AMPcombi/blob/main/ampcombi/amp_database.py -# Source+commit: https://github.com/Darcy220606/AMPcombi/commit/a75bc00c32ecf873a133b18cf01f172ad9cf0d2d/ampcombi/amp_database.py -# Download Date: 2023-03-08, commit: a75bc00c # This source code is licensed under the MIT license ######################################### -# TITLE: Download the DRAMP database if input db empty AND and make database compatible for diamond +# TITLE: Download the reference database specified by the user. import pandas as pd import requests import os -from datetime import datetime +import re import subprocess -from Bio import SeqIO -import tempfile -import shutil +import argparse +from datetime import datetime +from Bio.Seq import Seq +from Bio.SeqRecord import SeqRecord +from Bio import SeqIO ######################################## -# FUNCTION: DOWNLOAD DRAMP DATABASE AND CLEAN IT +# FUNCTION: DOWNLOAD DATABASES AND CLEAN DRAMP and APD ######################################### -def download_DRAMP(db): - ##Download the (table) file and store it in a results directory - url = "http://dramp.cpu-bioinfor.org/downloads/download.php?filename=download_data/DRAMP3.0_new/general_amps.xlsx" - r = requests.get(url, allow_redirects=True) - with open(db + "/" + "general_amps.xlsx", "wb") as f: - f.write(r.content) - ##Convert excel to tab sep file and write it to a file in the DRAMP_db directly with the date its downloaded - date = datetime.now().strftime("%Y_%m_%d") - ref_amps = pd.read_excel(db + "/" + r"general_amps.xlsx") - ref_amps.to_csv(db + "/" + f"general_amps_{date}.tsv", index=None, header=True, sep="\t") - ##Download the (fasta) file and store it in a results directory - urlfasta = ( - "http://dramp.cpu-bioinfor.org/downloads/download.php?filename=download_data/DRAMP3.0_new/general_amps.fasta" - ) - z = requests.get(urlfasta) - fasta_path = os.path.join(db + "/" + f"general_amps_{date}.fasta") - with open(fasta_path, "wb") as f: - f.write(z.content) - ##Cleaning step to remove ambigous aminoacids from sequences in the database (e.g. zeros and brackets) - new_fasta = db + "/" + f"general_amps_{date}_clean.fasta" - seq_record = SeqIO.parse(open(fasta_path), "fasta") - with open(new_fasta, "w") as f: - for record in seq_record: - id, sequence = record.id, str(record.seq) - letters = [ - "A", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "K", - "L", - "M", - "N", - "P", - "Q", - "R", - "S", - "T", - "V", - "W", - "Y", - ] - new = "".join(i for i in sequence if i in letters) - f.write(">" + id + "\n" + new + "\n") - return os.remove(fasta_path), os.remove(db + "/" + r"general_amps.xlsx") +def download_ref_db(database, threads): + """ + Downloads a specified AMP (antimicrobial peptide) reference database based on the + provided database name and saves it to the specified directory. + This supports downloading databases only from DRAMP, APD, and UniRef100. + Parameters: + ---------- + db : str + The directory path where the downloaded database should be saved. + database : str + The name of the database to download. Must be one of 'DRAMP', 'APD', or 'UniRef100'. + threads : int + Number of threads to use when downloading the UniRef100 database with `mmseqs`. + """ + # Check which database was given + if database == 'DRAMP': + # Create dir + db = 'amp_DRAMP_database' + os.makedirs(db, exist_ok=True) + # Download the file + try: + url = 'http://dramp.cpu-bioinfor.org/downloads/download.php?filename=download_data/DRAMP3.0_new/general_amps.txt' + response = requests.get(url, allow_redirects=True) + response.raise_for_status() # Check for any download errors + date = datetime.now().strftime("%Y_%m_%d") + with open(db + '/' + f'general_amps_{date}.txt', 'wb') as file: + file.write(response.content) + print(f"File downloaded successfully and saved to {db}/general_amps_{date}.txt") + # Create fasta version and clean it + db_df = pd.read_csv(f'{db}/general_amps_{date}.txt', sep='\t') + records = [] + valid_sequence_pattern = re.compile("^[ACDEFGHIKLMNPQRSTVWY]+$") + for index, row in db_df.iterrows(): + sequence = row['Sequence'] + if valid_sequence_pattern.match(sequence): + record = SeqRecord(Seq(sequence), id=str(row['DRAMP_ID']), description="") + records.append(record) + output_file = f'{db}/general_amps_{date}.fasta' + SeqIO.write(records, output_file, "fasta") + except requests.exceptions.RequestException as e: + print(f"Failed to download DRAMP AMP general database file: {e}") + return + + if database == 'APD': + # Create dir + db = 'amp_APD_database' + os.makedirs(db, exist_ok=True) + # Download the file + try: + url = 'https://aps.unmc.edu/assets/sequences/APD_sequence_release_09142020.fasta' + response = requests.get(url, allow_redirects=True, verify=False) # Disable SSL verification due to site certificate issue + response.raise_for_status() + content = response.text + print("APD AMP database downloaded successfully.") + except requests.exceptions.RequestException as e: + print(f"Failed to download content: {e}") + return + # Save the content line-by-line exactly as is + try: + with open(db + '/' + 'APD_orig.fasta', 'w') as file: + file.write(content) + with open(f'{db}/APD.fasta', 'w') as output_handle: + valid_sequence_pattern = re.compile("^[ACDEFGHIKLMNPQRSTVWY]+$") + for record in SeqIO.parse(f'{db}/APD_orig.fasta', "fasta"): + sequence = str(record.seq) + if valid_sequence_pattern.match(sequence): + SeqIO.write(record, output_handle, "fasta") + os.remove(db + '/' + 'APD_orig.fasta') + print(f"APD AMP database saved successfully to {db}/APD.fasta") + # Fasta to table + headers = [] + sequences = [] + seq_ids = [] + for i, record in enumerate(SeqIO.parse(f'{db}/APD.fasta', "fasta")): + sequence_id = record.description.split('|')[0] + headers.append(record.description) + sequences.append(str(record.seq)) + seq_ids.append(sequence_id) + db_df = pd.DataFrame({ + "APD_ID": seq_ids, + "APD_Description": headers, + "APD_Sequence": sequences}) + db_df.to_csv(f'{db}/APD.txt', sep='\t', index=False, header=True) + os.remove(db + '/' + 'APD.fasta') + # Table to fasta + records = [] + for index, row in db_df.iterrows(): + sequence = row['APD_Sequence'] + record = SeqRecord(Seq(sequence), id=str(row['APD_ID']), description="") + records.append(record) + output_file = f'{db}/APD.fasta' + SeqIO.write(records, output_file, "fasta") + except Exception as e: + print(f"Failed to save APD AMP database: {e}") + + if database == 'UniRef100': + # Create dir + db = 'amp_UniRef100_database' + os.makedirs(db, exist_ok=True) + # Download the file + try: + os.makedirs(f'{db}/mmseqs2', exist_ok=True) + command = f"mmseqs databases UniRef100 {db}/mmseqs2/ref_DB {db}/mmseqs2/tmp --remove-tmp-files true --threads {threads} -v 0" + subprocess.run(command, shell=True, check=True) + print(f"UniRef100 protein database downloaded successfully and saved to {db}/mmseqs2/UniRef100") + except subprocess.CalledProcessError as e: + print(f"Failed to download UniRef100 protein database: {e}") +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Downloads a specified AMP (antimicrobial peptide) reference database based on the provided database name and saves it to the specified directory.") + parser.add_argument("--database_id", dest="database", type=str, required=True, choices=["DRAMP", "APD", "UniRef100"], + help="Database ID - one of DRAMP, APD, or UniRef100. This parameter is required.") + parser.add_argument("--threads", type=int, default=4, + help="Number of threads supplied to mmseqs databases. Only relevant in the case of 'UniRef100'. Default is 4.") -download_DRAMP("amp_ref_database") + args = parser.parse_args() + download_ref_db(args.database, args.threads) diff --git a/conf/base.config b/conf/base.config index a928e380..3133bc74 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,9 +10,9 @@ process { - cpus = { check_max( 1 * task.attempt, 'cpus' ) } - memory = { check_max( 6.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + cpus = { 1 * task.attempt } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' } maxRetries = 1 @@ -25,36 +25,36 @@ process { // adding in your local modules too. // See https://www.nextflow.io/docs/latest/config.html#config-process-selectors - withLabel:process_single { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 6.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + withLabel: process_single { + cpus = { 1 } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_low { - cpus = { check_max( 2 * task.attempt, 'cpus' ) } - memory = { check_max( 12.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + withLabel: process_low { + cpus = { 2 * task.attempt } + memory = { 12.GB * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_medium { - cpus = { check_max( 6 * task.attempt, 'cpus' ) } - memory = { check_max( 36.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + withLabel: process_medium { + cpus = { 6 * task.attempt } + memory = { 36.GB * task.attempt } + time = { 8.h * task.attempt } } - withLabel:process_high { - cpus = { check_max( 12 * task.attempt, 'cpus' ) } - memory = { check_max( 72.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + withLabel: process_high { + cpus = { 12 * task.attempt } + memory = { 72.GB * task.attempt } + time = { 16.h * task.attempt } } - withLabel:process_long { - time = { check_max( 20.h * task.attempt, 'time' ) } + withLabel: process_long { + time = { 20.h * task.attempt } } - withLabel:process_high_memory { - memory = { check_max( 200.GB * task.attempt, 'memory' ) } + withLabel: process_high_memory { + memory = { 200.GB * task.attempt } } - withLabel:error_ignore { + withLabel: error_ignore { errorStrategy = 'ignore' } - withLabel:error_retry { + withLabel: error_retry { errorStrategy = 'retry' maxRetries = 2 } @@ -64,169 +64,170 @@ process { */ withName: GUNZIP { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: UNTAR { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: PROKKA { - memory = { check_max( 8.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + memory = { 8.GB * task.attempt } + cpus = { 4 * task.attempt } + time = { 8.h * task.attempt } } withName: PRODIGAL_GBK { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: BAKTA_BAKTA { - memory = { check_max( 64.GB * task.attempt, 'memory' ) } - cpus = { check_max( 8 * task.attempt, 'cpus' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + memory = { 64.GB * task.attempt } + cpus = { 8 * task.attempt } + time = { 8.h * task.attempt } } withName: ABRICATE_RUN { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 2.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: AMRFINDERPLUS_RUN { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: DEEPARG_DOWNLOADDATA { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 - time = { check_max( 2.h * task.attempt, 'time' ) } + time = { 2.h * task.attempt } } withName: DEEPARG_PREDICT { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: FARGENE { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 2.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: RGI_MAIN { - memory = { check_max( 28.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 28.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: AMPIR { - memory = { check_max( 8.GB * task.attempt, 'memory' ) } + memory = { 8.GB * task.attempt } cpus = 1 } withName: AMPLIFY_PREDICT { - memory = { check_max( 16.GB * task.attempt, 'memory' ) } + memory = { 16.GB * task.attempt } cpus = 1 - time = { check_max( 24.h * task.attempt, 'time' ) } + time = { 24.h * task.attempt } } withName: AMP_HMMER_HMMSEARCH { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 2.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: MACREL_CONTIGS { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 4.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: BGC_HMMER_HMMSEARCH { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 2.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: ANTISMASH_ANTISMASHLITE { - memory = { check_max( 64.GB * task.attempt, 'memory' ) } - cpus = { check_max( 8 * task.attempt, 'cpus' ) } - time = { check_max( 12.h * task.attempt, 'time' ) } + memory = { 64.GB * task.attempt } + cpus = { 8 * task.attempt } + time = { 12.h * task.attempt } } withName: ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: DEEPBGC_DOWNLOAD { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 } withName: DEEPBGC_PIPELINE { - memory = { check_max( 2.GB * task.attempt, 'memory' ) } + memory = { 2.GB * task.attempt } cpus = 1 - time = { check_max( 24.h * task.attempt, 'time' ) } + time = { 24.h * task.attempt } } withName: GECCO_RUN { - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - cpus = { check_max( 4 * task.attempt, 'cpus' ) } + memory = { 16.GB * task.attempt } + cpus = { 4 * task.attempt } } withName: HAMRONIZATION_ABRICATE { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: HAMRONIZATION_AMRFINDERPLUS { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: HAMRONIZATION_DEEPARG { - memory = { check_max( 8.GB * task.attempt, 'memory' ) } + memory = { 8.GB * task.attempt } cpus = 1 } withName: HAMRONIZATION_RGI { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: HAMRONIZATION_FARGENE { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: HAMRONIZATION_SUMMARIZE { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: ARGNORM_DEEPARG { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: ARGNORM_ABRICATE { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: ARGNORM_AMRFINDERPLUS { - memory = { check_max( 4.GB * task.attempt, 'memory' ) } + memory = { 4.GB * task.attempt } cpus = 1 } withName: AMPCOMBI2_PARSETABLES { - memory = { check_max( 8.GB * task.attempt, 'memory' ) } - time = { check_max( 2.h * task.attempt, 'time' ) } + memory = { 8.GB * task.attempt } + time = { 2.h * task.attempt } + errorStrategy = { task.exitStatus == 1 ? 'retry' : 'finish' } + maxRetries = 2 // Retry the process up to 2 times } withName: AMPCOMBI2_CLUSTER { - memory = { check_max( 6.GB * task.attempt, 'memory' ) } - time = { check_max( 2.h * task.attempt, 'time' ) } + memory = { 6.GB * task.attempt } + time = { 2.h * task.attempt } } - } diff --git a/conf/igenomes_ignored.config b/conf/igenomes_ignored.config new file mode 100644 index 00000000..b4034d82 --- /dev/null +++ b/conf/igenomes_ignored.config @@ -0,0 +1,9 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for iGenomes paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Empty genomes dictionary to use when igenomes is ignored. +---------------------------------------------------------------------------------------- +*/ + +params.genomes = [:] diff --git a/conf/modules.config b/conf/modules.config index 96b1eb98..59b5738f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -18,8 +18,8 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - withName: 'MULTIQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + withName: MULTIQC { + ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } publishDir = [ path: { "${params.outdir}/multiqc" }, mode: params.publish_dir_mode, @@ -40,8 +40,8 @@ process { enabled: params.save_db, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ - params.taxa_classification_mmseqs_db_savetmp ? "" : "--remove-tmp-files" , + ext.args = [ + params.taxa_classification_mmseqs_db_savetmp ? "" : "--remove-tmp-files" ].join(' ').trim() } @@ -61,7 +61,7 @@ process { enabled: params.save_db, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ params.taxa_classification_mmseqs_taxonomy_savetmp ? "" : "--remove-tmp-files", "--search-type ${params.taxa_classification_mmseqs_taxonomy_searchtype}", "--lca-ranks ${params.taxa_classification_mmseqs_taxonomy_lcaranks}", @@ -69,7 +69,7 @@ process { "-s ${params.taxa_classification_mmseqs_taxonomy_sensitivity}", "--orf-filter-s ${params.taxa_classification_mmseqs_taxonomy_orffilters}", "--lca-mode ${params.taxa_classification_mmseqs_taxonomy_lcamode}", - "--vote-mode ${params.taxa_classification_mmseqs_taxonomy_votemode}", + "--vote-mode ${params.taxa_classification_mmseqs_taxonomy_votemode}" ].join(' ').trim() } @@ -91,32 +91,32 @@ process { enabled: params.bgc_savefilteredcontigs, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--min-len ${params.bgc_mincontiglength}" ].join(' ').trim() } withName: PROKKA { - ext.prefix = { "${meta.id}_prokka" } // to prevent pigz symlink problems of input files if already uncompressed during post-annotation gzipping + ext.prefix = { "${meta.id}_prokka" } publishDir = [ path: { "${params.outdir}/annotation/prokka/${meta.category}/" }, mode: params.publish_dir_mode, enabled: params.save_annotations, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--kingdom ${params.annotation_prokka_kingdom}", "--gcode ${params.annotation_prokka_gcode}", "--mincontiglen ${params.annotation_prokka_mincontiglen}", "--evalue ${params.annotation_prokka_evalue}", "--coverage ${params.annotation_prokka_coverage}", - params.annotation_prokka_retaincontigheaders ? "--force" : "--locustag PROKKA --centre CENTER" , - params.annotation_prokka_singlemode ? '' : '--metagenome' , + params.annotation_prokka_retaincontigheaders ? "--force" : "--locustag PROKKA --centre CENTER", + params.annotation_prokka_singlemode ? '' : '--metagenome', params.annotation_prokka_cdsrnaolap ? '--cdsrnaolap' : '', params.annotation_prokka_rawproduct ? '--rawproduct' : '', params.annotation_prokka_rnammer ? '--rnammer' : '', params.annotation_prokka_compliant ? '--compliant' : '', - params.annotation_prokka_addgenes ? '--addgenes' : '', + params.annotation_prokka_addgenes ? '--addgenes' : '' ].join(' ').trim() } @@ -127,20 +127,20 @@ process { enabled: params.save_db, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--type ${params.annotation_bakta_db_downloadtype}" ].join(' ').trim() } withName: BAKTA_BAKTA { - ext.prefix = { "${meta.id}_bakta" } // to prevent pigz symlink problems of input files if already uncompressed during post-annotation gzipping + ext.prefix = { "${meta.id}_bakta" } publishDir = [ path: { "${params.outdir}/annotation/bakta/${meta.category}/" }, mode: params.publish_dir_mode, enabled: params.save_annotations, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ params.annotation_bakta_singlemode ? '' : '--meta', "--min-contig-length ${params.annotation_bakta_mincontiglen}", "--translation-table ${params.annotation_bakta_translationtable}", @@ -171,7 +171,7 @@ process { pattern: "*.{faa,fna,gbk,faa.gz,faa.gz,fna.gz,gbk.gz}", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ params.annotation_prodigal_singlemode ? "-p single" : "-p meta", params.annotation_prodigal_closed ? "-c" : "", params.annotation_prodigal_forcenonsd ? "-n" : "", @@ -180,7 +180,7 @@ process { } withName: PYRODIGAL { - ext.prefix = { "${meta.id}_pyrodigal" } // to prevent pigz symlink problems of input files if already uncompressed during post-annotation gzipping + ext.prefix = { "${meta.id}_pyrodigal" } publishDir = [ path: { "${params.outdir}/annotation/pyrodigal/${meta.category}/" }, mode: params.publish_dir_mode, @@ -188,7 +188,7 @@ process { pattern: "*.{faa,fna,gbk,score}.gz", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ params.annotation_pyrodigal_singlemode ? "-p single" : "-p meta", params.annotation_pyrodigal_closed ? "-c" : "", params.annotation_pyrodigal_forcenonsd ? "-n" : "", @@ -202,7 +202,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--db ${params.arg_abricate_db_id}", "--minid ${params.arg_abricate_minid}", "--mincov ${params.arg_abricate_mincov}" @@ -224,7 +224,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = { + ext.args = { [ "--ident_min ${params.arg_amrfinderplus_identmin}", "--coverage_min ${params.arg_amrfinderplus_coveragemin}", @@ -250,7 +250,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--type prot", "--min-prob ${params.arg_deeparg_minprob}", "--arg-alignment-identity ${params.arg_deeparg_alignmentidentity}", @@ -261,7 +261,7 @@ process { } withName: FARGENE { - tag = {"${meta.id}|${hmm_model}"} + tag = { "${meta.id}|${hmm_model}" } publishDir = [ [ path: { "${params.outdir}/arg/fargene/${meta.id}" }, @@ -290,12 +290,11 @@ process { ] ] ext.prefix = { "${meta.hmm_class}" } - ext.args = { "--hmm-model ${params.arg_fargene_hmmmodel} --logfile ${meta.id}-${meta.hmm_class}.log --min-orf-length ${params.arg_fargene_minorflength} --score ${params.arg_fargene_score} --translation-format ${params.arg_fargene_translationformat}" } - ext.args = params.arg_fargene_orffinder ? '--orf-finder' : '' + ext.args = { "--hmm-model ${params.arg_fargene_hmmmodel} --logfile ${meta.id}-${meta.hmm_class}.log --min-orf-length ${params.arg_fargene_minorflength} --score ${params.arg_fargene_score} --translation-format ${params.arg_fargene_translationformat}" } + ext.args = params.arg_fargene_orffinder ? '--orf-finder' : '' } withName: UNTAR_CARD { - ext.prefix = "card_database" publishDir = [ [ @@ -305,7 +304,6 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ] - } withName: RGI_CARDANNOTATION { @@ -326,14 +324,14 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, pattern: "*.{txt}" - ], + ], [ path: { "${params.outdir}/arg/rgi/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, pattern: "*.{json}", enabled: params.arg_rgi_savejson - ], + ], [ path: { "${params.outdir}/arg/rgi/${meta.id}/" }, mode: params.publish_dir_mode, @@ -342,7 +340,7 @@ process { enabled: params.arg_rgi_savetmpfiles ] ] - ext.args2 = [ + ext.args2 = [ "--alignment_tool ${params.arg_rgi_alignmenttool}", "--data ${params.arg_rgi_data}", params.arg_rgi_includeloose ? '--include_loose' : '', @@ -371,7 +369,7 @@ process { } withName: AMP_HMMER_HMMSEARCH { - label = { "${meta.id}_${meta.hmm_id}" } + label = { "${meta.id}_${meta.hmm_id}" } publishDir = [ path: { "${params.outdir}/amp/hmmer_hmmsearch/${meta.id}" }, mode: params.publish_dir_mode, @@ -387,11 +385,11 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = "--keep-negatives" + ext.args = "--keep-negatives" } withName: BGC_HMMER_HMMSEARCH { - label = { "${meta.id}_${meta.hmm_id}" } + label = { "${meta.id}_${meta.hmm_id}" } publishDir = [ path: { "${params.outdir}/bgc/hmmer_hmmsearch/${meta.id}" }, mode: params.publish_dir_mode, @@ -418,7 +416,7 @@ process { "--allow-long-headers", "--minlength ${params.bgc_antismash_contigminlength}", "--hmmdetection-strictness ${params.bgc_antismash_hmmdetectionstrictness}", - "--taxon ${params.bgc_antismash_taxon}", + "--taxon ${params.bgc_antismash_taxon}" ].join(' ').trim() } @@ -446,7 +444,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--score ${params.bgc_deepbgc_score}", params.bgc_deepbgc_prodigalsinglemode ? '' : '--prodigal-meta-mode', "--merge-max-protein-gap ${params.bgc_deepbgc_mergemaxproteingap}", @@ -465,7 +463,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ext.args = [ + ext.args = [ "--cds ${params.bgc_gecco_cds}", "--threshold ${params.bgc_gecco_threshold}", "--p-filter ${params.bgc_gecco_pfilter}", @@ -523,7 +521,7 @@ process { publishDir = [ path: { "${params.outdir}/reports/hamronization_summarize" }, mode: params.publish_dir_mode, - saveAs: { (params.run_taxa_classification == false) ? it : null } + saveAs: { params.run_taxa_classification == false ? it : null } ] } @@ -531,7 +529,7 @@ process { publishDir = [ path: { "${params.outdir}/reports/hamronization_summarize" }, mode: params.publish_dir_mode, - saveAs: { _ -> null } // do not save the file + saveAs: { _ -> null } ] } @@ -544,13 +542,12 @@ process { } withName: AMPCOMBI2_PARSETABLES { - publishDir = [ + publishDir = [ path: { "${params.outdir}/reports/ampcombi2/" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - // Have to use a custom `ext` due to deep nested quotes - ext.args = [ + ext.args = [ "--aminoacid_length ${params.amp_ampcombi_parsetables_aalength}", "--db_evalue ${params.amp_ampcombi_parsetables_dbevalue}", "--amp_cutoff ${params.amp_ampcombi_parsetables_cutoff}", @@ -573,12 +570,13 @@ process { saveAs: { filename -> if (filename.equals('versions.yml')) { return filename - } else { + } + else { return !params.run_taxa_classification ? filename : null } - }, + } ] - ext.args = "--log TRUE" + ext.args = "--log TRUE" } withName: AMPCOMBI2_CLUSTER { @@ -588,12 +586,13 @@ process { saveAs: { filename -> if (filename.equals('versions.yml')) { return filename - } else { + } + else { return !params.run_taxa_classification ? filename : null } - }, + } ] - ext.args = [ + ext.args = [ "--cluster_cov_mode ${params.amp_ampcombi_cluster_covmode}", "--cluster_mode ${params.amp_ampcombi_cluster_mode}", "--cluster_coverage ${params.amp_ampcombi_cluster_coverage}", @@ -609,7 +608,7 @@ process { publishDir = [ path: { "${params.outdir}/reports/ampcombi2" }, mode: params.publish_dir_mode, - saveAs: { _ -> null } // do not save the file + saveAs: { _ -> null } ] } @@ -631,39 +630,39 @@ process { withName: ARGNORM_ABRICATE { publishDir = [ - path: {"${params.outdir}/arg/argnorm/abricate/"}, + path: { "${params.outdir}/arg/argnorm/abricate/" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ext.prefix = { "${meta.id}.normalized.tsv" } - ext.args = "--hamronized" + ext.args = "--hamronized" } withName: ARGNORM_AMRFINDERPLUS { publishDir = [ - path: {"${params.outdir}/arg/argnorm/amrfinderplus/"}, + path: { "${params.outdir}/arg/argnorm/amrfinderplus/" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ext.prefix = { "${meta.id}.normalized.tsv" } - ext.args = "--hamronized" + ext.args = "--hamronized" } withName: ARGNORM_DEEPARG { publishDir = [ - path: {"${params.outdir}/arg/argnorm/deeparg/"}, + path: { "${params.outdir}/arg/argnorm/deeparg/" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ext.prefix = { input_tsv.toString().endsWith(".potential.ARG.deeparg.tsv") ? "${meta.id}.potential.ARG.normalized.tsv" : "${meta.id}.ARG.normalized.tsv" } - ext.args = "--hamronized" + ext.args = "--hamronized" } withName: MERGE_TAXONOMY_COMBGC { publishDir = [ path: { "${params.outdir}/reports/combgc" }, mode: params.publish_dir_mode, - saveAs: { _ -> null } // do not save the file + saveAs: { _ -> null } ] } @@ -675,9 +674,9 @@ process { ] } - withName: DRAMP_DOWNLOAD { + withName: AMP_DATABASE_DOWNLOAD { publishDir = [ - path: { "${params.outdir}/databases/dramp" }, + path: { "${params.outdir}/databases/${params.amp_ampcombi_db}" }, mode: params.publish_dir_mode, enabled: params.save_db, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } diff --git a/conf/test.config b/conf/test.config index 907bdd69..61ad1c4d 100644 --- a/conf/test.config +++ b/conf/test.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'AMP/ARG Pyrodigal test profile' config_profile_description = 'Minimal test dataset to check pipeline function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - annotation_tool = 'pyrodigal' + annotation_tool = 'pyrodigal' - run_arg_screening = true - arg_fargene_hmmmodel = 'class_a,class_b_1_2' + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' - run_amp_screening = true - amp_run_hmmsearch = true - amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' } diff --git a/conf/test_bakta.config b/conf/test_bakta.config index 72c540c5..4cd2dacb 100644 --- a/conf/test_bakta.config +++ b/conf/test_bakta.config @@ -10,14 +10,17 @@ ---------------------------------------------------------------------------------------- */ -params { - config_profile_name = 'AMP/ARG Bakta test profile' - config_profile_description = 'Minimal test dataset to check pipeline function' +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' +params { + config_profile_name = 'AMP/ARG Bakta test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' diff --git a/conf/test_bgc_bakta.config b/conf/test_bgc_bakta.config index d879fe38..fba6c3ea 100644 --- a/conf/test_bgc_bakta.config +++ b/conf/test_bgc_bakta.config @@ -10,14 +10,17 @@ ---------------------------------------------------------------------------------------- */ -params { - config_profile_name = 'BGC Bakta test profile' - config_profile_description = 'Minimal test dataset to check BGC workflow function' +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' +params { + config_profile_name = 'BGC Bakta test profile' + config_profile_description = 'Minimal test dataset to check BGC workflow function' // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' diff --git a/conf/test_bgc_prokka.config b/conf/test_bgc_prokka.config index 0a7b4e18..ece6902b 100644 --- a/conf/test_bgc_prokka.config +++ b/conf/test_bgc_prokka.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'BGC Prokka test profile' config_profile_description = 'Minimal test dataset to check BGC workflow function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - annotation_tool = 'prokka' + annotation_tool = 'prokka' - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = true + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true - bgc_run_hmmsearch = true - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' } diff --git a/conf/test_bgc_pyrodigal.config b/conf/test_bgc_pyrodigal.config index f5ef07a9..da83cbd6 100644 --- a/conf/test_bgc_pyrodigal.config +++ b/conf/test_bgc_pyrodigal.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'BGC Pyrodigal test profile' config_profile_description = 'Minimal test dataset to check BGC workflow function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - annotation_tool = 'pyrodigal' + annotation_tool = 'pyrodigal' - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = true + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true - bgc_run_hmmsearch = true - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' } diff --git a/conf/test_nothing.config b/conf/test_nothing.config index 87a2e06b..91640a32 100644 --- a/conf/test_nothing.config +++ b/conf/test_nothing.config @@ -12,42 +12,45 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'Test nothing profile' config_profile_description = 'Minimal test dataset to check pipeline function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' - - annotation_tool = 'pyrodigal' - - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = false - - arg_fargene_hmmmodel = 'class_a,class_b_1_2' - - amp_skip_amplify = true - amp_skip_macrel = true - amp_skip_ampir = true - amp_run_hmmsearch = false - - arg_skip_deeparg = true - arg_skip_fargene = true - arg_skip_rgi = true - arg_skip_amrfinderplus = true - arg_skip_deeparg = true - arg_skip_abricate = true - - bgc_skip_antismash = true - bgc_skip_deepbgc = true - bgc_skip_gecco = true - bgc_run_hmmsearch = false + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + + annotation_tool = 'pyrodigal' + + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = false + + arg_fargene_hmmmodel = 'class_a,class_b_1_2' + + amp_skip_amplify = true + amp_skip_macrel = true + amp_skip_ampir = true + amp_run_hmmsearch = false + + arg_skip_deeparg = true + arg_skip_fargene = true + arg_skip_rgi = true + arg_skip_amrfinderplus = true + arg_skip_deeparg = true + arg_skip_abricate = true + + bgc_skip_antismash = true + bgc_skip_deepbgc = true + bgc_skip_gecco = true + bgc_run_hmmsearch = false } diff --git a/conf/test_preannotated.config b/conf/test_preannotated.config index 38a5e1d1..764304e2 100644 --- a/conf/test_preannotated.config +++ b/conf/test_preannotated.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'ARG/AMP test profile - preannotated input' config_profile_description = 'Minimal test dataset to check pipeline function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '6.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' - annotation_tool = 'pyrodigal' + annotation_tool = 'pyrodigal' - run_arg_screening = true - arg_fargene_hmmmodel = 'class_a,class_b_1_2' + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' - run_amp_screening = true - amp_run_hmmsearch = true - amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' } diff --git a/conf/test_preannotated_bgc.config b/conf/test_preannotated_bgc.config index 039656d3..70d5d1d5 100644 --- a/conf/test_preannotated_bgc.config +++ b/conf/test_preannotated_bgc.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'BGC test profile - preannotated input' config_profile_description = 'Minimal test dataset to check BGC workflow function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '6.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_preannotated.csv' - annotation_tool = 'pyrodigal' + annotation_tool = 'pyrodigal' - run_arg_screening = false - run_amp_screening = false - run_bgc_screening = true + run_arg_screening = false + run_amp_screening = false + run_bgc_screening = true - bgc_run_hmmsearch = true - bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' + bgc_run_hmmsearch = true + bgc_hmmsearch_models = 'https://raw.githubusercontent.com/antismash/antismash/fd61de057e082fbf071732ac64b8b2e8883de32f/antismash/detection/hmm_detection/data/ToyB.hmm' } diff --git a/conf/test_prokka.config b/conf/test_prokka.config index eb346bcb..fd576b81 100644 --- a/conf/test_prokka.config +++ b/conf/test_prokka.config @@ -10,24 +10,27 @@ ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'AMP/ARG Prokka test profile' config_profile_description = 'Minimal test dataset to check pipeline function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '8.GB' - max_time = '6.h' - // Input data - input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' + input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' - annotation_tool = 'prokka' + annotation_tool = 'prokka' - run_arg_screening = true - arg_fargene_hmmmodel = 'class_a,class_b_1_2' + run_arg_screening = true + arg_fargene_hmmmodel = 'class_a,class_b_1_2' - run_amp_screening = true - amp_run_hmmsearch = true - amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' + run_amp_screening = true + amp_run_hmmsearch = true + amp_hmmsearch_models = params.pipelines_testdata_base_path + 'funcscan/hmms/mybacteriocin.hmm' } diff --git a/conf/test_taxonomy_bakta.config b/conf/test_taxonomy_bakta.config index e7bc923d..6763c48e 100644 --- a/conf/test_taxonomy_bakta.config +++ b/conf/test_taxonomy_bakta.config @@ -10,14 +10,20 @@ ---------------------------------------------------------------------------------------- */ -params { - config_profile_name = 'Taxonomic classification test profile' - config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] + withName: MMSEQS_DATABASES { + memory = '14.GB' + } +} - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '14.GB' - max_time = '6.h' +params { + config_profile_name = 'Taxonomic classification test profile' + config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' @@ -42,9 +48,3 @@ params { bgc_antismash_contigminlength = 1000 bgc_run_hmmsearch = true } - -process { - withName: MMSEQS_DATABASES { - memory = '14.GB' - } -} diff --git a/conf/test_taxonomy_prokka.config b/conf/test_taxonomy_prokka.config index 39eefdfc..e126624f 100644 --- a/conf/test_taxonomy_prokka.config +++ b/conf/test_taxonomy_prokka.config @@ -10,14 +10,20 @@ ---------------------------------------------------------------------------------------- */ -params { - config_profile_name = 'Taxonomic classification test profile' - config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] + withName: MMSEQS_DATABASES { + memory = '14.GB' + } +} - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '14.GB' - max_time = '6.h' +params { + config_profile_name = 'Taxonomic classification test profile' + config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' @@ -41,9 +47,3 @@ params { bgc_antismash_contigminlength = 1000 bgc_run_hmmsearch = true } - -process { - withName: MMSEQS_DATABASES { - memory = '14.GB' - } -} diff --git a/conf/test_taxonomy_pyrodigal.config b/conf/test_taxonomy_pyrodigal.config index 4ad970f9..cbe89dc3 100644 --- a/conf/test_taxonomy_pyrodigal.config +++ b/conf/test_taxonomy_pyrodigal.config @@ -10,14 +10,20 @@ ---------------------------------------------------------------------------------------- */ -params { - config_profile_name = 'Taxonomic classification test profile' - config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] + withName: MMSEQS_DATABASES { + memory = '14.GB' + } +} - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '14.GB' - max_time = '6.h' +params { + config_profile_name = 'Taxonomic classification test profile' + config_profile_description = 'Minimal test dataset to check taxonomic classification workflow function' // Input data input = params.pipelines_testdata_base_path + 'funcscan/samplesheet_reduced.csv' @@ -41,9 +47,3 @@ params { bgc_antismash_contigminlength = 1000 bgc_run_hmmsearch = true } - -process { - withName: MMSEQS_DATABASES { - memory = '14.GB' - } -} diff --git a/docs/images/funcscan_metro_workflow_dark.png b/docs/images/funcscan_metro_workflow_dark.png new file mode 100644 index 00000000..7656d595 Binary files /dev/null and b/docs/images/funcscan_metro_workflow_dark.png differ diff --git a/docs/images/funcscan_metro_workflow_dark.svg b/docs/images/funcscan_metro_workflow_dark.svg new file mode 100644 index 00000000..bb30861e --- /dev/null +++ b/docs/images/funcscan_metro_workflow_dark.svg @@ -0,0 +1,3223 @@ + + + +vcfvcftsvhAMRonizationABRicateAMRFinderPlusDeepARGfARGeneRGIgunzipMMseqs2SeqKitProkkaProdigalPyrodigalBaktaAMPcombicomBGCSummaryantiSMASHGECCODeepBGChmmsearchhmmsearchampirAMPlifyMacrelfuncscanv2.0vcfvcffastavcfvcfgbkvcfvcffaa()vcfvcftsvargNormLEGENDAntimicrobial Peptide Genes (AMPs)Biosynthetic Gene Clusters (BGCs)Antibiotic Resistance Genes (ARGs)Taxonomic ClassificationScreening ToolsPreprocessing ToolsPostprocessing ToolsOptional Input() diff --git a/docs/images/mqc_fastqc_adapter.png b/docs/images/mqc_fastqc_adapter.png deleted file mode 100755 index 361d0e47..00000000 Binary files a/docs/images/mqc_fastqc_adapter.png and /dev/null differ diff --git a/docs/images/mqc_fastqc_counts.png b/docs/images/mqc_fastqc_counts.png deleted file mode 100755 index cb39ebb8..00000000 Binary files a/docs/images/mqc_fastqc_counts.png and /dev/null differ diff --git a/docs/images/mqc_fastqc_quality.png b/docs/images/mqc_fastqc_quality.png deleted file mode 100755 index a4b89bf5..00000000 Binary files a/docs/images/mqc_fastqc_quality.png and /dev/null differ diff --git a/docs/output.md b/docs/output.md index 9f71278a..0920236c 100644 --- a/docs/output.md +++ b/docs/output.md @@ -457,15 +457,15 @@ Note that filtered FASTA is only used for BGC workflow for run-time optimisation - `Ampcombi_parse_tables.log`: log file containing the run information from AMPcombi submodule `ampcombi2/parsetables` - `Ampcombi_complete.log`: log file containing the run information from AMPcombi submodule `ampcombi2/complete` - `Ampcombi_summary_cluster.tsv`: tab-separated table containing the clustered AMP hits. This is the output given when the taxonomic classification is not activated (pipeline default). - - `Ampcombi_summary_cluster_representative_seq.tsv`: tab-separated table containing the representative sequence of each cluster. This can be used in AMPcombi for constructing 3D structures using ColabFold. For more details on how to do this, please refer to the [AMPcombi documentation](https://github.com/Darcy220606/AMPcombi/blob/main/README.md). + - `Ampcombi_summary_cluster_representative_seq.tsv`: tab-separated table containing the representative sequence of each cluster. This can be used in AMPcombi for constructing 3D structures using ColabFold. For more details on how to do this, please refer to the [AMPcombi documentation](https://ampcombi.readthedocs.io/en/main/). - `Ampcombi_cluster.log`: log file containing the run information from AMPcombi submodule `ampcombi2/cluster` - `ampcombi_complete_summary_taxonomy.tsv.gz`: summarised output from all AMP workflow tools with taxonomic assignment in compressed tsv format. This is the same output as `Ampcombi_summary_cluster.tsv` file but with taxonomic classification of the contig. - `/contig_gbks`: contains all the contigs in gbk format that an AMP was found on using the custom parameters - `/*_ampcombi.log`: a log file generated by AMPcombi - `/*_ampcombi.tsv`: summarised output in tsv format for each sample - `/*_amp.faa*`: fasta file containing the amino acid sequences for all AMP hits for each sample - - `/*_diamond_matches.txt*`: alignment file generated by DIAMOND for each sample - AMP summary table header descriptions + - `/*_mmseqs_matches.txt*`: alignment file generated by MMseqs2 for each sample + AMP summary table header descriptions using DRAMP as reference database | Table column | Description | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -477,9 +477,9 @@ Note that filtered FASTA is only used for BGC workflow for run-time optimisation | `prob_amplify` | Probability associated with the AMP prediction using `AMPLIFY` | | `evalue_hmmer` | Expected number of false positives (nonhomologous sequences) with a similar of higher score. This stands for how significant the hit is, the lower the evalue, the more significant the hit | | `aa_sequence` | Amino acid sequence that forms part of the contig and is AMP encoding | -| `target_id` | [DRAMP](http://dramp.cpu-bioinfor.org/) ID within the database found to be similar to the predicted AMP by `DIAMOND` alignment | +| `target_id` | [DRAMP](http://dramp.cpu-bioinfor.org/) ID within the database found to be similar to the predicted AMP by `MMseqs2` alignment | | `pident` | Percentage identity of amino acid residues that fully aligned between the `DRAMP` sequence and the predicted AMP sequence | -| `evalue` | Number of alignments of similar or better qualities that can be expected when searching a database of similar size with a random sequence distribution. This is generated by `DIAMOND` alignments using the [DRAMP](http://dramp.cpu-bioinfor.org/) AMP database. The lower the value the more significant that the hit is positive. An e-value of < 0.001 means that the this hit will be found by chance once per 1,0000 queries | +| `evalue` | Number of alignments of similar or better qualities that can be expected when searching a database of similar size with a random sequence distribution. This is generated by `MMseqs2` alignments using the [DRAMP](http://dramp.cpu-bioinfor.org/) AMP database. The lower the value the more significant that the hit is positive. An e-value of < 0.001 means that the this hit will be found by chance once per 1,0000 queries | | `Sequence` | Sequence corresponding to the `DRAMP` ID found to be similar to the predicted AMP sequence | | `Sequence_length` | Number of amino acid residues in the `DRAMP` sequence | | `Name` | Full name of the peptide copied from the database it was uploaded to | @@ -510,7 +510,9 @@ Note that filtered FASTA is only used for BGC workflow for run-time optimisation -[AMPcombi](https://github.com/Darcy220606/AMPcombi) summarizes the results of **antimicrobial peptide (AMP)** prediction tools (ampir, AMPlify, Macrel, and other non-nf-core tools) into a single table and aligns the hits against a reference AMP database for functional and taxonomic classification. It assigns the physiochemical properties (e.g. hydrophobicity, molecular weight) using the [Biopython toolkit](https://github.com/biopython/biopython). Additionally, it clusters the resulting AMP hits from all samples using [MMseqs2](https://github.com/soedinglab/MMseqs2). For further filtering for AMPs with signaling peptides, the output file `Ampcombi_summary_cluster.tsv` or `ampcombi_complete_summary_taxonomy.tsv.gz` can be used downstream as detailed [here](https://github.com/Darcy220606/AMPcombi/blob/main/README.md). +[AMPcombi](https://github.com/Darcy220606/AMPcombi) summarizes the results of **antimicrobial peptide (AMP)** prediction tools (ampir, AMPlify, Macrel, and other non-nf-core supported tools) into a single table and aligns the hits against a reference AMP database for functional, structural and taxonomic classification using [MMseqs2](https://github.com/soedinglab/MMseqs2). It further assigns the physiochemical properties (e.g. hydrophobicity, molecular weight) using the [Biopython toolkit](https://github.com/biopython/biopython) and clusters the resulting AMP hits from all samples using [MMseqs2](https://github.com/soedinglab/MMseqs2). To further filter the recovered AMPs using the presence of signaling peptides, the output file `Ampcombi_summary_cluster.tsv` or `ampcombi_complete_summary_taxonomy.tsv.gz` can be used downstream as detailed [here](https://ampcombi.readthedocs.io/en/main/usage.html#signal-peptide). The final tables generated may also be visualized and explored using an interactive [user interface](https://ampcombi.readthedocs.io/en/main/visualization.html). + +AMPcombi interface #### hAMRonization diff --git a/docs/usage.md b/docs/usage.md index 6c3c1088..a2fce4f6 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -58,9 +58,9 @@ The above pipeline run specified with a params file in yaml format: nextflow run nf-core/funcscan -profile docker -params-file params.yaml ``` -with `params.yaml` containing: +with: -```yaml +```yaml title="params.yaml" input: './samplesheet.csv' outdir: './results/' genome: 'GRCh37' @@ -224,14 +224,35 @@ wget https://github.com/nf-core/funcscan/raw//bin/ampcombi_dow python3 ampcombi_download.py ``` -However, the user can also supply their own custom AMP database by following the guidelines in [AMPcombi](https://github.com/Darcy220606/AMPcombi). +In addition to [DRAMP](http://dramp.cpu-bioinfor.org/), two more reference databases can be used to classify the recovered AMPs in the AMP workflow; [APD](https://aps.unmc.edu/) and [UniRef100](https://academic.oup.com/bioinformatics/article/23/10/1282/197795). Only one database can be used at a time using `--amp_ampcombi_db database_name`. + +However, the user can also supply their own custom AMP database by following the guidelines in [AMPcombi](https://ampcombi.readthedocs.io/en/main/). This can then be passed to the pipeline with: ```bash ---amp_ampcombi_db '/// +--amp_ampcombi_db_dir_path '/// ``` -The contents of the directory should have files such as `*.dmnd` and `*.fasta` in the top level. +The contents of the directory should have files such as `*.fasta` and `*.tsv` in the top level; a fasta file and the corresponding table with structural, functional and (if reported) taxonomic classifications. AMPcombi will then generate the corresponding `mmseqs2` directory, in which all binary files are prepared for downstream alignment of the recovered AMPs with [MMseqs2](https://github.com/soedinglab/MMseqs2). These can also be provided by the user by setting up an mmseqs2 compatible database using `mmseqs createdb *.fasta` in a directory called `mmseqs2`. An example file structure for [DRAMP](http://dramp.cpu-bioinfor.org/) used as the reference database: + +```bash +amp_DRAMP_database/ +├── general_amps_2024_11_13.fasta +├── general_amps_2024_11_13.txt +└── mmseqs2 + ├── ref_DB + ├── ref_DB.dbtype + ├── ref_DB_h + ├── ref_DB_h.dbtype + ├── ref_DB_h.index + ├── ref_DB.index + ├── ref_DB.lookup + └── ref_DB.source +``` + +:::note{.fa-whale} +For both [DRAMP](http://dramp.cpu-bioinfor.org/) and [APD](https://aps.unmc.edu/), AMPcombi removes entries that contains any non amino acid residues by default. +::: :::warning The pipeline will automatically run Pyrodigal instead of Prodigal if the parameters `--run_annotation_tool prodigal --run_amp_screening` are both provided. @@ -592,14 +613,6 @@ See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs). -## Azure Resource Requests - -To be used with the `azurebatch` profile by specifying the `-profile azurebatch`. -We recommend providing a compute `params.vm_type` of `Standard_D16_v3` VMs by default but these options can be changed if required. - -Note that the choice of VM size depends on your quota and the overall workload during the analysis. -For a thorough list, please refer the [Azure Sizes for virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). - ## Running in the background Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished. diff --git a/main.nf b/main.nf index 529aa3ee..39d0e261 100644 --- a/main.nf +++ b/main.nf @@ -9,8 +9,6 @@ ---------------------------------------------------------------------------------------- */ -nextflow.enable.dsl = 2 - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS @@ -21,7 +19,6 @@ include { FUNCSCAN } from './workflows/funcscan' include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_funcscan_pipeline' include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_funcscan_pipeline' - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GENOME PARAMETER VALUES @@ -51,10 +48,8 @@ workflow NFCORE_FUNCSCAN { FUNCSCAN ( samplesheet ) - emit: multiqc_report = FUNCSCAN.out.multiqc_report // channel: /path/to/multiqc_report.html - } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -65,13 +60,11 @@ workflow NFCORE_FUNCSCAN { workflow { main: - // // SUBWORKFLOW: Run initialisation tasks // PIPELINE_INITIALISATION ( params.version, - params.help, params.validate_params, params.monochrome_logs, args, @@ -85,7 +78,6 @@ workflow { NFCORE_FUNCSCAN ( PIPELINE_INITIALISATION.out.samplesheet ) - // // SUBWORKFLOW: Run completion tasks // diff --git a/modules.json b/modules.json index c8fdad1a..3dd4848b 100644 --- a/modules.json +++ b/modules.json @@ -7,207 +7,207 @@ "nf-core": { "abricate/run": { "branch": "master", - "git_sha": "9837ac7d7bb2e2362c021e8dc08efa96190b49a4", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "ampcombi2/cluster": { "branch": "master", - "git_sha": "900f6c970712e41b783e21e5dfc30f052174b5cd", + "git_sha": "993865fe60cb1569155fbbbe0cee113e1127abaf", "installed_by": ["modules"] }, "ampcombi2/complete": { "branch": "master", - "git_sha": "900f6c970712e41b783e21e5dfc30f052174b5cd", + "git_sha": "993865fe60cb1569155fbbbe0cee113e1127abaf", "installed_by": ["modules"] }, "ampcombi2/parsetables": { "branch": "master", - "git_sha": "900f6c970712e41b783e21e5dfc30f052174b5cd", + "git_sha": "993865fe60cb1569155fbbbe0cee113e1127abaf", "installed_by": ["modules"] }, "ampir": { "branch": "master", - "git_sha": "9bfc81874554e87740bcb3e5e07acf0a153c9ecb", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "amplify/predict": { "branch": "master", - "git_sha": "730f3aee80d5f8d0b5fc532202ac59361414d006", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "amrfinderplus/run": { "branch": "master", - "git_sha": "c0514dfc403fa97c96f549de6abe99f03c78fe8d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "amrfinderplus/update": { "branch": "master", - "git_sha": "8f4a5d5ad55715f6c905ab73ce49f677cf6092fc", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "antismash/antismashlite": { "branch": "master", - "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "antismash/antismashlitedownloaddatabases": { "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "argnorm": { "branch": "master", - "git_sha": "e4fc46af5ec30070e6aef780aba14f89a28caa88", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bakta/bakta": { "branch": "master", - "git_sha": "52507581f62929f98dd6e6c5c5824583fa6ef94d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bakta/baktadbdownload": { "branch": "master", - "git_sha": "7c06e6820fa3918bc28a040e794f8a2b39fabadb", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "deeparg/downloaddata": { "branch": "master", - "git_sha": "0af92e0fe6a34f31ee41eae66f04d71850fb4beb", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "deeparg/predict": { "branch": "master", - "git_sha": "90b63cde0f838ca4da3a88a37a5309888cae97b9", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "deepbgc/download": { "branch": "master", - "git_sha": "f315f85d9ac6c321f6e3596493fd61019340df2a", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "deepbgc/pipeline": { "branch": "master", - "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "fargene": { "branch": "master", - "git_sha": "5e8481d994963871e3faf061d6fbf02fe33d8cad", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gecco/run": { "branch": "master", - "git_sha": "f9707f9499a90a46208873d23440e22ac8ad5ebc", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gunzip": { "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/abricate": { "branch": "master", - "git_sha": "9837ac7d7bb2e2362c021e8dc08efa96190b49a4", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/amrfinderplus": { "branch": "master", - "git_sha": "52ddbb3ad754d870e485bcfcb680fe6a49d83567", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/deeparg": { "branch": "master", - "git_sha": "9837ac7d7bb2e2362c021e8dc08efa96190b49a4", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/fargene": { "branch": "master", - "git_sha": "9cf6f5e4ad9cc11a670a94d56021f1c4f9a91ec1", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/rgi": { "branch": "master", - "git_sha": "483e4838a2a009e826ea14da0dfc6bcaccef5ad1", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hamronization/summarize": { "branch": "master", - "git_sha": "9837ac7d7bb2e2362c021e8dc08efa96190b49a4", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hmmer/hmmsearch": { "branch": "master", - "git_sha": "b046a286c8240ebe3412ddf8ae901d47008d1ca7", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "macrel/contigs": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "mmseqs/createdb": { "branch": "master", - "git_sha": "89fe39b745da3dca14ad1a361784812ea3aa3a43", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "mmseqs/createtsv": { "branch": "master", - "git_sha": "89fe39b745da3dca14ad1a361784812ea3aa3a43", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "mmseqs/databases": { "branch": "master", - "git_sha": "151460db852d636979d9ff3ee631e2268060d4c3", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "mmseqs/taxonomy": { "branch": "master", - "git_sha": "89fe39b745da3dca14ad1a361784812ea3aa3a43", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "878d2adbb911aa6e15c06a4d1e93d01bd6f26c74", + "git_sha": "cf17ca47590cc578dfb47db1c2a44ef86f89976d", "installed_by": ["modules"] }, "prodigal": { "branch": "master", - "git_sha": "5e8481d994963871e3faf061d6fbf02fe33d8cad", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "prokka": { "branch": "master", - "git_sha": "697d97d46d56b12ff46a1a848a36849527cea0b8", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "pyrodigal": { "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rgi/cardannotation": { "branch": "master", - "git_sha": "dbbb0c509e044d2680b429ba622049d4a23426dc", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rgi/main": { "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "seqkit/seq": { "branch": "master", - "git_sha": "03fbf6c89e551bd8d77f3b751fb5c955f75b34c5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", - "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "untar": { "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"], "patch": "modules/nf-core/untar/untar.diff" } @@ -217,17 +217,17 @@ "nf-core": { "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", + "git_sha": "1b6b9a3338d011367137808b49b923515080e3ba", "installed_by": ["subworkflows"] }, - "utils_nfvalidation_plugin": { + "utils_nfschema_plugin": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "bbd5a41f4535a8defafe6080e00ea74c45f4f96c", "installed_by": ["subworkflows"] } } diff --git a/modules/local/dramp_download.nf b/modules/local/amp_database_download.nf similarity index 50% rename from modules/local/dramp_download.nf rename to modules/local/amp_database_download.nf index 8b7eb2d1..8e2bc05a 100644 --- a/modules/local/dramp_download.nf +++ b/modules/local/amp_database_download.nf @@ -1,22 +1,26 @@ -process DRAMP_DOWNLOAD { +process AMP_DATABASE_DOWNLOAD { label 'process_single' - conda "bioconda::ampcombi=0.2.2" + conda "bioconda::ampcombi=2.0.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0': - 'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0': + 'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }" + + input: + val database_id output: - path "amp_ref_database/" , emit: db - path "versions.yml" , emit: versions + path "amp_${database_id}_database" , emit: db + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: // This script is bundled with the pipeline, in nf-core/funcscan/bin/ """ - mkdir amp_ref_database/ - ampcombi_download.py + ampcombi_download.py \\ + --database_id $database_id \\ + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/abricate/run/environment.yml b/modules/nf-core/abricate/run/environment.yml index 4b2a1d2a..c7a7d199 100644 --- a/modules/nf-core/abricate/run/environment.yml +++ b/modules/nf-core/abricate/run/environment.yml @@ -1,7 +1,5 @@ -name: abricate_run channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::abricate=1.0.1 diff --git a/modules/nf-core/abricate/run/meta.yml b/modules/nf-core/abricate/run/meta.yml index 927c21f6..dce78f3c 100644 --- a/modules/nf-core/abricate/run/meta.yml +++ b/modules/nf-core/abricate/run/meta.yml @@ -11,34 +11,38 @@ tools: documentation: https://github.com/tseemann/abricate tool_dev_url: https://github.com/tseemann/abricate licence: ["GPL v2"] + identifier: biotools:ABRicate input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - assembly: - type: file - description: FASTA, GenBank or EMBL formatted file - pattern: "*.{fa,fasta,fna,fa.gz,fasta.gz,fna.gz,gbk,gbk.gz,embl,embl.gz}" - - databasedir: - type: directory - description: Optional location of local copy of database files, possibly with custom databases set up with `abricate --setupdb` - pattern: "*/" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - assembly: + type: file + description: FASTA, GenBank or EMBL formatted file + pattern: "*.{fa,fasta,fna,fa.gz,fasta.gz,fna.gz,gbk,gbk.gz,embl,embl.gz}" + - - databasedir: + type: directory + description: Optional location of local copy of database files, possibly with + custom databases set up with `abricate --setupdb` + pattern: "*/" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - report: - type: file - description: Tab-delimited report of results - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.txt": + type: file + description: Tab-delimited report of results + pattern: "*.{txt}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" maintainers: diff --git a/modules/nf-core/ampcombi2/cluster/environment.yml b/modules/nf-core/ampcombi2/cluster/environment.yml index aa5e5fe4..f9c25b04 100644 --- a/modules/nf-core/ampcombi2/cluster/environment.yml +++ b/modules/nf-core/ampcombi2/cluster/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "ampcombi2_cluster" channels: - conda-forge - bioconda - - defaults dependencies: - - "bioconda::ampcombi=0.2.2" + - "bioconda::ampcombi=2.0.1" diff --git a/modules/nf-core/ampcombi2/cluster/main.nf b/modules/nf-core/ampcombi2/cluster/main.nf index 90495dba..98a19a96 100644 --- a/modules/nf-core/ampcombi2/cluster/main.nf +++ b/modules/nf-core/ampcombi2/cluster/main.nf @@ -4,8 +4,8 @@ process AMPCOMBI2_CLUSTER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0': - 'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0': + 'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }" input: path(summary_file) diff --git a/modules/nf-core/ampcombi2/cluster/meta.yml b/modules/nf-core/ampcombi2/cluster/meta.yml index 60949dc3..2e37a0c2 100644 --- a/modules/nf-core/ampcombi2/cluster/meta.yml +++ b/modules/nf-core/ampcombi2/cluster/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "ampcombi2_cluster" -description: A submodule that clusters the merged AMP hits generated from ampcombi2/parsetables and ampcombi2/complete using MMseqs2 cluster. +description: A submodule that clusters the merged AMP hits generated from ampcombi2/parsetables + and ampcombi2/complete using MMseqs2 cluster. keywords: - antimicrobial peptides - amps @@ -12,36 +12,46 @@ keywords: - mmseqs2 tools: - ampcombi2/cluster: - description: "A tool for clustering all AMP hits found across many samples and supporting many AMP prediction tools." + description: "A tool for clustering all AMP hits found across many samples and + supporting many AMP prediction tools." homepage: "https://github.com/Darcy220606/AMPcombi" documentation: "https://github.com/Darcy220606/AMPcombi" tool_dev_url: "https://github.com/Darcy220606/AMPcombi/tree/dev" licence: ["MIT"] + identifier: "" input: - - summary_file: - type: file - description: A file corresponding to the Ampcombi_summary.tsv that is generated by running 'ampcombi complete'. It is a file containing all the merged AMP results from all samples and all tools. - pattern: "*.tsv" - + - - summary_file: + type: file + description: A file corresponding to the Ampcombi_summary.tsv that is generated + by running 'ampcombi complete'. It is a file containing all the merged AMP + results from all samples and all tools. + pattern: "*.tsv" output: - cluster_tsv: - type: file - description: A file containing all the results from the merged input table 'Ampcombi_summary.tsv', but also including the cluster id number. The clustering is done using MMseqs2 cluster. - pattern: "*.tsv" + - Ampcombi_summary_cluster.tsv: + type: file + description: A file containing all the results from the merged input table 'Ampcombi_summary.tsv', + but also including the cluster id number. The clustering is done using MMseqs2 + cluster. + pattern: "*.tsv" - rep_cluster_tsv: - type: file - description: A file containing the representative sequences of the clusters estimated by the tool. The clustering is done using MMseqs2 cluster. - pattern: "*.tsv" + - Ampcombi_summary_cluster_representative_seq.tsv: + type: file + description: A file containing the representative sequences of the clusters + estimated by the tool. The clustering is done using MMseqs2 cluster. + pattern: "*.tsv" - log: - type: file - description: A log file that captures the standard output for the entire process in a log file. Can be activated by `--log`. - pattern: "*.log" + - Ampcombi_cluster.log: + type: file + description: A log file that captures the standard output for the entire process + in a log file. Can be activated by `--log`. + pattern: "*.log" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@darcy220606" maintainers: diff --git a/modules/nf-core/ampcombi2/cluster/tests/main.nf.test b/modules/nf-core/ampcombi2/cluster/tests/main.nf.test deleted file mode 100644 index 49bee6cf..00000000 --- a/modules/nf-core/ampcombi2/cluster/tests/main.nf.test +++ /dev/null @@ -1,65 +0,0 @@ -nextflow_process { - - name "Test Process AMPCOMBI2_CLUSTER" - script "../main.nf" - process "AMPCOMBI2_CLUSTER" - - tag "modules" - tag "modules_nfcore" - tag "ampcombi2" - tag "ampcombi2/cluster" - tag "ampcombi2/complete" - - setup { - run("AMPCOMBI2_COMPLETE") { - script "../../../ampcombi2/complete/main.nf" - process { - """ - input[0] = - [ - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_1_ampcombi.tsv', checkIfExists: true), - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_2_ampcombi.tsv', checkIfExists: true) - ] - """ - } - } - } - - test("ampcombi2_cluster - metagenome") { - when { - process { - """ - input[0] = AMPCOMBI2_COMPLETE.out.tsv - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.cluster_tsv[0]).readLines()[0].contains("Linear/Cyclic/Branched"), - file(process.out.rep_cluster_tsv[0]).readLines()[0].contains("total_cluster_members"), - process.out.versions).match() } - ) - } - } - - test("ampcombi2_cluster - metagenome - stub") { - options "-stub" - when { - process { - """ - input[0] = AMPCOMBI2_COMPLETE.out.tsv - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap b/modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap index f4123c76..fd79a83b 100644 --- a/modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap +++ b/modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap @@ -4,14 +4,14 @@ true, true, [ - "versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca" + "versions.yml:md5,b629089d44775078dce5e664a455422b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-24T12:11:40.928513749" + "timestamp": "2024-12-03T07:57:01.869983435" }, "ampcombi2_cluster - metagenome - stub": { "content": [ @@ -26,7 +26,7 @@ "Ampcombi_cluster.log:md5,d41d8cd98f00b204e9800998ecf8427e" ], "3": [ - "versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca" + "versions.yml:md5,b629089d44775078dce5e664a455422b" ], "cluster_tsv": [ "Ampcombi_summary_cluster.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" @@ -38,14 +38,14 @@ "Ampcombi_summary_cluster_representative_seq.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "versions": [ - "versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca" + "versions.yml:md5,b629089d44775078dce5e664a455422b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-24T12:12:08.780718892" + "timestamp": "2024-12-03T07:57:23.939137628" } } \ No newline at end of file diff --git a/modules/nf-core/ampcombi2/cluster/tests/tags.yml b/modules/nf-core/ampcombi2/cluster/tests/tags.yml deleted file mode 100644 index 783f4d52..00000000 --- a/modules/nf-core/ampcombi2/cluster/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ampcombi2/cluster: - - "modules/nf-core/ampcombi2/cluster/**" diff --git a/modules/nf-core/ampcombi2/complete/environment.yml b/modules/nf-core/ampcombi2/complete/environment.yml index fa640b77..f9c25b04 100644 --- a/modules/nf-core/ampcombi2/complete/environment.yml +++ b/modules/nf-core/ampcombi2/complete/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "ampcombi2_complete" channels: - conda-forge - bioconda - - defaults dependencies: - - "bioconda::ampcombi=0.2.2" + - "bioconda::ampcombi=2.0.1" diff --git a/modules/nf-core/ampcombi2/complete/main.nf b/modules/nf-core/ampcombi2/complete/main.nf index 0e4d5d53..98f62347 100644 --- a/modules/nf-core/ampcombi2/complete/main.nf +++ b/modules/nf-core/ampcombi2/complete/main.nf @@ -4,8 +4,8 @@ process AMPCOMBI2_COMPLETE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0': - 'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0': + 'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }" input: path(summaries) diff --git a/modules/nf-core/ampcombi2/complete/meta.yml b/modules/nf-core/ampcombi2/complete/meta.yml index e9ae632c..13a7468b 100644 --- a/modules/nf-core/ampcombi2/complete/meta.yml +++ b/modules/nf-core/ampcombi2/complete/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "ampcombi2_complete" -description: A submodule that merges all output summary tables from ampcombi/parsetables in one summary file. +description: A submodule that merges all output summary tables from ampcombi/parsetables + in one summary file. keywords: - antimicrobial peptides - amps @@ -18,32 +18,38 @@ keywords: - DRAMP tools: - ampcombi2/complete: - description: "This merges the per sample AMPcombi summaries generated by running 'ampcombi2/parsetables'." + description: "This merges the per sample AMPcombi summaries generated by running + 'ampcombi2/parsetables'." homepage: "https://github.com/Darcy220606/AMPcombi" documentation: "https://github.com/Darcy220606/AMPcombi" tool_dev_url: "https://github.com/Darcy220606/AMPcombi/tree/dev" licence: ["MIT"] + identifier: "" input: - - summaries: - type: list - description: The path to the list of files corresponding to each sample as generated by ampcombi2/parsetables. - pattern: "[*_ampcombi.tsv, *_ampcombi.tsv]" - + - - summaries: + type: list + description: The path to the list of files corresponding to each sample as generated + by ampcombi2/parsetables. + pattern: "[*_ampcombi.tsv, *_ampcombi.tsv]" output: - tsv: - type: file - description: A file containing the complete AMPcombi summaries from all processed samples. - pattern: "*.tsv" + - Ampcombi_summary.tsv: + type: file + description: A file containing the complete AMPcombi summaries from all processed + samples. + pattern: "*.tsv" - log: - type: file - description: A log file that captures the standard output for the entire process in a log file. Can be activated by `--log`. - pattern: "*.log" + - Ampcombi_complete.log: + type: file + description: A log file that captures the standard output for the entire process + in a log file. Can be activated by `--log`. + pattern: "*.log" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@darcy220606" maintainers: diff --git a/modules/nf-core/ampcombi2/complete/tests/main.nf.test b/modules/nf-core/ampcombi2/complete/tests/main.nf.test deleted file mode 100644 index 176d975f..00000000 --- a/modules/nf-core/ampcombi2/complete/tests/main.nf.test +++ /dev/null @@ -1,56 +0,0 @@ -nextflow_process { - - name "Test Process AMPCOMBI2_COMPLETE" - script "../main.nf" - process "AMPCOMBI2_COMPLETE" - - tag "modules" - tag "modules_nfcore" - tag "ampcombi2" - tag "ampcombi2/complete" - - test("ampcombi2_complete - contigs") { - when { - process { - """ - input[0] = - [ - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_1_ampcombi.tsv', checkIfExists: true), - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_2_ampcombi.tsv', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.tsv[0]).readLines()[0].contains("ampir"), - process.out.versions).match() } - ) - } - } - - test("ampcombi2_complete - contigs - stub") { - options "-stub" - when { - process { - """ - input[0] = - [ - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_1_ampcombi.tsv', checkIfExists: true), - file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/ampcombi/ampcombi2/sample_2_ampcombi.tsv', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap b/modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap index cd8fa18f..87435e5b 100644 --- a/modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap +++ b/modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap @@ -6,39 +6,39 @@ "Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "1": [ - + ], "2": [ - "versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440" + "versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0" ], "log": [ - + ], "tsv": [ "Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "versions": [ - "versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440" + "versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-29T11:55:16.030399422" + "timestamp": "2024-12-03T07:57:53.385349848" }, "ampcombi2_complete - contigs": { "content": [ true, [ - "versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440" + "versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-29T11:54:54.334224301" + "timestamp": "2024-12-03T07:57:40.263912946" } -} \ No newline at end of file +} diff --git a/modules/nf-core/ampcombi2/complete/tests/tags.yml b/modules/nf-core/ampcombi2/complete/tests/tags.yml deleted file mode 100644 index f8ac5fee..00000000 --- a/modules/nf-core/ampcombi2/complete/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ampcombi2/complete: - - "modules/nf-core/ampcombi2/complete/**" diff --git a/modules/nf-core/ampcombi2/parsetables/environment.yml b/modules/nf-core/ampcombi2/parsetables/environment.yml index 7a4b37ab..f9c25b04 100644 --- a/modules/nf-core/ampcombi2/parsetables/environment.yml +++ b/modules/nf-core/ampcombi2/parsetables/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "ampcombi2_parsetables" channels: - conda-forge - bioconda - - defaults dependencies: - - "bioconda::ampcombi=0.2.2" + - "bioconda::ampcombi=2.0.1" diff --git a/modules/nf-core/ampcombi2/parsetables/main.nf b/modules/nf-core/ampcombi2/parsetables/main.nf index d779440b..b9d855df 100644 --- a/modules/nf-core/ampcombi2/parsetables/main.nf +++ b/modules/nf-core/ampcombi2/parsetables/main.nf @@ -1,31 +1,33 @@ process AMPCOMBI2_PARSETABLES { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0': - 'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0': + 'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }" input: tuple val(meta), path(amp_input) - path(faa_input) - path(gbk_input) - path(opt_amp_db) + path faa_input + path gbk_input + val opt_amp_db + path opt_amp_db_dir + path opt_interproscan output: - tuple val(meta), path("${meta.id}/") , emit: sample_dir - tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks - tuple val(meta), path("${meta.id}/${meta.id}_diamond_matches.txt"), emit: txt - tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv - tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa - tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log, optional:true - tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log, optional:true - tuple val(meta), path("amp_ref_database/") , emit: results_db, optional:true - tuple val(meta), path("amp_ref_database/*.dmnd") , emit: results_db_dmnd, optional:true - tuple val(meta), path("amp_ref_database/*.clean.fasta") , emit: results_db_fasta, optional:true - tuple val(meta), path("amp_ref_database/*.tsv") , emit: results_db_tsv, optional:true - path "versions.yml" , emit: versions + tuple val(meta), path("${meta.id}/") , emit: sample_dir + tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks + tuple val(meta), path("${meta.id}/${meta.id}_mmseqs_matches.tsv") , emit: db_tsv + tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv + tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa + tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log , optional:true + tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log , optional:true + tuple val(meta), path("amp_${opt_amp_db}_database/") , emit: db , optional:true + tuple val(meta), path("amp_${opt_amp_db}_database/*.txt") , emit: db_txt , optional:true + tuple val(meta), path("amp_${opt_amp_db}_database/*.fasta") , emit: db_fasta , optional:true + tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/") , emit: db_mmseqs , optional:true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -33,16 +35,20 @@ process AMPCOMBI2_PARSETABLES { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def db = opt_amp_db? "--amp_database $opt_amp_db": "" + def db_dir = opt_amp_db_dir ? "--amp_database_dir ${opt_amp_db_dir}" : "" + def interpro = opt_interproscan ? "--interproscan_output ${opt_interproscan}" : "" + """ ampcombi parse_tables \\ - --path_list '${amp_input.collect{"$it"}.join("' '")}' \\ - --faa ${faa_input} \\ - --gbk ${gbk_input} \\ - --sample_list ${prefix} \\ - ${db} \\ - $args \\ - --threads ${task.cpus} + --path_list '${amp_input.collect { "${it}" }.join("' '")}' \\ + --faa ${faa_input} \\ + --gbk ${gbk_input} \\ + --sample_list ${prefix} \\ + --amp_database ${opt_amp_db} \\ + ${db_dir} \\ + ${interpro} \\ + ${args} \\ + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -53,20 +59,30 @@ process AMPCOMBI2_PARSETABLES { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def db = opt_amp_db? "--amp_database $opt_amp_db": "" + def db_dir = opt_amp_db_dir ? "--amp_database_dir ${opt_amp_db_dir}" : "" + def interpro = opt_interproscan ? "--interproscan_output ${opt_interproscan}" : "" + """ mkdir -p ${prefix} mkdir -p ${prefix}/contig_gbks - touch ${prefix}/${meta.id}_diamond_matches.txt + touch ${prefix}/${meta.id}_mmseqs_matches.tsv touch ${prefix}/${meta.id}_ampcombi.tsv touch ${prefix}/${meta.id}_amp.faa touch ${prefix}/${meta.id}_ampcombi.log touch Ampcombi_parse_tables.log - mkdir -p amp_ref_database - touch amp_ref_database/*.dmnd - touch amp_ref_database/*.clean.fasta - touch amp_ref_database/*.tsv + mkdir -p amp_${opt_amp_db}_database + mkdir -p amp_${opt_amp_db}_database/mmseqs2 + touch amp_${opt_amp_db}_database/*.fasta + touch amp_${opt_amp_db}_database/*.txt + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.dbtype + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.dbtype + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.index + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.index + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.lookup + touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.source cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/ampcombi2/parsetables/meta.yml b/modules/nf-core/ampcombi2/parsetables/meta.yml index eeea5586..14a0fd02 100644 --- a/modules/nf-core/ampcombi2/parsetables/meta.yml +++ b/modules/nf-core/ampcombi2/parsetables/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "ampcombi2_parsetables" -description: A submodule that parses and standardizes the results from various antimicrobial peptide identification tools. +description: A submodule that parses and standardizes the results from various antimicrobial + peptide identification tools. keywords: - antimicrobial peptides - amps @@ -16,91 +16,184 @@ keywords: - ampgram - amptransformer - DRAMP + - MMseqs2 + - InterProScan tools: - ampcombi2/parsetables: - description: "A parsing tool to convert and summarise the outputs from multiple AMP detection tools in a standardized format." + description: "A parsing tool to convert and summarise the outputs from multiple + AMP detection tools in a standardized format." homepage: "https://github.com/Darcy220606/AMPcombi" - documentation: "https://github.com/Darcy220606/AMPcombi" + documentation: "https://ampcombi.readthedocs.io/en/main/" tool_dev_url: "https://github.com/Darcy220606/AMPcombi/tree/dev" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - amp_input: - type: list - description: The path to the directory containing the results for the AMP tools for each processed sample or a list of files corresponding to each file generated by AMP tools. - pattern: "[*amptool.tsv, *amptool.tsv]" - - faa_input: - type: file - description: The path to the file corresponding to the respective protein fasta files with '.faa' extension. File names have to contain the corresponding sample name, i.e. sample_1.faa - pattern: "*.faa" - - gbk_input: - type: file - description: The path to the file corresponding to the respective annotated files with either '.gbk' or '.gbff' extensions. File names must contain the corresponding sample name, i.e. sample_1.faa where "sample_1" is the sample name. - pattern: "*.gbk" - - opt_amp_db: - type: directory - description: The path to the folder containing the fasta and tsv database files. - pattern: "*/" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - amp_input: + type: list + description: The path to the directory containing the results for the AMP tools + for each processed sample or a list of files corresponding to each file generated + by AMP tools. + pattern: "[*amptool.tsv, *amptool.tsv]" + - - faa_input: + type: file + description: The path to the file corresponding to the respective protein fasta + files with '.faa' extension. File names have to contain the corresponding + sample name, i.e. sample_1.faa + pattern: "*.faa" + - - gbk_input: + type: file + description: The path to the file corresponding to the respective annotated + files with either '.gbk' or '.gbff' extensions. File names must contain the + corresponding sample name, i.e. sample_1.faa where "sample_1" is the sample + name. + pattern: "*.gbk" + - - opt_amp_db: + type: string + description: The name of the database to download and set up. This can either be 'DRAMP', 'APD' or 'UniRef100'. + pattern: "DRAMP|APD|UniRef100" + - - opt_amp_db_dir: + type: directory + description: The path to the folder containing the fasta and tsv database files. + pattern: "path/to/amp_*_database" + - - opt_interproscan: + type: directory + description: A path to a file corresponding to the respective tsv files containing protein classifications of the annotated CDSs. The file must be the raw output from InterProScan. + pattern: "*.tsv" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - sample_dir: - type: directory - description: The output directory that contains the summary output and related alignment files for one sample. - pattern: "/*" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/: + type: directory + description: The output directory that contains the summary output and related + alignment files for one sample. + pattern: "/*" - contig_gbks: - type: directory - description: The output subdirectory that contains the gbk files containing the AMP hits for each sample. - pattern: "/*/contig_gbks" - - txt: - type: file - description: An alignment file containing the results from the DIAMOND alignment step done on all AMP hits. - pattern: "/*/*_diamond_matches.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/contig_gbks/: + type: directory + description: The output subdirectory that contains the gbk files containing + the AMP hits for each sample. + pattern: "/*/contig_gbks" + - db_tsv: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/${meta.id}_mmseqs_matches.tsv: + type: file + description: An alignment file containing the results from the MMseqs2 alignment + step done on all AMP hits. + pattern: "/*/*_mmseqs_matches.tsv" - tsv: - type: file - description: A file containing the summary report of all predicted AMP hits from all AMP tools given as input, the corresponding taxonomic and functional classification from the alignment step and the estimated physiochemical properties. - pattern: "/*/*_ampcombi.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/${meta.id}_ampcombi.tsv: + type: file + description: A file containing the summary report of all predicted AMP hits + from all AMP tools given as input, the corresponding taxonomic and functional + classification from the alignment step and the estimated physiochemical properties. + pattern: "/*/*_ampcombi.tsv" - faa: - type: file - description: A fasta file containing the amino acid sequences of all predicted AMP hits. - pattern: "/*/*_amp.faa" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/${meta.id}_amp.faa: + type: file + description: A fasta file containing the amino acid sequences of all predicted + AMP hits. + pattern: "/*/*_amp.faa" - sample_log: - type: file - description: A log file that captures the standard output per sample in a log file. Can be activated by `--log`. - pattern: "/*/*.log" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${meta.id}/${meta.id}_ampcombi.log: + type: file + description: A log file that captures the standard output per sample in a log + file. Can be activated by `--log`. + pattern: "/*/*.log" - full_log: - type: file - description: A log file that captures the standard output for the entire process in a log file. Can be activated by `--log`. - pattern: "Ampcombi_parse_tables.log" - - results_db: - type: directory - description: If the AMP reference database is not provided by the user using the flag `--amp_database', by default the DRAMP database will be downloaded, filtered and stored in this folder. - pattern: "/amp_ref_database" - - results_db_dmnd: - type: file - description: AMP reference database converted to DIAMOND database format. - pattern: "/amp_ref_database/*.dmnd" - - results_db_fasta: - type: file - description: AMP reference database fasta file, cleaned of diamond-uncompatible characters. - pattern: "/amp_ref_database/*.clean.fasta" - - results_db_tsv: - type: file - description: AMP reference database in tsv-format with two columns containing header and sequence. - pattern: "/amp_ref_database/*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - Ampcombi_parse_tables.log: + type: file + description: A log file that captures the standard output for the entire process + in a log file. Can be activated by `--log`. + pattern: "Ampcombi_parse_tables.log" + - db: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - amp_${opt_amp_db}_database/: + type: directory + description: If the AMP reference database ID is not provided by the user using + the flag `--amp_database', by default the DRAMP database will be downloaded, + filtered and stored in this folder. + pattern: "/amp_*_database" + - db_txt: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - amp_${opt_amp_db}_database/*.txt: + type: file + description: AMP reference database in tsv-format with two columns containing + header and sequence. + pattern: "/amp_*_database/*.txt" + - db_fasta: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - amp_${opt_amp_db}_database/*.fasta: + type: file + description: AMP reference database fasta file in clean format. + characters. + pattern: "/amp_*_database/*.fasta" + - db_mmseqs: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - amp_${opt_amp_db}_database/mmseqs2/: + type: directory + description: As alignment to the reference database is carried out by MMseqs2, this directory + contains all the files generated by MMseqs2 on the fasta file of the database. + pattern: "/amp_*_database/mmseqs2" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@darcy220606" maintainers: diff --git a/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test b/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test index 2d775179..272d31e6 100644 --- a/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test +++ b/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test @@ -28,7 +28,9 @@ nextflow_process { input[0] = amp_input input[1] = faa_input input[2] = gbk_input - input[3] = [] + input[3] = 'DRAMP' + input[4] = [] + input[5] = [] """ } } @@ -37,15 +39,17 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot(process.out.sample_dir.collect { file(it[1]).getName() } + - process.out.results_db.collect { file(it[1]).getName() } + - process.out.contig_gbks.collect { file(it[1]).getName() } + - process.out.full_log.collect { file(it[1]).readLines().contains("<--AMP_database>") } + - process.out.sample_log.collect { file(it[1]).readLines().contains("found ampir file") } + - process.out.txt.collect { file(it[1]).readLines()[0] } + - process.out.tsv.collect { file(it[1]).readLines()[0] } + - process.out.faa.collect { file(it[1]).readLines()[0] } + - process.out.summary_csv.collect { file(it[1]).readLines().contains("Structure_Description") } + - process.out.versions ).match() } + process.out.contig_gbks.collect { file(it[1]).getName() } + + process.out.db_tsv.collect { file(it[1]).readLines()[0] } + + process.out.tsv.collect { file(it[1]).readLines()[0] } + + process.out.faa.collect { file(it[1]).readLines()[0] } + + process.out.full_log.collect { file(it[1]).readLines().contains("File downloaded successfully") } + + process.out.sample_log.collect { file(it[1]).readLines().contains("found ampir file") } + + process.out.db.collect { file(it[1]).getName() } + + process.out.db_txt.collect { file(it[1]).readLines()[0] } + + process.out.db_fasta.collect { file(it[1]).readLines()[0] } + + process.out.db_mmseqs.collect { file(it[1]).getName() } + + process.out.versions ).match() } ) } } @@ -67,7 +71,9 @@ nextflow_process { input[0] = amp_input input[1] = faa_input input[2] = gbk_input - input[3] = [] + input[3] = 'DRAMP' + input[4] = [] + input[5] = [] """ } } diff --git a/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test.snap b/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test.snap index 54faf69f..47102283 100644 --- a/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test.snap +++ b/modules/nf-core/ampcombi2/parsetables/tests/main.nf.test.snap @@ -3,21 +3,24 @@ "content": [ [ "sample_1", - "amp_ref_database", "contig_gbks", + null, + "sample_id\tCDS_id\tprob_ampir\tprob_amplify\taa_sequence\tmolecular_weight\thelix_fraction\tturn_fraction\tsheet_fraction\tisoelectric_point\thydrophobicity\ttransporter_protein\tcontig_id\tCDS_start\tCDS_end\tCDS_dir\tCDS_stop_codon_found", + ">BAONEE_00005", false, true, - "contig_id\ttarget_id\tpident\tevalue\tnident\tfull_qseq\tfull_sseq\tqseq\tsseq\tqcovhsp\tscovhsp", - "sample_id\tCDS_id\tprob_ampir\tprob_amplify\taa_sequence\ttarget_id\tpident\tevalue\tSequence\tFamily\tSource\tPDB_ID\tLinear/Cyclic/Branched\tOther_Modifications\tPubmed_ID\tReference\tmolecular_weight\thelix_fraction\tturn_fraction\tsheet_fraction\tisoelectric_point\thydrophobicity\ttransporter_protein\tcontig_id\tCDS_start\tCDS_end\tCDS_dir\tCDS_stop_codon_found", - ">BAONEE_00005", - "versions.yml:md5,f32ab4ba79e66feba755b78d7d7a1f36" + "amp_DRAMP_database", + "DRAMP_ID\tSequence\tSequence_Length\tName\tSwiss_Prot_Entry\tFamily\tGene\tSource\tActivity\tProtein_existence\tStructure\tStructure_Description\tPDB_ID\tComments\tTarget_Organism\tHemolytic_activity\tLinear/Cyclic/Branched\tN-terminal_Modification\tC-terminal_Modification\tOther_Modifications\tStereochemistry\tCytotoxicity\tBinding_Traget\tPubmed_ID\tReference\tAuthor\tTitle", + ">DRAMP00005", + "mmseqs2", + "versions.yml:md5,09f086e07825d96816d792d73eee90ca" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-24T12:05:11.848363584" + "timestamp": "2024-12-11T13:58:57.988191067" }, "ampcombi2_parsetables - metagenome - stub": { "content": [ @@ -34,7 +37,7 @@ "sample_1_amp.faa:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_1_ampcombi.log:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_1_ampcombi.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", - "sample_1_diamond_matches.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "sample_1_mmseqs_matches.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] ], @@ -53,18 +56,27 @@ { "id": "sample_1" }, - "*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "ref_DB:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.index:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "11": [ - "versions.yml:md5,f32ab4ba79e66feba755b78d7d7a1f36" + "versions.yml:md5,09f086e07825d96816d792d73eee90ca" ], "2": [ [ { "id": "sample_1" }, - "sample_1_diamond_matches.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "sample_1_mmseqs_matches.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "3": [ @@ -105,9 +117,18 @@ "id": "sample_1" }, [ - "*.clean.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "*.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e", - "*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "*.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", + "*.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "ref_DB:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.index:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ] ], @@ -116,7 +137,7 @@ { "id": "sample_1" }, - "*.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e" + "*.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -124,7 +145,7 @@ { "id": "sample_1" }, - "*.clean.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "*.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "contig_gbks": [ @@ -137,56 +158,82 @@ ] ] ], - "faa": [ + "db": [ [ { "id": "sample_1" }, - "sample_1_amp.faa:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "*.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", + "*.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "ref_DB:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.index:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] ] ], - "full_log": [ + "db_fasta": [ [ { "id": "sample_1" }, - "Ampcombi_parse_tables.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "*.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "results_db": [ + "db_mmseqs": [ [ { "id": "sample_1" }, [ - "*.clean.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "*.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e", - "*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "ref_DB:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "ref_DB_h.index:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] ], - "results_db_dmnd": [ + "db_tsv": [ + [ + { + "id": "sample_1" + }, + "sample_1_mmseqs_matches.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "db_txt": [ [ { "id": "sample_1" }, - "*.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e" + "*.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "results_db_fasta": [ + "faa": [ [ { "id": "sample_1" }, - "*.clean.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "sample_1_amp.faa:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "results_db_tsv": [ + "full_log": [ [ { "id": "sample_1" }, - "*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "Ampcombi_parse_tables.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "sample_dir": [ @@ -201,7 +248,7 @@ "sample_1_amp.faa:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_1_ampcombi.log:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_1_ampcombi.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", - "sample_1_diamond_matches.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "sample_1_mmseqs_matches.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] ], @@ -221,23 +268,15 @@ "sample_1_ampcombi.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "txt": [ - [ - { - "id": "sample_1" - }, - "sample_1_diamond_matches.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], "versions": [ - "versions.yml:md5,f32ab4ba79e66feba755b78d7d7a1f36" + "versions.yml:md5,09f086e07825d96816d792d73eee90ca" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-04-24T12:05:34.675308615" + "timestamp": "2024-12-05T13:03:22.741430379" } } \ No newline at end of file diff --git a/modules/nf-core/ampcombi2/parsetables/tests/nextflow.config b/modules/nf-core/ampcombi2/parsetables/tests/nextflow.config index d39b0509..75396b7d 100644 --- a/modules/nf-core/ampcombi2/parsetables/tests/nextflow.config +++ b/modules/nf-core/ampcombi2/parsetables/tests/nextflow.config @@ -12,7 +12,8 @@ process { "--hmmsearch_file 'candidates.txt'", "--ampgram_file '.tsv'", "--amptransformer_file '.txt'", - "--log true" + "--log true", + "--interproscan_filter 'nonsense'" ].join(' ') ext.prefix = "sample_1" diff --git a/modules/nf-core/ampcombi2/parsetables/tests/tags.yml b/modules/nf-core/ampcombi2/parsetables/tests/tags.yml deleted file mode 100644 index b56b0468..00000000 --- a/modules/nf-core/ampcombi2/parsetables/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ampcombi2/parsetables: - - "modules/nf-core/ampcombi2/parsetables/**" diff --git a/modules/nf-core/ampir/environment.yml b/modules/nf-core/ampir/environment.yml index 8cb475d1..359e426c 100644 --- a/modules/nf-core/ampir/environment.yml +++ b/modules/nf-core/ampir/environment.yml @@ -1,7 +1,5 @@ -name: ampir channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::r-ampir=1.1.0 diff --git a/modules/nf-core/ampir/meta.yml b/modules/nf-core/ampir/meta.yml index 231cec54..571ddd86 100644 --- a/modules/nf-core/ampir/meta.yml +++ b/modules/nf-core/ampir/meta.yml @@ -1,57 +1,69 @@ name: "ampir" -description: A fast and user-friendly method to predict antimicrobial peptides (AMPs) from any given size protein dataset. ampir uses a supervised statistical machine learning approach to predict AMPs. +description: A fast and user-friendly method to predict antimicrobial peptides (AMPs) + from any given size protein dataset. ampir uses a supervised statistical machine + learning approach to predict AMPs. keywords: - ampir - amp - antimicrobial peptide prediction tools: - "ampir": - description: "A toolkit to predict antimicrobial peptides from protein sequences on a genome-wide scale." + description: "A toolkit to predict antimicrobial peptides from protein sequences + on a genome-wide scale." homepage: "https://github.com/Legana/ampir" documentation: "https://cran.r-project.org/web/packages/ampir/index.html" tool_dev_url: "https://github.com/Legana/ampir" doi: "10.1093/bioinformatics/btaa653" licence: ["GPL v2"] + identifier: biotools:ampir input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - faa: - type: file - description: FASTA file containing amino acid sequences - pattern: "*.{faa,fasta}" - - model: - type: string - description: Built-in model for AMP prediction - pattern: "{precursor,mature}" - - min_length: - type: integer - description: Minimum protein length for which predictions will be generated - pattern: "[0-9]+" - - min_probability: - type: float - description: Cut-off for AMP prediction - pattern: "[0-9].[0-9]+" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - faa: + type: file + description: FASTA file containing amino acid sequences + pattern: "*.{faa,fasta}" + - - model: + type: string + description: Built-in model for AMP prediction + pattern: "{precursor,mature}" + - - min_length: + type: integer + description: Minimum protein length for which predictions will be generated + pattern: "[0-9]+" + - - min_probability: + type: float + description: Cut-off for AMP prediction + pattern: "[0-9].[0-9]+" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - amps_faa: - type: file - description: File containing AMP predictions in amino acid FASTA format - pattern: "*.{faa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.faa": + type: file + description: File containing AMP predictions in amino acid FASTA format + pattern: "*.{faa}" - amps_tsv: - type: file - description: File containing AMP predictions in TSV format - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: File containing AMP predictions in TSV format + pattern: "*.tsv" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jasmezz" maintainers: diff --git a/modules/nf-core/amplify/predict/environment.yml b/modules/nf-core/amplify/predict/environment.yml index c980cf5e..e1cb5703 100644 --- a/modules/nf-core/amplify/predict/environment.yml +++ b/modules/nf-core/amplify/predict/environment.yml @@ -1,7 +1,5 @@ -name: amplify_predict channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::amplify=2.0.0 diff --git a/modules/nf-core/amplify/predict/meta.yml b/modules/nf-core/amplify/predict/meta.yml index 5ef93c83..cbe19f33 100644 --- a/modules/nf-core/amplify/predict/meta.yml +++ b/modules/nf-core/amplify/predict/meta.yml @@ -1,5 +1,6 @@ name: "amplify_predict" -description: AMPlify is an attentive deep learning model for antimicrobial peptide prediction. +description: AMPlify is an attentive deep learning model for antimicrobial peptide + prediction. keywords: - antimicrobial peptides - AMPs @@ -13,33 +14,37 @@ tools: tool_dev_url: "https://github.com/bcgsc/AMPlify" doi: "10.1186/s12864-022-08310-4" licence: ["GPL v3"] + identifier: biotools:amplify input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - faa: - type: file - description: amino acid sequences fasta - pattern: "*.{fa,fa.gz,faa,faa.gz,fasta,fasta.gz}" - - model_dir: - type: directory - description: Directory of where models are stored (optional) + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - faa: + type: file + description: amino acid sequences fasta + pattern: "*.{fa,fa.gz,faa,faa.gz,fasta,fasta.gz}" + - - model_dir: + type: directory + description: Directory of where models are stored (optional) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - tsv: - type: file - description: amino acid sequences with prediction (AMP, non-AMP) and probability scores - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: amino acid sequences with prediction (AMP, non-AMP) and probability + scores + pattern: "*.{tsv}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/amrfinderplus/run/environment.yml b/modules/nf-core/amrfinderplus/run/environment.yml index 214f44f4..2744ce54 100644 --- a/modules/nf-core/amrfinderplus/run/environment.yml +++ b/modules/nf-core/amrfinderplus/run/environment.yml @@ -1,7 +1,5 @@ -name: amrfinderplus_run channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::ncbi-amrfinderplus=3.12.8 diff --git a/modules/nf-core/amrfinderplus/run/meta.yml b/modules/nf-core/amrfinderplus/run/meta.yml index 465927df..d081a2bd 100644 --- a/modules/nf-core/amrfinderplus/run/meta.yml +++ b/modules/nf-core/amrfinderplus/run/meta.yml @@ -6,50 +6,64 @@ keywords: - antibiotic resistance tools: - amrfinderplus: - description: AMRFinderPlus finds antimicrobial resistance and other genes in protein or nucleotide sequences. + description: AMRFinderPlus finds antimicrobial resistance and other genes in protein + or nucleotide sequences. homepage: https://github.com/ncbi/amr/wiki documentation: https://github.com/ncbi/amr/wiki tool_dev_url: https://github.com/ncbi/amr doi: "10.1038/s41598-021-91456-0" licence: ["Public Domain"] + identifier: biotools:amrfinderplus input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Nucleotide or protein sequences in FASTA format - pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.gz}" - - db: - type: file - description: A compressed tarball of the AMRFinderPlus database to query - pattern: "*.tar.gz" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleotide or protein sequences in FASTA format + pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.gz}" + - - db: + type: file + description: A compressed tarball of the AMRFinderPlus database to query + pattern: "*.tar.gz" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - report: - type: file - description: AMRFinder+ final report - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.tsv: + type: file + description: AMRFinder+ final report + pattern: "*.tsv" - mutation_report: - type: file - description: Report of organism-specific point-mutations - pattern: "*-mutations.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}-mutations.tsv: + type: file + description: Report of organism-specific point-mutations + pattern: "*-mutations.tsv" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" - tool_version: - type: string - description: The version of the tool in string format (useful for downstream tools such as hAMRronization) + - VER: + type: string + description: The version of the tool in string format (useful for downstream + tools such as hAMRronization) - db_version: - type: string - description: The version of the used database in string format (useful for downstream tools such as hAMRronization) + - DBVER: + type: string + description: The version of the used database in string format (useful for downstream + tools such as hAMRronization) authors: - "@rpetit3" - "@louperelo" diff --git a/modules/nf-core/amrfinderplus/update/environment.yml b/modules/nf-core/amrfinderplus/update/environment.yml index d08f0725..2744ce54 100644 --- a/modules/nf-core/amrfinderplus/update/environment.yml +++ b/modules/nf-core/amrfinderplus/update/environment.yml @@ -1,7 +1,5 @@ -name: amrfinderplus_update channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::ncbi-amrfinderplus=3.12.8 diff --git a/modules/nf-core/amrfinderplus/update/meta.yml b/modules/nf-core/amrfinderplus/update/meta.yml index 7a9345d6..574957e1 100644 --- a/modules/nf-core/amrfinderplus/update/meta.yml +++ b/modules/nf-core/amrfinderplus/update/meta.yml @@ -6,27 +6,26 @@ keywords: - antibiotic resistance tools: - amrfinderplus: - description: AMRFinderPlus finds antimicrobial resistance and other genes in protein or nucleotide sequences. + description: AMRFinderPlus finds antimicrobial resistance and other genes in protein + or nucleotide sequences. homepage: https://github.com/ncbi/amr/wiki documentation: https://github.com/ncbi/amr/wiki tool_dev_url: https://github.com/ncbi/amr doi: "10.1038/s41598-021-91456-0" licence: ["Public Domain"] + identifier: biotools:amrfinderplus # this module does have any input. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - db: - type: file - description: The latest AMRFinder+ database in a compressed tarball - pattern: "*.tar.gz" + - amrfinderdb.tar.gz: + type: file + description: The latest AMRFinder+ database in a compressed tarball + pattern: "*.tar.gz" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" maintainers: diff --git a/modules/nf-core/antismash/antismashlite/environment.yml b/modules/nf-core/antismash/antismashlite/environment.yml index 227b5264..ce4491dc 100644 --- a/modules/nf-core/antismash/antismashlite/environment.yml +++ b/modules/nf-core/antismash/antismashlite/environment.yml @@ -1,7 +1,5 @@ -name: antismash_antismashlite channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::antismash-lite=7.1.0 diff --git a/modules/nf-core/antismash/antismashlite/meta.yml b/modules/nf-core/antismash/antismashlite/meta.yml index 21f506bd..63828343 100644 --- a/modules/nf-core/antismash/antismashlite/meta.yml +++ b/modules/nf-core/antismash/antismashlite/meta.yml @@ -23,110 +23,207 @@ tools: tool_dev_url: "https://github.com/antismash/antismash" doi: "10.1093/nar/gkab335" licence: ["AGPL v3"] + identifier: biotools:antismash input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - sequence_input: - type: file - description: nucleotide sequence file (annotated) - pattern: "*.{gbk, gb, gbff, genbank, embl, fasta, fna}" - - databases: - type: directory - description: | - Downloaded AntiSMASH databases (e.g. in the AntiSMASH installation directory - "data/databases") - pattern: "*/" - - antismash_dir: - type: directory - description: | - A local copy of an AntiSMASH installation folder. This is required when running with - docker and singularity (not required for conda), due to attempted 'modifications' of - files during database checks in the installation directory, something that cannot - be done in immutable docker/singularity containers. Therefore, a local installation - directory needs to be mounted (including all modified files from the downloading step) - to the container as a workaround. - pattern: "*/" - - gff: - type: file - description: Annotations in GFF3 format (only if sequence_input is in FASTA format) - pattern: "*.gff" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sequence_input: + type: file + description: nucleotide sequence file (annotated) + pattern: "*.{gbk, gb, gbff, genbank, embl, fasta, fna}" + - - databases: + type: directory + description: | + Downloaded AntiSMASH databases (e.g. in the AntiSMASH installation directory + "data/databases") + pattern: "*/" + - - antismash_dir: + type: directory + description: | + A local copy of an AntiSMASH installation folder. This is required when running with + docker and singularity (not required for conda), due to attempted 'modifications' of + files during database checks in the installation directory, something that cannot + be done in immutable docker/singularity containers. Therefore, a local installation + directory needs to be mounted (including all modified files from the downloading step) + to the container as a workaround. + pattern: "*/" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - clusterblast_file: - type: file - description: Output of ClusterBlast algorithm - pattern: "clusterblast/*_c*.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/clusterblast/*_c*.txt: + type: file + description: Output of ClusterBlast algorithm + pattern: "clusterblast/*_c*.txt" - html_accessory_files: - type: directory - description: Accessory files for the HTML output - pattern: "{css/,images/,js/}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/{css,images,js}: + type: directory + description: Accessory files for the HTML output + pattern: "{css/,images/,js/}" - knownclusterblast_html: - type: file - description: Tables with MIBiG hits in HTML format - pattern: "knownclusterblast/region*/ctg*.html" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/knownclusterblast/region*/ctg*.html: + type: file + description: Tables with MIBiG hits in HTML format + pattern: "knownclusterblast/region*/ctg*.html" - knownclusterblast_dir: - type: directory - description: Directory with MIBiG hits - pattern: "knownclusterblast/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/knownclusterblast/: + type: directory + description: Directory with MIBiG hits + pattern: "knownclusterblast/" - knownclusterblast_txt: - type: file - description: Tables with MIBiG hits - pattern: "knownclusterblast/*_c*.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/knownclusterblast/*_c*.txt: + type: file + description: Tables with MIBiG hits + pattern: "knownclusterblast/*_c*.txt" - svg_files_clusterblast: - type: file - description: SVG images showing the % identity of the aligned hits against their queries - pattern: "svg/clusterblast*.svg" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/svg/clusterblast*.svg: + type: file + description: SVG images showing the % identity of the aligned hits against their + queries + pattern: "svg/clusterblast*.svg" - svg_files_knownclusterblast: - type: file - description: SVG images showing the % identity of the aligned hits against their queries - pattern: "svg/knownclusterblast*.svg" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/svg/knownclusterblast*.svg: + type: file + description: SVG images showing the % identity of the aligned hits against their + queries + pattern: "svg/knownclusterblast*.svg" - gbk_input: - type: file - description: Nucleotide sequence and annotations in GenBank format; converted from input file - pattern: "*.gbk" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.gbk: + type: file + description: Nucleotide sequence and annotations in GenBank format; converted + from input file + pattern: "*.gbk" - json_results: - type: file - description: Nucleotide sequence and annotations in JSON format; converted from GenBank file (gbk_input) - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.json: + type: file + description: Nucleotide sequence and annotations in JSON format; converted from + GenBank file (gbk_input) + pattern: "*.json" - log: - type: file - description: Contains all the logging output that antiSMASH produced during its run - pattern: "*.log" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.log: + type: file + description: Contains all the logging output that antiSMASH produced during + its run + pattern: "*.log" - zip: - type: file - description: Contains a compressed version of the output folder in zip format - pattern: "*.zip" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.zip: + type: file + description: Contains a compressed version of the output folder in zip format + pattern: "*.zip" - gbk_results: - type: file - description: Nucleotide sequence and annotations in GenBank format; one file per antiSMASH hit - pattern: "*region*.gbk" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*region*.gbk: + type: file + description: Nucleotide sequence and annotations in GenBank format; one file + per antiSMASH hit + pattern: "*region*.gbk" - clusterblastoutput: - type: file - description: Raw BLAST output of known clusters previously predicted by antiSMASH using the built-in ClusterBlast algorithm - pattern: "clusterblastoutput.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/clusterblastoutput.txt: + type: file + description: Raw BLAST output of known clusters previously predicted by antiSMASH + using the built-in ClusterBlast algorithm + pattern: "clusterblastoutput.txt" - html: - type: file - description: Graphical web view of results in HTML format - patterN: "index.html" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/index.html: + type: file + description: Graphical web view of results in HTML format + patterN: "index.html" - knownclusterblastoutput: - type: file - description: Raw BLAST output of known clusters of the MIBiG database - pattern: "knownclusterblastoutput.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/knownclusterblastoutput.txt: + type: file + description: Raw BLAST output of known clusters of the MIBiG database + pattern: "knownclusterblastoutput.txt" - json_sideloading: - type: file - description: Sideloaded annotations of protoclusters and/or subregions (see antiSMASH documentation "Annotation sideloading") - pattern: "regions.js" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/regions.js: + type: file + description: Sideloaded annotations of protoclusters and/or subregions (see + antiSMASH documentation "Annotation sideloading") + pattern: "regions.js" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jasmezz" maintainers: diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml b/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml index b9323a93..ce4491dc 100644 --- a/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/environment.yml @@ -1,7 +1,5 @@ -name: antismash_antismashlitedownloaddatabases channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::antismash-lite=7.1.0 diff --git a/modules/nf-core/antismash/antismashlitedownloaddatabases/meta.yml b/modules/nf-core/antismash/antismashlitedownloaddatabases/meta.yml index 010c6267..fdca8294 100644 --- a/modules/nf-core/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/nf-core/antismash/antismashlitedownloaddatabases/meta.yml @@ -1,5 +1,7 @@ name: antismash_antismashlitedownloaddatabases -description: antiSMASH allows the rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters. This module downloads the antiSMASH databases for conda and docker/singularity runs. +description: antiSMASH allows the rapid genome-wide identification, annotation and + analysis of secondary metabolite biosynthesis gene clusters. This module downloads + the antiSMASH databases for conda and docker/singularity runs. keywords: - secondary metabolites - BGC @@ -22,36 +24,40 @@ tools: tool_dev_url: https://github.com/antismash/antismash doi: "10.1093/nar/gkab335" licence: ["AGPL v3"] + identifier: biotools:antismash input: - - database_css: - type: directory - description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "css" - - database_detection: - type: directory - description: | - antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "detection" - - database_modules: - type: directory - description: | - antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "modules" + - - database_css: + type: directory + description: | + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "css" + - - database_detection: + type: directory + description: | + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "detection" + - - database_modules: + type: directory + description: | + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "modules" output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - database: - type: directory - description: Download directory for antiSMASH databases - pattern: "antismash_db" + - antismash_db: + type: directory + description: Download directory for antiSMASH databases + pattern: "antismash_db" - antismash_dir: - type: directory - description: | - antismash installation folder which is being modified during the antiSMASH database downloading step. The modified files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database and installation folder in pipelines. - pattern: "antismash_dir" + - antismash_dir: + type: directory + description: | + antismash installation folder which is being modified during the antiSMASH database downloading step. The modified files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database and installation folder in pipelines. + pattern: "antismash_dir" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jasmezz" maintainers: diff --git a/modules/nf-core/argnorm/environment.yml b/modules/nf-core/argnorm/environment.yml index 771b87c9..783995f2 100644 --- a/modules/nf-core/argnorm/environment.yml +++ b/modules/nf-core/argnorm/environment.yml @@ -1,7 +1,5 @@ -name: "argnorm" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::argnorm=0.5.0" diff --git a/modules/nf-core/argnorm/meta.yml b/modules/nf-core/argnorm/meta.yml index a977e863..84842b9c 100644 --- a/modules/nf-core/argnorm/meta.yml +++ b/modules/nf-core/argnorm/meta.yml @@ -1,5 +1,6 @@ name: "argnorm" -description: Normalize antibiotic resistance genes (ARGs) using the ARO ontology (developed by CARD). +description: Normalize antibiotic resistance genes (ARGs) using the ARO ontology (developed + by CARD). keywords: - amr - antimicrobial resistance @@ -11,49 +12,48 @@ keywords: - drug categorization tools: - "argnorm": - description: "Normalize antibiotic resistance genes (ARGs) using the ARO ontology (developed by CARD)." + description: "Normalize antibiotic resistance genes (ARGs) using the ARO ontology + (developed by CARD)." homepage: "https://argnorm.readthedocs.io/en/latest/" documentation: "https://argnorm.readthedocs.io/en/latest/" tool_dev_url: "https://github.com/BigDataBiology/argNorm" licence: ["MIT"] + identifier: biotools:argnorm input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - - input_tsv: - type: file - description: ARG annotation output - pattern: "*.tsv" - - - tool: - type: string - description: ARG annotation tool used - pattern: "argsoap|abricate|deeparg|resfinder|amrfinderplus" - - - db: - type: string - description: Database used for ARG annotation - pattern: "sarg|ncbi|resfinder|deeparg|megares|argannot|resfinderfg" - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - input_tsv: + type: file + description: ARG annotation output + pattern: "*.tsv" + - - tool: + type: string + description: ARG annotation tool used + pattern: "argsoap|abricate|deeparg|resfinder|amrfinderplus" + - - db: + type: string + description: Database used for ARG annotation + pattern: "sarg|ncbi|resfinder|deeparg|megares|argannot|resfinderfg" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - tsv: - type: file - description: Normalized argNorm output - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "*.tsv": + type: file + description: Normalized argNorm output + pattern: "*.tsv" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Vedanth-Ramji" maintainers: diff --git a/modules/nf-core/bakta/bakta/environment.yml b/modules/nf-core/bakta/bakta/environment.yml index efb92265..b3c302f0 100644 --- a/modules/nf-core/bakta/bakta/environment.yml +++ b/modules/nf-core/bakta/bakta/environment.yml @@ -1,7 +1,5 @@ -name: bakta_bakta channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bakta=1.9.3 diff --git a/modules/nf-core/bakta/bakta/meta.yml b/modules/nf-core/bakta/bakta/meta.yml index c0e53e2a..f947e61b 100644 --- a/modules/nf-core/bakta/bakta/meta.yml +++ b/modules/nf-core/bakta/bakta/meta.yml @@ -12,76 +12,134 @@ tools: tool_dev_url: https://github.com/oschwengers/bakta doi: "10.1099/mgen.0.000685" licence: ["GPL v3"] + identifier: biotools:bakta input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: | - FASTA file to be annotated. Has to contain at least a non-empty string dummy value. - - db: - type: file - description: | - Path to the Bakta database. Must have amrfinderplus database directory already installed within it (in a directory called 'amrfinderplus-db/'). - - proteins: - type: file - description: FASTA/GenBank file of trusted proteins to first annotate from (optional) - - prodigal_tf: - type: file - description: Training file to use for Prodigal (optional) + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: | + FASTA file to be annotated. Has to contain at least a non-empty string dummy value. + - - db: + type: file + description: | + Path to the Bakta database. Must have amrfinderplus database directory already installed within it (in a directory called 'amrfinderplus-db/'). + - - proteins: + type: file + description: FASTA/GenBank file of trusted proteins to first annotate from (optional) + - - prodigal_tf: + type: file + description: Training file to use for Prodigal (optional) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - txt: - type: file - description: genome statistics and annotation summary - pattern: "*.txt" - - tsv: - type: file - description: annotations as simple human readble tab separated values - pattern: "*.tsv" - - gff: - type: file - description: annotations & sequences in GFF3 format - pattern: "*.gff3" - - gbff: - type: file - description: annotations & sequences in (multi) GenBank format - pattern: "*.gbff" - embl: - type: file - description: annotations & sequences in (multi) EMBL format - pattern: "*.embl" - - fna: - type: file - description: replicon/contig DNA sequences as FASTA - pattern: "*.fna" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.embl: + type: file + description: annotations & sequences in (multi) EMBL format + pattern: "*.embl" - faa: - type: file - description: CDS/sORF amino acid sequences as FASTA - pattern: "*.faa" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.faa: + type: file + description: CDS/sORF amino acid sequences as FASTA + pattern: "*.faa" - ffn: - type: file - description: feature nucleotide sequences as FASTA - pattern: "*.ffn" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.ffn: + type: file + description: feature nucleotide sequences as FASTA + pattern: "*.ffn" + - fna: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.fna: + type: file + description: replicon/contig DNA sequences as FASTA + pattern: "*.fna" + - gbff: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.gbff: + type: file + description: annotations & sequences in (multi) GenBank format + pattern: "*.gbff" + - gff: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.gff3: + type: file + description: annotations & sequences in GFF3 format + pattern: "*.gff3" - hypotheticals_tsv: - type: file - description: additional information on hypothetical protein CDS as simple human readble tab separated values - pattern: "*.hypotheticals.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.hypotheticals.tsv: + type: file + description: additional information on hypothetical protein CDS as simple human + readble tab separated values + pattern: "*.hypotheticals.tsv" - hypotheticals_faa: - type: file - description: hypothetical protein CDS amino acid sequences as FASTA - pattern: "*.hypotheticals.faa" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.hypotheticals.faa: + type: file + description: hypothetical protein CDS amino acid sequences as FASTA + pattern: "*.hypotheticals.faa" + - tsv: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.tsv: + type: file + description: annotations as simple human readble tab separated values + pattern: "*.tsv" + - txt: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.txt: + type: file + description: genome statistics and annotation summary + pattern: "*.txt" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" - "@oschwengers" diff --git a/modules/nf-core/bakta/baktadbdownload/environment.yml b/modules/nf-core/bakta/baktadbdownload/environment.yml index f6a53ff7..b3c302f0 100644 --- a/modules/nf-core/bakta/baktadbdownload/environment.yml +++ b/modules/nf-core/bakta/baktadbdownload/environment.yml @@ -1,7 +1,5 @@ -name: bakta_baktadbdownload channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bakta=1.9.3 diff --git a/modules/nf-core/bakta/baktadbdownload/meta.yml b/modules/nf-core/bakta/baktadbdownload/meta.yml index 21acacda..a0a3a455 100644 --- a/modules/nf-core/bakta/baktadbdownload/meta.yml +++ b/modules/nf-core/bakta/baktadbdownload/meta.yml @@ -15,15 +15,18 @@ tools: tool_dev_url: https://github.com/oschwengers/bakta doi: "10.1099/mgen.0.000685" licence: ["GPL v3"] + identifier: biotools:bakta output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - db: - type: directory - description: BAKTA database directory - pattern: "db*/" + - db*: + type: directory + description: BAKTA database directory + pattern: "db*/" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" - "@jasmezz" diff --git a/modules/nf-core/deeparg/downloaddata/environment.yml b/modules/nf-core/deeparg/downloaddata/environment.yml index 87435be5..074c6501 100644 --- a/modules/nf-core/deeparg/downloaddata/environment.yml +++ b/modules/nf-core/deeparg/downloaddata/environment.yml @@ -1,7 +1,5 @@ -name: deeparg_downloaddata channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::deeparg=1.0.4 diff --git a/modules/nf-core/deeparg/downloaddata/meta.yml b/modules/nf-core/deeparg/downloaddata/meta.yml index 65fb3903..5df2887b 100644 --- a/modules/nf-core/deeparg/downloaddata/meta.yml +++ b/modules/nf-core/deeparg/downloaddata/meta.yml @@ -1,5 +1,6 @@ name: deeparg_downloaddata -description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes +description: A deep learning based approach to predict Antibiotic Resistance Genes + (ARGs) from metagenomes keywords: - download - database @@ -9,22 +10,26 @@ keywords: - prediction tools: - deeparg: - description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes + description: A deep learning based approach to predict Antibiotic Resistance Genes + (ARGs) from metagenomes homepage: https://github.com/gaarangoa/deeparg documentation: https://github.com/gaarangoa/deeparg tool_dev_url: https://github.com/gaarangoa/deeparg doi: "10.1186/s40168-018-0401-z" licence: ["MIT"] + identifier: "" # No input required for download module. output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - db: - type: directory - description: Directory containing database required for deepARG. - pattern: "db/" + - db/: + type: directory + description: Directory containing database required for deepARG. + pattern: "db/" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/deeparg/predict/environment.yml b/modules/nf-core/deeparg/predict/environment.yml index aa686701..074c6501 100644 --- a/modules/nf-core/deeparg/predict/environment.yml +++ b/modules/nf-core/deeparg/predict/environment.yml @@ -1,7 +1,5 @@ -name: deeparg_predict channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::deeparg=1.0.4 diff --git a/modules/nf-core/deeparg/predict/meta.yml b/modules/nf-core/deeparg/predict/meta.yml index d62c2c5f..dbd63945 100644 --- a/modules/nf-core/deeparg/predict/meta.yml +++ b/modules/nf-core/deeparg/predict/meta.yml @@ -1,5 +1,6 @@ name: deeparg_predict -description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes +description: A deep learning based approach to predict Antibiotic Resistance Genes + (ARGs) from metagenomes keywords: - deeparg - antimicrobial resistance @@ -11,56 +12,81 @@ keywords: - metagenomes tools: - deeparg: - description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes + description: A deep learning based approach to predict Antibiotic Resistance Genes + (ARGs) from metagenomes homepage: https://github.com/gaarangoa/deeparg documentation: https://github.com/gaarangoa/deeparg tool_dev_url: https://github.com/gaarangoa/deeparg doi: "10.1186/s40168-018-0401-z" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - fasta: - type: file - description: FASTA file containing gene-like sequences - pattern: "*.{fasta,fa,fna}" - - model: - type: string - description: Which model to use, depending on input data. Either 'LS' or 'SS' for long or short sequences respectively - pattern: "LS|LS" - - db: - type: directory - description: Path to a directory containing the deepARG pre-built models - pattern: "*/" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - fasta: + type: file + description: FASTA file containing gene-like sequences + pattern: "*.{fasta,fa,fna}" + - model: + type: string + description: Which model to use, depending on input data. Either 'LS' or 'SS' + for long or short sequences respectively + pattern: "LS|LS" + - - db: + type: directory + description: Path to a directory containing the deepARG pre-built models + pattern: "*/" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - daa: - type: file - description: Sequences of ARG-like sequences from DIAMOND alignment - pattern: "*.align.daa" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.align.daa": + type: file + description: Sequences of ARG-like sequences from DIAMOND alignment + pattern: "*.align.daa" - daa_tsv: - type: file - description: Alignments scores against ARG-like sequences from DIAMOND alignment - pattern: "*.align.daa.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.align.daa.tsv": + type: file + description: Alignments scores against ARG-like sequences from DIAMOND alignment + pattern: "*.align.daa.tsv" - arg: - type: file - description: Table containing sequences with an ARG-like probability of more than specified thresholds - pattern: "*.mapping.ARG" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.mapping.ARG": + type: file + description: Table containing sequences with an ARG-like probability of more + than specified thresholds + pattern: "*.mapping.ARG" - potential_arg: - type: file - description: Table containing sequences with an ARG-like probability of less than specified thresholds, and requires manual inspection - pattern: "*.mapping.potential.ARG" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.mapping.potential.ARG": + type: file + description: Table containing sequences with an ARG-like probability of less + than specified thresholds, and requires manual inspection + pattern: "*.mapping.potential.ARG" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/deepbgc/download/environment.yml b/modules/nf-core/deepbgc/download/environment.yml index 84d467f0..36cb903f 100644 --- a/modules/nf-core/deepbgc/download/environment.yml +++ b/modules/nf-core/deepbgc/download/environment.yml @@ -1,7 +1,5 @@ -name: deepbgc_download channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::deepbgc=0.1.31 diff --git a/modules/nf-core/deepbgc/download/meta.yml b/modules/nf-core/deepbgc/download/meta.yml index 6444dd41..4551e9a0 100644 --- a/modules/nf-core/deepbgc/download/meta.yml +++ b/modules/nf-core/deepbgc/download/meta.yml @@ -1,5 +1,6 @@ name: "deepbgc_download" -description: Database download module for DeepBGC which detects BGCs in bacterial and fungal genomes using deep learning. +description: Database download module for DeepBGC which detects BGCs in bacterial + and fungal genomes using deep learning. keywords: - database - download @@ -19,15 +20,18 @@ tools: tool_dev_url: "https://github.com/Merck/deepbgc" doi: "10.1093/nar/gkz654" licence: ["MIT"] + identifier: biotools:DeepBGC output: + - db: + - deepbgc_db/: + type: directory + description: Directory containing the DeepBGC database + pattern: "deepbgc_db/" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - deepbgc_db: - type: directory - description: Contains reference database files - pattern: "deepbgc_db" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/deepbgc/download/tests/main.nf.test b/modules/nf-core/deepbgc/download/tests/main.nf.test new file mode 100644 index 00000000..a1c2c532 --- /dev/null +++ b/modules/nf-core/deepbgc/download/tests/main.nf.test @@ -0,0 +1,32 @@ +nextflow_process { + + name "Test Process DEEPBGC_DOWNLOAD" + script "../main.nf" + process "DEEPBGC_DOWNLOAD" + + tag "modules" + tag "modules_nfcore" + tag "deepbgc" + tag "deepbgc/download" + + test("deepbgc download db") { + + when { + process { + """ + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.db).match("db") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + +} diff --git a/modules/nf-core/deepbgc/download/tests/main.nf.test.snap b/modules/nf-core/deepbgc/download/tests/main.nf.test.snap new file mode 100644 index 00000000..b71c00ee --- /dev/null +++ b/modules/nf-core/deepbgc/download/tests/main.nf.test.snap @@ -0,0 +1,39 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,4130f2ce0a4d43fc3d8e04f4935f908b" + ] + ], + "timestamp": "2023-12-04T13:10:01.115594047" + }, + "db": { + "content": [ + [ + [ + [ + [ + "product_activity.pkl:md5,90f0c010460e9df882cb057664a49f30", + "product_class.pkl:md5,f78a2eda240403d2f40643d42202f3ac" + ], + [ + "clusterfinder_geneborder.pkl:md5,ca4be7031ae9f70780f17c616a4fa5b5", + "clusterfinder_original.pkl:md5,2ca2429bb9bc99a401d1093c376b37aa", + "clusterfinder_retrained.pkl:md5,65679a3b61c562ff4b84bdb574bb6d93", + "deepbgc.pkl:md5,7e9218be79ba45bc9adb23bed3845dc1" + ] + ], + [ + "Pfam-A.31.0.clans.tsv:md5,a0a4590ffb2b33b83ef2b28f6ead886b", + "Pfam-A.31.0.hmm:md5,79a3328e4c95b13949a4489b19959fc5", + "Pfam-A.31.0.hmm.h3f:md5,cbca323cf8dd4e5e7c109114ec444162", + "Pfam-A.31.0.hmm.h3i:md5,5242332a3f6a60cd1ab634cd9331afd6", + "Pfam-A.31.0.hmm.h3m:md5,1fe946fa2b3bcde1d4b2bad732bce612", + "Pfam-A.31.0.hmm.h3p:md5,27b98a1ded123b6a1ef72db01927017c" + ] + ] + ] + ], + "timestamp": "2023-12-04T13:09:47.229121097" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepbgc/download/tests/tags.yml b/modules/nf-core/deepbgc/download/tests/tags.yml new file mode 100644 index 00000000..6f1c7569 --- /dev/null +++ b/modules/nf-core/deepbgc/download/tests/tags.yml @@ -0,0 +1,2 @@ +deepbgc/download: + - "modules/nf-core/deepbgc/download/**" diff --git a/modules/nf-core/deepbgc/pipeline/environment.yml b/modules/nf-core/deepbgc/pipeline/environment.yml index fe0087a2..36cb903f 100644 --- a/modules/nf-core/deepbgc/pipeline/environment.yml +++ b/modules/nf-core/deepbgc/pipeline/environment.yml @@ -1,7 +1,5 @@ -name: deepbgc_pipeline channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::deepbgc=0.1.31 diff --git a/modules/nf-core/deepbgc/pipeline/meta.yml b/modules/nf-core/deepbgc/pipeline/meta.yml index 5f939eaa..186c7d30 100644 --- a/modules/nf-core/deepbgc/pipeline/meta.yml +++ b/modules/nf-core/deepbgc/pipeline/meta.yml @@ -17,73 +17,138 @@ tools: tool_dev_url: "https://github.com/Merck/deepbgc" doi: "10.1093/nar/gkz654" licence: ["MIT"] + identifier: biotools:DeepBGC input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - genome: - type: file - description: FASTA/GenBank/Pfam CSV file - pattern: "*.{fasta,fa,fna,gbk,csv}" - - db: - type: directory - description: Database path + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - genome: + type: file + description: FASTA/GenBank/Pfam CSV file + pattern: "*.{fasta,fa,fna,gbk,csv}" + - - db: + type: directory + description: Database path output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - readme: - type: file - description: txt file containing description of output files - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/README.txt: + type: file + description: txt file containing description of output files + pattern: "*.{txt}" - log: - type: file - description: Log output of DeepBGC - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/LOG.txt: + type: file + description: Log output of DeepBGC + pattern: "*.{txt}" - json: - type: file - description: AntiSMASH JSON file for sideloading - pattern: "*.{json}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/${prefix}.antismash.json: + type: file + description: AntiSMASH JSON file for sideloading + pattern: "*.{json}" - bgc_gbk: - type: file - description: Sequences and features of all detected BGCs in GenBank format - pattern: "*.{bgc.gbk}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/${prefix}.bgc.gbk: + type: file + description: Sequences and features of all detected BGCs in GenBank format + pattern: "*.{bgc.gbk}" - bgc_tsv: - type: file - description: Table of detected BGCs and their properties - pattern: "*.{bgc.tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/${prefix}.bgc.tsv: + type: file + description: Table of detected BGCs and their properties + pattern: "*.{bgc.tsv}" - full_gbk: - type: file - description: Fully annotated input sequence with proteins, Pfam domains (PFAM_domain features) and BGCs (cluster features) - pattern: "*.{full.gbk}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/${prefix}.full.gbk: + type: file + description: Fully annotated input sequence with proteins, Pfam domains (PFAM_domain + features) and BGCs (cluster features) + pattern: "*.{full.gbk}" - pfam_tsv: - type: file - description: Table of Pfam domains (pfam_id) from given sequence (sequence_id) in genomic order, with BGC detection scores - pattern: "*.{pfam.tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/${prefix}.pfam.tsv: + type: file + description: Table of Pfam domains (pfam_id) from given sequence (sequence_id) + in genomic order, with BGC detection scores + pattern: "*.{pfam.tsv}" - bgc_png: - type: file - description: Detected BGCs plotted by their nucleotide coordinates - pattern: "*.{bgc.png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/evaluation/${prefix}.bgc.png: + type: file + description: Detected BGCs plotted by their nucleotide coordinates + pattern: "*.{bgc.png}" - pr_png: - type: file - description: Precision-Recall curve based on predicted per-Pfam BGC scores - pattern: "*.{pr.png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/evaluation/${prefix}.pr.png: + type: file + description: Precision-Recall curve based on predicted per-Pfam BGC scores + pattern: "*.{pr.png}" - roc_png: - type: file - description: ROC curve based on predicted per-Pfam BGC scores - pattern: "*.{roc.png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/evaluation/${prefix}.roc.png: + type: file + description: ROC curve based on predicted per-Pfam BGC scores + pattern: "*.{roc.png}" - score_png: - type: file - description: BGC detection scores of each Pfam domain in genomic order - pattern: "*.{score.png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - ${prefix}/evaluation/${prefix}.score.png: + type: file + description: BGC detection scores of each Pfam domain in genomic order + pattern: "*.{score.png}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" - "@jfy133" diff --git a/modules/nf-core/fargene/environment.yml b/modules/nf-core/fargene/environment.yml index 56629ff4..ade4d770 100644 --- a/modules/nf-core/fargene/environment.yml +++ b/modules/nf-core/fargene/environment.yml @@ -1,7 +1,5 @@ -name: fargene channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fargene=0.1 diff --git a/modules/nf-core/fargene/meta.yml b/modules/nf-core/fargene/meta.yml index 9fc5ce0f..e1bcc5ea 100644 --- a/modules/nf-core/fargene/meta.yml +++ b/modules/nf-core/fargene/meta.yml @@ -1,5 +1,6 @@ name: fargene -description: tool that takes either fragmented metagenomic data or longer sequences as input and predicts and delivers full-length antiobiotic resistance genes as output. +description: tool that takes either fragmented metagenomic data or longer sequences + as input and predicts and delivers full-length antiobiotic resistance genes as output. keywords: - antibiotic resistance genes - ARGs @@ -8,94 +9,192 @@ keywords: - contigs tools: - fargene: - description: Fragmented Antibiotic Resistance Gene Identifier takes either fragmented metagenomic data or longer sequences as input and predicts and delivers full-length antiobiotic resistance genes as output + description: Fragmented Antibiotic Resistance Gene Identifier takes either fragmented + metagenomic data or longer sequences as input and predicts and delivers full-length + antiobiotic resistance genes as output homepage: https://github.com/fannyhb/fargene documentation: https://github.com/fannyhb/fargene tool_dev_url: https://github.com/fannyhb/fargene licence: ["MIT"] + identifier: biotools:fargene input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: uncompressed fasta file or paired-end fastq files containing either genomes or longer contigs as nucleotide or protein sequences (fasta) or fragmented metagenomic reads (fastq) - pattern: "*.{fasta}" - - hmm_model: - type: string - description: name of custom hidden markov model to be used [pre-defined class_a, class_b_1_2, class_b_3, class_c, class_d_1, class_d_2, qnr, tet_efflux, tet_rpg, tet_enzyme] + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: uncompressed fasta file or paired-end fastq files containing either + genomes or longer contigs as nucleotide or protein sequences (fasta) or fragmented + metagenomic reads (fastq) + pattern: "*.{fasta}" + - - hmm_model: + type: string + description: name of custom hidden markov model to be used [pre-defined class_a, + class_b_1_2, class_b_3, class_c, class_d_1, class_d_2, qnr, tet_efflux, tet_rpg, + tet_enzyme] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - log: - type: file - description: log file - pattern: "*.{log}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: log file + pattern: "*.{log}" - txt: - type: file - description: analysis summary text file - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/results_summary.txt: + type: file + description: analysis summary text file + pattern: "*.{txt}" - hmm: - type: file - description: output from hmmsearch (both single gene annotations + contigs) - pattern: "*.{out}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/hmmsearchresults/*.out: + type: file + description: output from hmmsearch (both single gene annotations + contigs) + pattern: "*.{out}" - hmm_genes: - type: file - description: output from hmmsearch (single gene annotations only) - pattern: "retrieved-*.{out}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/hmmsearchresults/retrieved-*.out: + type: file + description: output from hmmsearch (single gene annotations only) + pattern: "retrieved-*.{out}" - orfs: - type: file - description: open reading frames (ORFs) - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/predicted-orfs.fasta: + type: file + description: open reading frames (ORFs) + pattern: "*.{fasta}" - orfs_amino: - type: file - description: protein translation of open reading frames (ORFs) - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/predicted-orfs-amino.fasta: + type: file + description: protein translation of open reading frames (ORFs) + pattern: "*.{fasta}" - contigs: - type: file - description: (complete) contigs that passed the final full-length classification - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/retrieved-contigs.fasta: + type: file + description: (complete) contigs that passed the final full-length classification + pattern: "*.{fasta}" - contigs_pept: - type: file - description: parts of the contigs that passed the final classification step that aligned with the HMM, as amino acid sequences - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/retrieved-contigs-peptides.fasta: + type: file + description: parts of the contigs that passed the final classification step + that aligned with the HMM, as amino acid sequences + pattern: "*.{fasta}" - filtered: - type: file - description: sequences that passed the final classification step, but only the parts that where predicted by the HMM to be part of the gene - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/*filtered.fasta: + type: file + description: sequences that passed the final classification step, but only the + parts that where predicted by the HMM to be part of the gene + pattern: "*.{fasta}" - filtered_pept: - type: file - description: sequences from filtered.fasta, translated in the same frame as the gene is predicted to be located - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/predictedGenes/*filtered-peptides.fasta: + type: file + description: sequences from filtered.fasta, translated in the same frame as + the gene is predicted to be located + pattern: "*.{fasta}" - fragments: - type: file - description: All quality controlled retrieved fragments that were classified as positive, together with its read-pair, gathered in two files - pattern: "*.{fastq}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/retrievedFragments/all_retrieved_*.fastq: + type: file + description: All quality controlled retrieved fragments that were classified + as positive, together with its read-pair, gathered in two files + pattern: "*.{fastq}" - trimmed: - type: file - description: The quality controlled retrieved fragments from each input file. - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/retrievedFragments/trimmedReads/*.fasta: + type: file + description: The quality controlled retrieved fragments from each input file. + pattern: "*.{fasta}" - spades: - type: directory - description: The output from the SPAdes assembly - pattern: "spades_assembly" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/spades_assembly/*: + type: directory + description: The output from the SPAdes assembly + pattern: "spades_assembly" - metagenome: - type: file - description: The FASTQ to FASTA converted input files from metagenomic reads. - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/tmpdir/*.fasta: + type: file + description: The FASTQ to FASTA converted input files from metagenomic reads. + pattern: "*.{fasta}" - tmp: - type: file - description: The from FASTQ to FASTA converted input files and their translated input sequences. Are only saved if option --store-peptides is used. - pattern: "*.{fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/tmpdir/*.out: + type: file + description: The from FASTQ to FASTA converted input files and their translated + input sequences. Are only saved if option --store-peptides is used. + pattern: "*.{fasta}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/gecco/run/environment.yml b/modules/nf-core/gecco/run/environment.yml index 9d7cde8d..7db7dc87 100644 --- a/modules/nf-core/gecco/run/environment.yml +++ b/modules/nf-core/gecco/run/environment.yml @@ -1,7 +1,5 @@ -name: gecco_run channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gecco=0.9.10 diff --git a/modules/nf-core/gecco/run/meta.yml b/modules/nf-core/gecco/run/meta.yml index a2f4a726..6a557cea 100644 --- a/modules/nf-core/gecco/run/meta.yml +++ b/modules/nf-core/gecco/run/meta.yml @@ -1,5 +1,7 @@ name: "gecco_run" -description: GECCO is a fast and scalable method for identifying putative novel Biosynthetic Gene Clusters (BGCs) in genomic and metagenomic data using Conditional Random Fields (CRFs). +description: GECCO is a fast and scalable method for identifying putative novel Biosynthetic + Gene Clusters (BGCs) in genomic and metagenomic data using Conditional Random Fields + (CRFs). keywords: - bgc - detection @@ -13,53 +15,86 @@ tools: tool_dev_url: "https://github.com/zellerlab/GECCO" doi: "10.1101/2021.05.03.442509" licence: ["GPL v3"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: A genomic file containing one or more sequences as input. Input type is any supported by Biopython (fasta, gbk, etc.) - pattern: "*" - - hmm: - type: file - description: Alternative HMM file(s) to use in HMMER format - pattern: "*.hmm" - - model_dir: - type: directory - description: Path to an alternative CRF (Conditional Random Fields) module to use + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: A genomic file containing one or more sequences as input. Input + type is any supported by Biopython (fasta, gbk, etc.) + pattern: "*" + - hmm: + type: file + description: Alternative HMM file(s) to use in HMMER format + pattern: "*.hmm" + - - model_dir: + type: directory + description: Path to an alternative CRF (Conditional Random Fields) module to + use output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - genes: - type: file - description: TSV file containing detected/predicted genes with BGC probability scores. Will not be generated if no hits are found. - pattern: "*.genes.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.genes.tsv": + type: file + description: TSV file containing detected/predicted genes with BGC probability + scores. Will not be generated if no hits are found. + pattern: "*.genes.tsv" - features: - type: file - description: TSV file containing identified domains - pattern: "*.features.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.features.tsv": + type: file + description: TSV file containing identified domains + pattern: "*.features.tsv" - clusters: - type: file - description: TSV file containing coordinates of predicted clusters and BGC types. Will not be generated if no hits are found. - pattern: "*.clusters.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.clusters.tsv": + type: file + description: TSV file containing coordinates of predicted clusters and BGC types. Will + not be generated if no hits are found. + pattern: "*.clusters.tsv" - gbk: - type: file - description: Per cluster GenBank file (if found) containing sequence with annotations. Will not be generated if no hits are found. - pattern: "*.gbk" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_cluster_*.gbk": + type: file + description: Per cluster GenBank file (if found) containing sequence with annotations. + Will not be generated if no hits are found. + pattern: "*.gbk" - json: - type: file - description: AntiSMASH v6 sideload JSON file (if --antismash-sideload) supplied. Will not be generated if no hits are found. - pattern: "*.gbk" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: AntiSMASH v6 sideload JSON file (if --antismash-sideload) supplied. + Will not be generated if no hits are found. + pattern: "*.gbk" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml index dfc02a7b..c7794856 100644 --- a/modules/nf-core/gunzip/environment.yml +++ b/modules/nf-core/gunzip/environment.yml @@ -1,8 +1,6 @@ -name: gunzip channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::grep=3.11 - conda-forge::sed=4.8 diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml index f32973a0..9066c035 100644 --- a/modules/nf-core/gunzip/meta.yml +++ b/modules/nf-core/gunzip/meta.yml @@ -10,25 +10,32 @@ tools: gzip is a file format and a software application used for file compression and decompression. documentation: https://www.gnu.org/software/gzip/manual/gzip.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Optional groovy Map containing meta information - e.g. [ id:'test', single_end:false ] - - archive: - type: file - description: File to be compressed/uncompressed - pattern: "*.*" + - - meta: + type: map + description: | + Optional groovy Map containing meta information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: File to be compressed/uncompressed + pattern: "*.*" output: - gunzip: - type: file - description: Compressed/uncompressed file - pattern: "*.*" + - meta: + type: file + description: Compressed/uncompressed file + pattern: "*.*" + - $gunzip: + type: file + description: Compressed/uncompressed file + pattern: "*.*" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/hamronization/abricate/environment.yml b/modules/nf-core/hamronization/abricate/environment.yml index 75f349f1..791b9c96 100644 --- a/modules/nf-core/hamronization/abricate/environment.yml +++ b/modules/nf-core/hamronization/abricate/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_abricate channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/abricate/meta.yml b/modules/nf-core/hamronization/abricate/meta.yml index 4a0867d6..b1346892 100644 --- a/modules/nf-core/hamronization/abricate/meta.yml +++ b/modules/nf-core/hamronization/abricate/meta.yml @@ -1,5 +1,6 @@ name: "hamronization_abricate" -description: Tool to convert and summarize ABRicate outputs using the hAMRonization specification +description: Tool to convert and summarize ABRicate outputs using the hAMRonization + specification keywords: - amr - antimicrobial resistance @@ -7,51 +8,61 @@ keywords: - abricate tools: - "hamronization": - description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification" + description: "Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification" homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Output TSV or CSV file from ABRicate - pattern: "*.{csv,tsv}" - - format: - type: string - description: Type of report file to be produced - pattern: "tsv|json" - - software_version: - type: string - description: Version of ABRicate used - pattern: "[0-9].[0-9].[0-9]" - - reference_db_version: - type: string - description: Database version of ABRicate used - pattern: "[0-9][0-9][0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9]" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Output TSV or CSV file from ABRicate + pattern: "*.{csv,tsv}" + - - format: + type: string + description: Type of report file to be produced + pattern: "tsv|json" + - - software_version: + type: string + description: Version of ABRicate used + pattern: "[0-9].[0-9].[0-9]" + - - reference_db_version: + type: string + description: Database version of ABRicate used + pattern: "[0-9][0-9][0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9]" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised report in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: hAMRonised report in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised report in TSV format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: hAMRonised report in TSV format + pattern: "*.json" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jasmezz" maintainers: diff --git a/modules/nf-core/hamronization/amrfinderplus/environment.yml b/modules/nf-core/hamronization/amrfinderplus/environment.yml index 2f9cb27f..791b9c96 100644 --- a/modules/nf-core/hamronization/amrfinderplus/environment.yml +++ b/modules/nf-core/hamronization/amrfinderplus/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_amrfinderplus channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/amrfinderplus/meta.yml b/modules/nf-core/hamronization/amrfinderplus/meta.yml index c0997150..aba55b1f 100644 --- a/modules/nf-core/hamronization/amrfinderplus/meta.yml +++ b/modules/nf-core/hamronization/amrfinderplus/meta.yml @@ -1,5 +1,6 @@ name: "hamronization_amrfinderplus" -description: Tool to convert and summarize AMRfinderPlus outputs using the hAMRonization specification. +description: Tool to convert and summarize AMRfinderPlus outputs using the hAMRonization + specification. keywords: - amr - antimicrobial resistance @@ -9,51 +10,61 @@ keywords: - amrfinderplus tools: - "hamronization": - description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification" + description: "Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification" homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Output .tsv file from AMRfinderPlus - pattern: "*.tsv" - - format: - type: string - description: Type of report file to be produced - pattern: "tsv|json" - - software_version: - type: string - description: Version of AMRfinder used - pattern: "[0-9].[0-9].[0-9]" - - reference_db_version: - type: string - description: Database version of ncbi_AMRfinder used - pattern: "[0-9]-[0-9]-[0-9].[0-9]" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Output .tsv file from AMRfinderPlus + pattern: "*.tsv" + - - format: + type: string + description: Type of report file to be produced + pattern: "tsv|json" + - - software_version: + type: string + description: Version of AMRfinder used + pattern: "[0-9].[0-9].[0-9]" + - - reference_db_version: + type: string + description: Database version of ncbi_AMRfinder used + pattern: "[0-9]-[0-9]-[0-9].[0-9]" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised report in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: hAMRonised report in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised report in TSV format - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: hAMRonised report in TSV format + pattern: "*.tsv" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/hamronization/deeparg/environment.yml b/modules/nf-core/hamronization/deeparg/environment.yml index c9db54c6..791b9c96 100644 --- a/modules/nf-core/hamronization/deeparg/environment.yml +++ b/modules/nf-core/hamronization/deeparg/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_deeparg channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/deeparg/meta.yml b/modules/nf-core/hamronization/deeparg/meta.yml index de01196e..39149a34 100644 --- a/modules/nf-core/hamronization/deeparg/meta.yml +++ b/modules/nf-core/hamronization/deeparg/meta.yml @@ -1,5 +1,6 @@ name: hamronization_deeparg -description: Tool to convert and summarize DeepARG outputs using the hAMRonization specification +description: Tool to convert and summarize DeepARG outputs using the hAMRonization + specification keywords: - amr - antimicrobial resistance @@ -7,51 +8,61 @@ keywords: - deeparg tools: - hamronization: - description: Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification + description: Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification homepage: https://github.com/pha4ge/hAMRonization/ documentation: https://github.com/pha4ge/hAMRonization/ tool_dev_url: https://github.com/pha4ge/hAMRonization licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Output .mapping.ARG file from DeepARG - pattern: "*.mapping.ARG" - - format: - type: string - description: Type of report file to be produced - pattern: "tsv|json" - - software_version: - type: string - description: Version of DeepARG used - pattern: "[0-9].[0-9].[0-9]" - - reference_db_version: - type: integer - description: Database version of DeepARG used - pattern: "[0-9]" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Output .mapping.ARG file from DeepARG + pattern: "*.mapping.ARG" + - - format: + type: string + description: Type of report file to be produced + pattern: "tsv|json" + - - software_version: + type: string + description: Version of DeepARG used + pattern: "[0-9].[0-9].[0-9]" + - - reference_db_version: + type: integer + description: Database version of DeepARG used + pattern: "[0-9]" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised report in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: hAMRonised report in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised report in TSV format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: hAMRonised report in TSV format + pattern: "*.json" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/hamronization/fargene/environment.yml b/modules/nf-core/hamronization/fargene/environment.yml index 6507e7d4..791b9c96 100644 --- a/modules/nf-core/hamronization/fargene/environment.yml +++ b/modules/nf-core/hamronization/fargene/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_fargene channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/fargene/meta.yml b/modules/nf-core/hamronization/fargene/meta.yml index 45a3811d..efd3de36 100644 --- a/modules/nf-core/hamronization/fargene/meta.yml +++ b/modules/nf-core/hamronization/fargene/meta.yml @@ -1,5 +1,6 @@ name: "hamronization_fargene" -description: Tool to convert and summarize fARGene outputs using the hAMRonization specification +description: Tool to convert and summarize fARGene outputs using the hAMRonization + specification keywords: - amr - antimicrobial resistance @@ -9,51 +10,61 @@ keywords: - fARGene tools: - hamronization: - description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification" + description: "Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification" homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Output .txt file from fARGene - pattern: "*.txt" - - format: - type: string - description: Type of report file to be produced - pattern: "tsv|json" - - software_version: - type: string - description: Version of fARGene used - pattern: "[0-9].[0-9].[0-9]" - - reference_db_version: - type: string - description: Database version of fARGene used - pattern: "[0-9].[0-9].[0-9]" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Output .txt file from fARGene + pattern: "*.txt" + - - format: + type: string + description: Type of report file to be produced + pattern: "tsv|json" + - - software_version: + type: string + description: Version of fARGene used + pattern: "[0-9].[0-9].[0-9]" + - - reference_db_version: + type: string + description: Database version of fARGene used + pattern: "[0-9].[0-9].[0-9]" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised report in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: hAMRonised report in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised report in TSV format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: hAMRonised report in TSV format + pattern: "*.json" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/hamronization/rgi/environment.yml b/modules/nf-core/hamronization/rgi/environment.yml index 91d03e49..791b9c96 100644 --- a/modules/nf-core/hamronization/rgi/environment.yml +++ b/modules/nf-core/hamronization/rgi/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_rgi channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/rgi/meta.yml b/modules/nf-core/hamronization/rgi/meta.yml index 0cca8502..525148e5 100644 --- a/modules/nf-core/hamronization/rgi/meta.yml +++ b/modules/nf-core/hamronization/rgi/meta.yml @@ -9,51 +9,61 @@ keywords: - rgi tools: - hamronization: - description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification" + description: "Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification" homepage: "https://github.com/pha4ge/hAMRonization/" documentation: "https://github.com/pha4ge/hAMRonization/" tool_dev_url: "https://github.com/pha4ge/hAMRonization" licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Output .txt file from RGI - pattern: "*.txt" - - format: - type: string - description: Type of report file to be produced - pattern: "tsv|json" - - software_version: - type: string - description: Version of DeepARG used - pattern: "[0-9].[0-9].[0-9]" - - reference_db_version: - type: string - description: Database version of DeepARG used - pattern: "[0-9].[0-9].[0-9]" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Output .txt file from RGI + pattern: "*.txt" + - - format: + type: string + description: Type of report file to be produced + pattern: "tsv|json" + - - software_version: + type: string + description: Version of DeepARG used + pattern: "[0-9].[0-9].[0-9]" + - - reference_db_version: + type: string + description: Database version of DeepARG used + pattern: "[0-9].[0-9].[0-9]" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised report in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: hAMRonised report in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised report in TSV format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: hAMRonised report in TSV format + pattern: "*.json" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/hamronization/summarize/environment.yml b/modules/nf-core/hamronization/summarize/environment.yml index 1872a689..791b9c96 100644 --- a/modules/nf-core/hamronization/summarize/environment.yml +++ b/modules/nf-core/hamronization/summarize/environment.yml @@ -1,7 +1,5 @@ -name: hamronization_summarize channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hamronization=1.1.4 diff --git a/modules/nf-core/hamronization/summarize/meta.yml b/modules/nf-core/hamronization/summarize/meta.yml index 7d4c7b68..54ceeff3 100644 --- a/modules/nf-core/hamronization/summarize/meta.yml +++ b/modules/nf-core/hamronization/summarize/meta.yml @@ -1,42 +1,49 @@ name: hamronization_summarize -description: Tool to summarize and combine all hAMRonization reports into a single file +description: Tool to summarize and combine all hAMRonization reports into a single + file keywords: - amr - antimicrobial resistance - reporting tools: - hamronization: - description: Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification + description: Tool to convert and summarize AMR gene detection outputs using the + hAMRonization specification homepage: https://github.com/pha4ge/hAMRonization/ documentation: https://github.com/pha4ge/hAMRonization/ tool_dev_url: https://github.com/pha4ge/hAMRonization licence: ["GNU Lesser General Public v3 (LGPL v3)"] + identifier: biotools:hamronization input: - - reports: - type: file - description: List of multiple hAMRonization reports in either JSON or TSV format - pattern: "*.{json,tsv}" - - format: - type: string - description: Type of final combined report file to be produced - pattern: "tsv|json|interactive" + - - reports: + type: file + description: List of multiple hAMRonization reports in either JSON or TSV format + pattern: "*.{json,tsv}" + - - format: + type: string + description: Type of final combined report file to be produced + pattern: "tsv|json|interactive" output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: hAMRonised summary in JSON format - pattern: "*.json" + - hamronization_combined_report.json: + type: file + description: hAMRonised summary in JSON format + pattern: "*.json" - tsv: - type: file - description: hAMRonised summary in TSV format - pattern: "*.json" + - hamronization_combined_report.tsv: + type: file + description: hAMRonised summary in TSV format + pattern: "*.json" - html: - type: file - description: hAMRonised summary in HTML format - pattern: "*.html" + - hamronization_combined_report.html: + type: file + description: hAMRonised summary in HTML format + pattern: "*.html" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/hmmer/hmmsearch/environment.yml b/modules/nf-core/hmmer/hmmsearch/environment.yml index d672c2b3..c5ddec5d 100644 --- a/modules/nf-core/hmmer/hmmsearch/environment.yml +++ b/modules/nf-core/hmmer/hmmsearch/environment.yml @@ -1,7 +1,5 @@ -name: hmmer_hmmsearch channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::hmmer=3.4 diff --git a/modules/nf-core/hmmer/hmmsearch/meta.yml b/modules/nf-core/hmmer/hmmsearch/meta.yml index 39893c3b..0e078659 100644 --- a/modules/nf-core/hmmer/hmmsearch/meta.yml +++ b/modules/nf-core/hmmer/hmmsearch/meta.yml @@ -13,55 +13,79 @@ tools: tool_dev_url: https://github.com/EddyRivasLab/hmmer doi: "10.1371/journal.pcbi.1002195" licence: ["BSD"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - hmmfile: - type: file - description: One or more HMM profiles created with hmmbuild - pattern: "*.{hmm,hmm.gz}" - - seqdb: - type: file - description: Database of sequences in FASTA format - pattern: "*.{fasta,fna,faa,fa,fasta.gz,fna.gz,faa.gz,fa.gz}" - - write_align: - type: boolean - description: Flag to save optional alignment output. Specify with 'true' to save. - - write_target: - type: boolean - description: Flag to save optional per target summary. Specify with 'true' to save. - - write_domain: - type: boolean - description: Flag to save optional per domain summary. Specify with 'true' to save. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - hmmfile: + type: file + description: One or more HMM profiles created with hmmbuild + pattern: "*.{hmm,hmm.gz}" + - seqdb: + type: file + description: Database of sequences in FASTA format + pattern: "*.{fasta,fna,faa,fa,fasta.gz,fna.gz,faa.gz,fa.gz}" + - write_align: + type: boolean + description: Flag to save optional alignment output. Specify with 'true' to + save. + - write_target: + type: boolean + description: Flag to save optional per target summary. Specify with 'true' to + save. + - write_domain: + type: boolean + description: Flag to save optional per domain summary. Specify with 'true' to + save. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - output: - type: file - description: Human readable output summarizing hmmsearch results - pattern: "*.{txt.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.txt.gz": + type: file + description: Human readable output summarizing hmmsearch results + pattern: "*.{txt.gz}" - alignments: - type: file - description: Optional multiple sequence alignment (MSA) in Stockholm format - pattern: "*.{sto.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sto.gz": + type: file + description: Optional multiple sequence alignment (MSA) in Stockholm format + pattern: "*.{sto.gz}" - target_summary: - type: file - description: Optional tabular (space-delimited) summary of per-target output - pattern: "*.{tbl.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbl.gz": + type: file + description: Optional tabular (space-delimited) summary of per-target output + pattern: "*.{tbl.gz}" - domain_summary: - type: file - description: Optional tabular (space-delimited) summary of per-domain output - pattern: "*.{domtbl.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.domtbl.gz": + type: file + description: Optional tabular (space-delimited) summary of per-domain output + pattern: "*.{domtbl.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Midnighter" maintainers: diff --git a/modules/nf-core/macrel/contigs/environment.yml b/modules/nf-core/macrel/contigs/environment.yml index e6c11226..bb5ce1a6 100644 --- a/modules/nf-core/macrel/contigs/environment.yml +++ b/modules/nf-core/macrel/contigs/environment.yml @@ -1,7 +1,5 @@ -name: macrel_contigs channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::macrel=1.2.0 + - bioconda::macrel=1.4.0 diff --git a/modules/nf-core/macrel/contigs/main.nf b/modules/nf-core/macrel/contigs/main.nf index 6b62a868..b8f8f522 100644 --- a/modules/nf-core/macrel/contigs/main.nf +++ b/modules/nf-core/macrel/contigs/main.nf @@ -4,8 +4,8 @@ process MACREL_CONTIGS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/macrel:1.2.0--pyh5e36f6f_0': - 'biocontainers/macrel:1.2.0--pyh5e36f6f_0' }" + 'https://depot.galaxyproject.org/singularity/macrel:1.4.0--pyh7e72e81_0': + 'biocontainers/macrel:1.4.0--pyh7e72e81_0' }" input: tuple val(meta), path(fasta) @@ -35,6 +35,24 @@ process MACREL_CONTIGS { gzip --no-name ${prefix}/*.faa + cat <<-END_VERSIONS > versions.yml + "${task.process}": + macrel: \$(echo \$(macrel --version | sed 's/macrel //g')) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir ${prefix} + + touch ${prefix}/${prefix}_log.txt + echo | gzip > ${prefix}/${prefix}.smorfs.faa.gz + echo | gzip > ${prefix}/${prefix}.all_orfs.faa.gz + echo | gzip > ${prefix}/${prefix}.prediction.gz + touch ${prefix}/${prefix}.md + + cat <<-END_VERSIONS > versions.yml "${task.process}": macrel: \$(echo \$(macrel --version | sed 's/macrel //g')) diff --git a/modules/nf-core/macrel/contigs/meta.yml b/modules/nf-core/macrel/contigs/meta.yml index ba0b0e6f..c1c03f42 100644 --- a/modules/nf-core/macrel/contigs/meta.yml +++ b/modules/nf-core/macrel/contigs/meta.yml @@ -1,5 +1,7 @@ name: macrel_contigs -description: A tool that mines antimicrobial peptides (AMPs) from (meta)genomes by predicting peptides from genomes (provided as contigs) and outputs all the predicted anti-microbial peptides found. +description: A tool that mines antimicrobial peptides (AMPs) from (meta)genomes by + predicting peptides from genomes (provided as contigs) and outputs all the predicted + anti-microbial peptides found. keywords: - AMP - antimicrobial peptides @@ -14,46 +16,76 @@ tools: tool_dev_url: https://github.com/BigDataBiology/macrel doi: "10.7717/peerj.10555" licence: ["MIT"] + identifier: biotools:macrel input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: A fasta file with nucleotide sequences. - pattern: "*.{fasta,fa,fna,fasta.gz,fa.gz,fna.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: A fasta file with nucleotide sequences. + pattern: "*.{fasta,fa,fna,fasta.gz,fa.gz,fna.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - amp_prediction: - type: file - description: A zipped file, with all predicted amps in a table format. - pattern: "*.prediction.gz" - smorfs: - type: file - description: A zipped fasta file containing aminoacid sequences showing the general gene prediction information in the contigs. - pattern: "*.smorfs.faa.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*/*.smorfs.faa.gz": + type: file + description: A zipped fasta file containing aminoacid sequences showing the + general gene prediction information in the contigs. + pattern: "*.smorfs.faa.gz" - all_orfs: - type: file - description: A zipped fasta file containing amino acid sequences showing the general gene prediction information in the contigs. - pattern: "*.all_orfs.faa.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*/*.all_orfs.faa.gz": + type: file + description: A zipped fasta file containing amino acid sequences showing the + general gene prediction information in the contigs. + pattern: "*.all_orfs.faa.gz" + - amp_prediction: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*/*.prediction.gz": + type: file + description: A zipped file, with all predicted amps in a table format. + pattern: "*.prediction.gz" - readme_file: - type: file - description: A readme file containing tool specific information (e.g. citations, details about the output, etc.). - pattern: "*.md" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*/*.md": + type: file + description: A readme file containing tool specific information (e.g. citations, + details about the output, etc.). + pattern: "*.md" - log_file: - type: file - description: A log file containing the information pertaining to the run. - pattern: "*_log.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*/*_log.txt": + type: file + description: A log file containing the information pertaining to the run. + pattern: "*_log.txt" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@darcy220606" maintainers: diff --git a/modules/nf-core/macrel/contigs/tests/main.nf.test b/modules/nf-core/macrel/contigs/tests/main.nf.test new file mode 100644 index 00000000..5b641b1e --- /dev/null +++ b/modules/nf-core/macrel/contigs/tests/main.nf.test @@ -0,0 +1,66 @@ + +nextflow_process { + + name "Test Process MACREL_CONTIGS" + script "../main.nf" + process "MACREL_CONTIGS" + + tag "modules" + tag "modules_nfcore" + tag "macrel" + tag "macrel/contigs" + + test("test-macrel-contigs") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.smorfs, + path(process.out.all_orfs[0][1]).linesGzip[0], + process.out.amp_prediction, + process.out.readme_file, + file(process.out.log_file[0][1]).name, + process.out.versions + ).match() + } + ) + } + } + + test("test-macrel-contigs-stub") { + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/macrel/contigs/tests/main.nf.test.snap b/modules/nf-core/macrel/contigs/tests/main.nf.test.snap new file mode 100644 index 00000000..3908c49c --- /dev/null +++ b/modules/nf-core/macrel/contigs/tests/main.nf.test.snap @@ -0,0 +1,150 @@ +{ + "test-macrel-contigs": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.smorfs.faa.gz:md5,2433037a55de266a1203759834849669" + ] + ], + ">k141_0_1 # 235 # 468 # -1 # ID=1_1;partial=00;start_type=ATG;rbs_motif=None;rbs_spacer=None;gc_cont=0.333", + [ + [ + { + "id": "test", + "single_end": false + }, + "test.prediction.gz:md5,c929d870dc197f9d5d36d3d5f683cbf4" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "README.md:md5,cf088d9256ff7b7730699f17b64b4028" + ] + ], + "test_log.txt", + [ + "versions.yml:md5,ab072d9245c9b28a8bc694e98795c924" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-30T20:48:49.632715" + }, + "test-macrel-contigs-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.smorfs.faa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.all_orfs.faa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.prediction.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.md:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + "versions.yml:md5,ab072d9245c9b28a8bc694e98795c924" + ], + "all_orfs": [ + [ + { + "id": "test", + "single_end": false + }, + "test.all_orfs.faa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "amp_prediction": [ + [ + { + "id": "test", + "single_end": false + }, + "test.prediction.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "log_file": [ + [ + { + "id": "test", + "single_end": false + }, + "test_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "readme_file": [ + [ + { + "id": "test", + "single_end": false + }, + "test.md:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "smorfs": [ + [ + { + "id": "test", + "single_end": false + }, + "test.smorfs.faa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ab072d9245c9b28a8bc694e98795c924" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-30T20:50:42.040416" + } +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/createdb/environment.yml b/modules/nf-core/mmseqs/createdb/environment.yml index 77b28f59..18547591 100644 --- a/modules/nf-core/mmseqs/createdb/environment.yml +++ b/modules/nf-core/mmseqs/createdb/environment.yml @@ -1,7 +1,5 @@ -name: mmseqs_createdb channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::mmseqs2=15.6f452 diff --git a/modules/nf-core/mmseqs/createdb/meta.yml b/modules/nf-core/mmseqs/createdb/meta.yml index a011020b..c392a360 100644 --- a/modules/nf-core/mmseqs/createdb/meta.yml +++ b/modules/nf-core/mmseqs/createdb/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "mmseqs_createdb" description: Create an MMseqs database from an existing FASTA/Q file @@ -11,35 +10,40 @@ keywords: - mmseqs2 tools: - "mmseqs": - description: "MMseqs2: ultra fast and sensitive sequence search and clustering suite" + description: "MMseqs2: ultra fast and sensitive sequence search and clustering + suite" homepage: "https://github.com/soedinglab/MMseqs2" documentation: "https://mmseqs.com/latest/userguide.pdf" tool_dev_url: "https://github.com/soedinglab/MMseqs2" doi: "10.1093/bioinformatics/btw006" licence: ["GPL v3"] + identifier: biotools:mmseqs input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - sequence: - type: file - description: Input sequences in FASTA/Q (zipped or unzipped) format to parse into an mmseqs database - pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,fastq,fastq.gz,fq,fq.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - sequence: + type: file + description: Input sequences in FASTA/Q (zipped or unzipped) format to parse + into an mmseqs database + pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,fastq,fastq.gz,fq,fq.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - db: - type: directory - description: The created MMseqs2 database + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - ${prefix}/: + type: directory + description: The created MMseqs2 database - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Joon-Klaps" maintainers: diff --git a/modules/nf-core/mmseqs/createtsv/environment.yml b/modules/nf-core/mmseqs/createtsv/environment.yml index 4840fc02..18547591 100644 --- a/modules/nf-core/mmseqs/createtsv/environment.yml +++ b/modules/nf-core/mmseqs/createtsv/environment.yml @@ -1,7 +1,5 @@ -name: mmseqs_createtsv channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::mmseqs2=15.6f452 diff --git a/modules/nf-core/mmseqs/createtsv/meta.yml b/modules/nf-core/mmseqs/createtsv/meta.yml index e85b066f..5a50ff34 100644 --- a/modules/nf-core/mmseqs/createtsv/meta.yml +++ b/modules/nf-core/mmseqs/createtsv/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "mmseqs_createtsv" -description: Create a tsv file from a query and a target database as well as the result database +description: Create a tsv file from a query and a target database as well as the result + database keywords: - protein sequence - databases @@ -12,53 +12,58 @@ keywords: - tsv tools: - "mmseqs": - description: "MMseqs2: ultra fast and sensitive sequence search and clustering suite" + description: "MMseqs2: ultra fast and sensitive sequence search and clustering + suite" homepage: "https://github.com/soedinglab/MMseqs2" documentation: "https://mmseqs.com/latest/userguide.pdf" tool_dev_url: "https://github.com/soedinglab/MMseqs2" doi: "10.1093/bioinformatics/btw006" licence: ["GPL v3"] + identifier: biotools:mmseqs input: # Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - db_result: - type: directory - description: an MMseqs2 database with result data - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - db_query: - type: directory - description: an MMseqs2 database with query data - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - db_target: - type: directory - description: an MMseqs2 database with target data + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - db_result: + type: directory + description: an MMseqs2 database with result data + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - db_query: + type: directory + description: an MMseqs2 database with query data + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - db_target: + type: directory + description: an MMseqs2 database with target data output: #Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - tsv: - type: file - description: The resulting tsv file created using the query, target and result MMseqs databases - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.tsv": + type: file + description: The resulting tsv file created using the query, target and result + MMseqs databases + pattern: "*.{tsv}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Joon-Klaps" maintainers: diff --git a/modules/nf-core/mmseqs/databases/environment.yml b/modules/nf-core/mmseqs/databases/environment.yml index 3bf8437d..18547591 100644 --- a/modules/nf-core/mmseqs/databases/environment.yml +++ b/modules/nf-core/mmseqs/databases/environment.yml @@ -1,7 +1,5 @@ -name: mmseqs_databases channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::mmseqs2=15.6f452 diff --git a/modules/nf-core/mmseqs/databases/main.nf b/modules/nf-core/mmseqs/databases/main.nf index 3e228b29..d43681ce 100644 --- a/modules/nf-core/mmseqs/databases/main.nf +++ b/modules/nf-core/mmseqs/databases/main.nf @@ -11,8 +11,8 @@ process MMSEQS_DATABASES { val database output: - path "${prefix}/" , emit: database - path "versions.yml" , emit: versions + path "${prefix}/" , emit: database + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/mmseqs/databases/meta.yml b/modules/nf-core/mmseqs/databases/meta.yml index 803a87f6..be9380fb 100644 --- a/modules/nf-core/mmseqs/databases/meta.yml +++ b/modules/nf-core/mmseqs/databases/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "mmseqs_databases" description: Download an mmseqs-formatted database @@ -9,24 +8,29 @@ keywords: - searching tools: - "mmseqs": - description: "MMseqs2: ultra fast and sensitive sequence search and clustering suite" + description: "MMseqs2: ultra fast and sensitive sequence search and clustering + suite" homepage: "https://github.com/soedinglab/MMseqs2" documentation: "https://mmseqs.com/latest/userguide.pdf" tool_dev_url: "https://github.com/soedinglab/MMseqs2" doi: "10.1093/bioinformatics/btw006" licence: ["GPL v3"] + identifier: biotools:mmseqs input: - - database: - type: string - description: Database available through the mmseqs2 databases interface - see https://github.com/soedinglab/MMseqs2/wiki#downloading-databases for details + - - database: + type: string + description: Database available through the mmseqs2 databases interface - see + https://github.com/soedinglab/MMseqs2/wiki#downloading-databases for details output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - database: - type: directory - description: Directory containing processed mmseqs database + - ${prefix}/: + type: directory + description: Directory containing processed mmseqs database + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@prototaxites" maintainers: diff --git a/modules/nf-core/mmseqs/databases/tests/main.nf.test b/modules/nf-core/mmseqs/databases/tests/main.nf.test new file mode 100644 index 00000000..3fe5d200 --- /dev/null +++ b/modules/nf-core/mmseqs/databases/tests/main.nf.test @@ -0,0 +1,55 @@ + +nextflow_process { + + name "Test Process MMSEQS_DATABASES" + script "../main.nf" + process "MMSEQS_DATABASES" + + tag "modules" + tag "modules_nfcore" + tag "mmseqs" + tag "mmseqs/databases" + + test("test-mmseqs-databases") { + + when { + process { + """ + input[0] = "SILVA" + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.database[0]).listFiles().collect { it.name }.toSorted(), // unstable + process.out.versions + ).match() + } + ) + } + } + + test("test-mmseqs-databases-stub") { + options '-stub' + when { + process { + """ + input[0] = "SILVA" + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/mmseqs/databases/tests/main.nf.test.snap b/modules/nf-core/mmseqs/databases/tests/main.nf.test.snap new file mode 100644 index 00000000..00d3003e --- /dev/null +++ b/modules/nf-core/mmseqs/databases/tests/main.nf.test.snap @@ -0,0 +1,74 @@ +{ + "test-mmseqs-databases": { + "content": [ + [ + "database", + "database.dbtype", + "database.index", + "database.lookup", + "database.source", + "database.version", + "database_h", + "database_h.dbtype", + "database_h.index", + "database_mapping", + "database_taxonomy" + ], + [ + "versions.yml:md5,b038db45e5934b8f0f743449bbac01b4" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-06T15:43:58.454012" + }, + "test-mmseqs-databases-stub": { + "content": [ + { + "0": [ + [ + "database:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.version:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_mapping:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_taxonomy:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,49082428ec974e4ddb09a6ca2e9f21b3" + ], + "database": [ + [ + "database:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.lookup:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.source:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.version:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_h.index:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_mapping:md5,d41d8cd98f00b204e9800998ecf8427e", + "database_taxonomy:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,49082428ec974e4ddb09a6ca2e9f21b3" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T17:00:20.527628" + } +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/taxonomy/environment.yml b/modules/nf-core/mmseqs/taxonomy/environment.yml index fa40c277..65f1e5cd 100644 --- a/modules/nf-core/mmseqs/taxonomy/environment.yml +++ b/modules/nf-core/mmseqs/taxonomy/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "mmseqs_taxonomy" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::mmseqs2=15.6f452" diff --git a/modules/nf-core/mmseqs/taxonomy/meta.yml b/modules/nf-core/mmseqs/taxonomy/meta.yml index d836029c..15756feb 100644 --- a/modules/nf-core/mmseqs/taxonomy/meta.yml +++ b/modules/nf-core/mmseqs/taxonomy/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "mmseqs_taxonomy" -description: Computes the lowest common ancestor by identifying the query sequence homologs against the target database. +description: Computes the lowest common ancestor by identifying the query sequence + homologs against the target database. keywords: - protein sequence - nucleotide sequence @@ -11,37 +11,41 @@ keywords: - mmseqs2 tools: - "mmseqs": - description: "MMseqs2: ultra fast and sensitive sequence search and clustering suite" + description: "MMseqs2: ultra fast and sensitive sequence search and clustering + suite" homepage: "https://github.com/soedinglab/MMseqs2" documentation: "https://mmseqs.com/latest/userguide.pdf" tool_dev_url: "https://github.com/soedinglab/MMseqs2" doi: "10.1093/bioinformatics/btw006" licence: ["GPL v3"] + identifier: biotools:mmseqs input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - db_query: - type: directory - description: An MMseqs2 database with query data - - db_target: - type: directory - description: an MMseqs2 database with target data including the taxonomy classification + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - db_query: + type: directory + description: An MMseqs2 database with query data + - - db_target: + type: directory + description: an MMseqs2 database with target data including the taxonomy classification output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - db_taxonomy: - type: directory - description: An MMseqs2 database with target data including the taxonomy classification + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - ${prefix}_taxonomy: + type: directory + description: An MMseqs2 database with target data including the taxonomy classification - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@darcy220606" maintainers: diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index 0eb9d9c9..6f5b867b 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -1,7 +1,5 @@ -name: multiqc channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::multiqc=1.24 + - bioconda::multiqc=1.25.1 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 9790c23c..cc0643e1 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,8 +3,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.24--pyhdfd78af_0' : - 'biocontainers/multiqc:1.24--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : + 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" @@ -28,7 +28,7 @@ process MULTIQC { def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' def config = multiqc_config ? "--config $multiqc_config" : '' def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' - def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : '' + def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' def replace = replace_names ? "--replace-names ${replace_names}" : '' def samples = sample_names ? "--sample-names ${sample_names}" : '' """ @@ -52,7 +52,7 @@ process MULTIQC { stub: """ mkdir multiqc_data - touch multiqc_plots + mkdir multiqc_plots touch multiqc_report.html cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index 382c08cb..b16c1879 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,5 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into a single report +description: Aggregate results from bioinformatics analyses across many samples into + a single report keywords: - QC - bioinformatics tools @@ -12,53 +13,59 @@ tools: homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ licence: ["GPL-3.0-or-later"] + identifier: biotools:multiqc input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - - replace_names: - type: file - description: | - Optional two-column sample renaming file. First column a set of - patterns, second column a set of corresponding replacements. Passed via - MultiQC's `--replace-names` option. - pattern: "*.{tsv}" - - sample_names: - type: file - description: | - Optional TSV file with headers, passed to the MultiQC --sample_names - argument. - pattern: "*.{tsv}" + - - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + - - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + - - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + - - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + - - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" output: - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" + - "*multiqc_report.html": + type: file + description: MultiQC report file + pattern: "multiqc_report.html" - data: - type: directory - description: MultiQC data dir - pattern: "multiqc_data" + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_data" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 6aa27f4c..33316a7d 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -8,6 +8,8 @@ nextflow_process { tag "modules_nfcore" tag "multiqc" + config "./nextflow.config" + test("sarscov2 single-end [fastqc]") { when { diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index ef35f6d5..2fcbb5ff 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,14 +2,14 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,0c5c5c2a79011c26b34b0b0e80b7c8e2" + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-10T12:41:34.562023" + "timestamp": "2024-10-02T17:51:46.317523" }, "multiqc_stub": { "content": [ @@ -17,25 +17,25 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,0c5c5c2a79011c26b34b0b0e80b7c8e2" + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-10T11:27:11.933869532" + "timestamp": "2024-10-02T17:52:20.680978" }, "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,0c5c5c2a79011c26b34b0b0e80b7c8e2" + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-10T11:26:56.709849369" + "timestamp": "2024-10-02T17:52:09.185842" } -} +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/tests/nextflow.config b/modules/nf-core/multiqc/tests/nextflow.config new file mode 100644 index 00000000..c537a6a3 --- /dev/null +++ b/modules/nf-core/multiqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = null + } +} diff --git a/modules/nf-core/prodigal/environment.yml b/modules/nf-core/prodigal/environment.yml index 85746534..7609bf3b 100644 --- a/modules/nf-core/prodigal/environment.yml +++ b/modules/nf-core/prodigal/environment.yml @@ -1,8 +1,6 @@ -name: prodigal channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::prodigal=2.6.3 - conda-forge::pigz=2.6 diff --git a/modules/nf-core/prodigal/meta.yml b/modules/nf-core/prodigal/meta.yml index a5d15d58..7d3d459e 100644 --- a/modules/nf-core/prodigal/meta.yml +++ b/modules/nf-core/prodigal/meta.yml @@ -1,55 +1,78 @@ name: prodigal -description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program +description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a + microbial (bacterial and archaeal) gene finding program keywords: - prokaryotes - gene finding - microbial tools: - prodigal: - description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program + description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) + is a microbial (bacterial and archaeal) gene finding program homepage: https://github.com/hyattpd/Prodigal documentation: https://github.com/hyattpd/prodigal/wiki tool_dev_url: https://github.com/hyattpd/Prodigal doi: "10.1186/1471-2105-11-119" licence: ["GPL v3"] + identifier: biotools:prodigal input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - genome: - type: file - description: fasta/fasta.gz file - - output_format: - type: string - description: Output format ("gbk"/"gff"/"sqn"/"sco") + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - genome: + type: file + description: fasta/fasta.gz file + - - output_format: + type: string + description: Output format ("gbk"/"gff"/"sqn"/"sco") output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - gene_annotations: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${output_format}.gz: + type: file + description: gene annotations in output_format given as input + pattern: "*.{output_format}" - nucleotide_fasta: - type: file - description: nucleotide sequences file - pattern: "*.{fna}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.fna.gz: + type: file + description: nucleotide sequences file + pattern: "*.{fna}" - amino_acid_fasta: - type: file - description: protein translations file - pattern: "*.{faa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.faa.gz: + type: file + description: protein translations file + pattern: "*.{faa}" - all_gene_annotations: - type: file - description: complete starts file - pattern: "*.{_all.txt}" - - gene_annotations: - type: file - description: gene annotations in output_format given as input - pattern: "*.{output_format}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}_all.txt.gz: + type: file + description: complete starts file + pattern: "*.{_all.txt}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@grst" maintainers: diff --git a/modules/nf-core/prokka/environment.yml b/modules/nf-core/prokka/environment.yml index d7c44d5a..7c9753fc 100644 --- a/modules/nf-core/prokka/environment.yml +++ b/modules/nf-core/prokka/environment.yml @@ -1,7 +1,5 @@ -name: prokka channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::prokka=1.14.6 diff --git a/modules/nf-core/prokka/meta.yml b/modules/nf-core/prokka/meta.yml index 9d82ffac..90745735 100644 --- a/modules/nf-core/prokka/meta.yml +++ b/modules/nf-core/prokka/meta.yml @@ -10,80 +10,151 @@ tools: homepage: https://github.com/tseemann/prokka doi: "10.1093/bioinformatics/btu153" licence: ["GPL v2"] + identifier: biotools:prokka input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: | - FASTA file to be annotated. Has to contain at least a non-empty string dummy value. - - proteins: - type: file - description: FASTA file of trusted proteins to first annotate from (optional) - - prodigal_tf: - type: file - description: Training file to use for Prodigal (optional) + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: | + FASTA file to be annotated. Has to contain at least a non-empty string dummy value. + - - proteins: + type: file + description: FASTA file of trusted proteins to first annotate from (optional) + - - prodigal_tf: + type: file + description: Training file to use for Prodigal (optional) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - gff: - type: file - description: annotation in GFF3 format, containing both sequences and annotations - pattern: "*.{gff}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.gff: + type: file + description: annotation in GFF3 format, containing both sequences and annotations + pattern: "*.{gff}" - gbk: - type: file - description: annotation in GenBank format, containing both sequences and annotations - pattern: "*.{gbk}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.gbk: + type: file + description: annotation in GenBank format, containing both sequences and annotations + pattern: "*.{gbk}" - fna: - type: file - description: nucleotide FASTA file of the input contig sequences - pattern: "*.{fna}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.fna: + type: file + description: nucleotide FASTA file of the input contig sequences + pattern: "*.{fna}" - faa: - type: file - description: protein FASTA file of the translated CDS sequences - pattern: "*.{faa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.faa: + type: file + description: protein FASTA file of the translated CDS sequences + pattern: "*.{faa}" - ffn: - type: file - description: nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA) - pattern: "*.{ffn}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.ffn: + type: file + description: nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, + tRNA, tmRNA, misc_RNA) + pattern: "*.{ffn}" - sqn: - type: file - description: an ASN1 format "Sequin" file for submission to Genbank - pattern: "*.{sqn}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.sqn: + type: file + description: an ASN1 format "Sequin" file for submission to Genbank + pattern: "*.{sqn}" - fsa: - type: file - description: nucleotide FASTA file of the input contig sequences, used by "tbl2asn" to create the .sqn file - pattern: "*.{fsa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.fsa: + type: file + description: nucleotide FASTA file of the input contig sequences, used by "tbl2asn" + to create the .sqn file + pattern: "*.{fsa}" - tbl: - type: file - description: feature Table file, used by "tbl2asn" to create the .sqn file - pattern: "*.{tbl}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.tbl: + type: file + description: feature Table file, used by "tbl2asn" to create the .sqn file + pattern: "*.{tbl}" - err: - type: file - description: unacceptable annotations - the NCBI discrepancy report. - pattern: "*.{err}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.err: + type: file + description: unacceptable annotations - the NCBI discrepancy report. + pattern: "*.{err}" - log: - type: file - description: contains all the output that Prokka produced during its run - pattern: "*.{log}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.log: + type: file + description: contains all the output that Prokka produced during its run + pattern: "*.{log}" - txt: - type: file - description: statistics relating to the annotated features found - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.txt: + type: file + description: statistics relating to the annotated features found + pattern: "*.{txt}" - tsv: - type: file - description: tab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product) - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}/*.tsv: + type: file + description: tab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product) + pattern: "*.{tsv}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" maintainers: diff --git a/modules/nf-core/pyrodigal/environment.yml b/modules/nf-core/pyrodigal/environment.yml index 3e538e8c..b0bbc515 100644 --- a/modules/nf-core/pyrodigal/environment.yml +++ b/modules/nf-core/pyrodigal/environment.yml @@ -1,10 +1,8 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "pyrodigal" channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::pyrodigal=3.3.0 - conda-forge::pigz=2.8 diff --git a/modules/nf-core/pyrodigal/meta.yml b/modules/nf-core/pyrodigal/meta.yml index 0967606f..d8394d07 100644 --- a/modules/nf-core/pyrodigal/meta.yml +++ b/modules/nf-core/pyrodigal/meta.yml @@ -1,5 +1,6 @@ name: "pyrodigal" -description: Pyrodigal is a Python module that provides bindings to Prodigal, a fast, reliable protein-coding gene prediction for prokaryotic genomes. +description: Pyrodigal is a Python module that provides bindings to Prodigal, a fast, + reliable protein-coding gene prediction for prokaryotic genomes. keywords: - sort - annotation @@ -7,52 +8,75 @@ keywords: - prokaryote tools: - "pyrodigal": - description: "Pyrodigal is a Python module that provides bindings to Prodigal (ORF finder for microbial sequences) using Cython." + description: "Pyrodigal is a Python module that provides bindings to Prodigal + (ORF finder for microbial sequences) using Cython." homepage: "https://pyrodigal.readthedocs.org/" documentation: "https://pyrodigal.readthedocs.org/" tool_dev_url: "https://github.com/althonos/pyrodigal/" doi: "10.21105/joss.04296" licence: ["GPL v3"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: FASTA file - pattern: "*.{fasta.gz,fa.gz,fna.gz}" - - output_format: - type: string - description: Output format - pattern: "{gbk,gff}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fasta.gz,fa.gz,fna.gz}" + - - output_format: + type: string + description: Output format + pattern: "{gbk,gff}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - annotations: - type: file - description: Gene annotations. The file format is specified via input channel "output_format". - pattern: "*.{gbk,gff}.gz" - - faa: - type: file - description: protein translations file - pattern: "*.{faa.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.${output_format}.gz": + type: file + description: Gene annotations. The file format is specified via input channel + "output_format". + pattern: "*.{gbk,gff}.gz" - fna: - type: file - description: nucleotide sequences file - pattern: "*.{fna.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fna.gz": + type: file + description: nucleotide sequences file + pattern: "*.{fna.gz}" + - faa: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.faa.gz": + type: file + description: protein translations file + pattern: "*.{faa.gz}" - score: - type: file - description: all potential genes (with scores) - pattern: "*.{score.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.score.gz": + type: file + description: all potential genes (with scores) + pattern: "*.{score.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@louperelo" maintainers: diff --git a/modules/nf-core/rgi/cardannotation/environment.yml b/modules/nf-core/rgi/cardannotation/environment.yml index f1c5872a..609693fe 100644 --- a/modules/nf-core/rgi/cardannotation/environment.yml +++ b/modules/nf-core/rgi/cardannotation/environment.yml @@ -1,7 +1,5 @@ -name: rgi_cardannotation channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::rgi=6.0.3 diff --git a/modules/nf-core/rgi/cardannotation/meta.yml b/modules/nf-core/rgi/cardannotation/meta.yml index 97e6911d..8aff020f 100644 --- a/modules/nf-core/rgi/cardannotation/meta.yml +++ b/modules/nf-core/rgi/cardannotation/meta.yml @@ -1,37 +1,46 @@ name: rgi_cardannotation -description: Preprocess the CARD database for RGI to predict antibiotic resistance from protein or nucleotide data +description: Preprocess the CARD database for RGI to predict antibiotic resistance + from protein or nucleotide data keywords: - bacteria - fasta - antibiotic resistance tools: - rgi: - description: This module preprocesses the downloaded Comprehensive Antibiotic Resistance Database (CARD) which can then be used as input for RGI. + description: This module preprocesses the downloaded Comprehensive Antibiotic + Resistance Database (CARD) which can then be used as input for RGI. homepage: https://card.mcmaster.ca documentation: https://github.com/arpcard/rgi tool_dev_url: https://github.com/arpcard/rgi doi: "10.1093/nar/gkz935" licence: ["https://card.mcmaster.ca/about"] + identifier: "" input: - - card: - type: directory - description: Directory containing the CARD database - pattern: "*/" + - - card: + type: directory + description: Directory containing the CARD database + pattern: "*/" output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - db: - type: directory - description: Directory containing the processed CARD database files - pattern: "*/" + - card_database_processed: + type: directory + description: Directory containing the processed CARD database files + pattern: "*/" - tool_version: - type: string - description: The version of the tool in string format (useful for downstream tools such as hAMRronization) + - RGI_VERSION: + type: string + description: The version of the tool in string format (useful for downstream + tools such as hAMRronization) - db_version: - type: string - description: The version of the used database in string format (useful for downstream tools such as hAMRronization) + - DB_VERSION: + type: string + description: The version of the used database in string format (useful for downstream + tools such as hAMRronization) + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" - "@jfy133" diff --git a/modules/nf-core/rgi/main/environment.yml b/modules/nf-core/rgi/main/environment.yml index f229cc21..609693fe 100644 --- a/modules/nf-core/rgi/main/environment.yml +++ b/modules/nf-core/rgi/main/environment.yml @@ -1,7 +1,5 @@ -name: rgi_main channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::rgi=6.0.3 diff --git a/modules/nf-core/rgi/main/meta.yml b/modules/nf-core/rgi/main/meta.yml index 7e444c8b..9d9836c0 100644 --- a/modules/nf-core/rgi/main/meta.yml +++ b/modules/nf-core/rgi/main/meta.yml @@ -6,59 +6,86 @@ keywords: - antibiotic resistance tools: - rgi: - description: This tool provides a preliminary annotation of your DNA sequence(s) based upon the data available in The Comprehensive Antibiotic Resistance Database (CARD). Hits to genes tagged with Antibiotic Resistance ontology terms will be highlighted. As CARD expands to include more pathogens, genomes, plasmids, and ontology terms this tool will grow increasingly powerful in providing first-pass detection of antibiotic resistance associated genes. See license at CARD website + description: This tool provides a preliminary annotation of your DNA sequence(s) + based upon the data available in The Comprehensive Antibiotic Resistance Database + (CARD). Hits to genes tagged with Antibiotic Resistance ontology terms will + be highlighted. As CARD expands to include more pathogens, genomes, plasmids, + and ontology terms this tool will grow increasingly powerful in providing first-pass + detection of antibiotic resistance associated genes. See license at CARD website homepage: https://card.mcmaster.ca documentation: https://github.com/arpcard/rgi tool_dev_url: https://github.com/arpcard/rgi doi: "10.1093/nar/gkz935" licence: ["https://card.mcmaster.ca/about"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Nucleotide or protein sequences in FASTA format - pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.gz}" - - card: - type: directory - description: Directory containing the CARD database. This is expected to be the unarchived but otherwise unaltered download folder (see RGI documentation for download instructions). - pattern: "*/" - - wildcard: - type: directory - description: Directory containing the WildCARD database (optional). This is expected to be the unarchived but otherwise unaltered download folder (see RGI documentation for download instructions). - pattern: "*/" - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleotide or protein sequences in FASTA format + pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.gz}" + - - card: + type: directory + description: Directory containing the CARD database. This is expected to be + the unarchived but otherwise unaltered download folder (see RGI documentation + for download instructions). + pattern: "*/" + - - wildcard: + type: directory + description: Directory containing the WildCARD database (optional). This is + expected to be the unarchived but otherwise unaltered download folder (see + RGI documentation for download instructions). + pattern: "*/" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - json: - type: file - description: JSON formatted file with RGI results - pattern: "*.{json}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: JSON formatted file with RGI results + pattern: "*.{json}" - tsv: - type: file - description: Tab-delimited file with RGI results - pattern: "*.{txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.txt": + type: file + description: Tab-delimited file with RGI results + pattern: "*.{txt}" - tmp: - type: directory - description: Directory containing various intermediate files - pattern: "temp/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - temp/: + type: directory + description: Directory containing various intermediate files + pattern: "temp/" - tool_version: - type: string - description: The version of the tool in string format (useful for downstream tools such as hAMRronization) + - RGI_VERSION: + type: string + description: The version of the tool in string format (useful for downstream + tools such as hAMRronization) - db_version: - type: string - description: The version of the used database in string format (useful for downstream tools such as hAMRronization) + - DB_VERSION: + type: string + description: The version of the used database in string format (useful for downstream + tools such as hAMRronization) + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rpetit3" - "@jfy133" diff --git a/modules/nf-core/seqkit/seq/environment.yml b/modules/nf-core/seqkit/seq/environment.yml index 74e0dd76..4f8058a9 100644 --- a/modules/nf-core/seqkit/seq/environment.yml +++ b/modules/nf-core/seqkit/seq/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "seqkit_seq" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::seqkit=2.8.1" diff --git a/modules/nf-core/seqkit/seq/meta.yml b/modules/nf-core/seqkit/seq/meta.yml index 8d4e2b16..7d32aba5 100644 --- a/modules/nf-core/seqkit/seq/meta.yml +++ b/modules/nf-core/seqkit/seq/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "seqkit_seq" -description: Transforms sequences (extract ID, filter by length, remove gaps, reverse complement...) +description: Transforms sequences (extract ID, filter by length, remove gaps, reverse + complement...) keywords: - genomics - fasta @@ -18,30 +18,33 @@ tools: tool_dev_url: "https://github.com/shenwei356/seqkit" doi: "10.1371/journal.pone.0163962" licence: ["MIT"] + identifier: biotools:seqkit input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - fastx: - type: file - description: Input fasta/fastq file - pattern: "*.{fsa,fas,fa,fasta,fastq,fq,fsa.gz,fas.gz,fa.gz,fasta.gz,fastq.gz,fq.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - fastx: + type: file + description: Input fasta/fastq file + pattern: "*.{fsa,fas,fa,fasta,fastq,fq,fsa.gz,fas.gz,fa.gz,fasta.gz,fastq.gz,fq.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - fastx: - type: file - description: Output fasta/fastq file - pattern: "*.{fasta,fasta.gz,fastq,fastq.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - ${prefix}.*: + type: file + description: Output fasta/fastq file + pattern: "*.{fasta,fasta.gz,fastq,fastq.gz}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@GallVp" maintainers: diff --git a/modules/nf-core/tabix/bgzip/environment.yml b/modules/nf-core/tabix/bgzip/environment.yml index 56cc0fb1..017c259d 100644 --- a/modules/nf-core/tabix/bgzip/environment.yml +++ b/modules/nf-core/tabix/bgzip/environment.yml @@ -1,8 +1,7 @@ -name: tabix_bgzip channels: - conda-forge - bioconda - - defaults + dependencies: - - bioconda::tabix=1.11 - bioconda::htslib=1.20 + - bioconda::tabix=1.11 diff --git a/modules/nf-core/tabix/bgzip/meta.yml b/modules/nf-core/tabix/bgzip/meta.yml index 621d49ea..131e92cf 100644 --- a/modules/nf-core/tabix/bgzip/meta.yml +++ b/modules/nf-core/tabix/bgzip/meta.yml @@ -13,33 +13,42 @@ tools: documentation: http://www.htslib.org/doc/bgzip.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:tabix input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: file to compress or to decompress + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: file to compress or to decompress output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - output: - type: file - description: Output compressed/decompressed file - pattern: "*." + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${output}: + type: file + description: Output compressed/decompressed file + pattern: "*." - gzi: - type: file - description: Optional gzip index file for compressed inputs - pattern: "*.gzi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${output}.gzi: + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 4f498244..c7794856 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,8 +1,6 @@ -name: untar channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::grep=3.11 - conda-forge::sed=4.8 diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml index a9a2110f..290346b3 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -10,30 +10,33 @@ tools: Extract tar.gz files. documentation: https://www.gnu.org/software/tar/manual/ licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - archive: - type: file - description: File to be untar - pattern: "*.{tar}.{gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: File to be untar + pattern: "*.{tar}.{gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - untar: - type: directory - description: Directory containing contents of archive - pattern: "*/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - $prefix: + type: directory + description: Directory containing contents of archive + pattern: "*/" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/untar/untar.diff b/modules/nf-core/untar/untar.diff index 457dd66d..d020ffeb 100644 --- a/modules/nf-core/untar/untar.diff +++ b/modules/nf-core/untar/untar.diff @@ -1,4 +1,7 @@ Changes in module 'nf-core/untar' +'modules/nf-core/untar/environment.yml' is unchanged +'modules/nf-core/untar/meta.yml' is unchanged +Changes in 'untar/main.nf': --- modules/nf-core/untar/main.nf +++ modules/nf-core/untar/main.nf @@ -4,8 +4,8 @@ @@ -13,4 +16,7 @@ Changes in module 'nf-core/untar' input: tuple val(meta), path(archive) +'modules/nf-core/untar/tests/main.nf.test' is unchanged +'modules/nf-core/untar/tests/tags.yml' is unchanged +'modules/nf-core/untar/tests/main.nf.test.snap' is unchanged ************************************************************ diff --git a/nextflow.config b/nextflow.config index ca13a027..623c1d36 100644 --- a/nextflow.config +++ b/nextflow.config @@ -28,12 +28,11 @@ params { monochrome_logs = false hook_url = null help = false + help_full = false + show_hidden = false version = false pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - // To stop the random warning coming from nf-validation, remove on upgrade to nf-schema - monochromeLogs = null - // Taxonomy classification options run_taxa_classification = false taxa_classification_tool = 'mmseqs2' @@ -46,8 +45,8 @@ params { taxa_classification_mmseqs_taxonomy_searchtype = 2 taxa_classification_mmseqs_taxonomy_lcaranks = 'kingdom,phylum,class,order,family,genus,species' taxa_classification_mmseqs_taxonomy_taxlineage = 1 - taxa_classification_mmseqs_taxonomy_sensitivity = '5.0' - taxa_classification_mmseqs_taxonomy_orffilters = '2.0' + taxa_classification_mmseqs_taxonomy_sensitivity = 5.0 + taxa_classification_mmseqs_taxonomy_orffilters = 2.0 taxa_classification_mmseqs_taxonomy_lcamode = 3 taxa_classification_mmseqs_taxonomy_votemode = 1 @@ -120,13 +119,14 @@ params { amp_hmmsearch_savetargets = false amp_hmmsearch_savedomains = false + amp_ampcombi_db_id = 'DRAMP' amp_ampcombi_db = null amp_ampcombi_parsetables_cutoff = 0.6 amp_ampcombi_parsetables_ampir = '.ampir.tsv' amp_ampcombi_parsetables_amplify = '.amplify.tsv' amp_ampcombi_parsetables_macrel = '.macrel.prediction' amp_ampcombi_parsetables_hmmsearch = '.hmmer_hmmsearch.txt' - amp_ampcombi_parsetables_aalength = 100 + amp_ampcombi_parsetables_aalength = 120 amp_ampcombi_parsetables_dbevalue = 5 amp_ampcombi_parsetables_hmmevalue = 0.06 amp_ampcombi_parsetables_windowstopcodon = 60 @@ -237,45 +237,21 @@ params { bgc_hmmsearch_savedomains = false // Config options - config_profile_name = null - config_profile_description = null - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - config_profile_contact = null - config_profile_url = null - - // Max resource options - // Defaults only, expecting to be overwritten - max_memory = '128.GB' - max_cpus = 16 - max_time = '240.h' + config_profile_name = null + config_profile_description = null - // Schema validation default options - validationFailUnrecognisedParams = false - validationLenientMode = false - validationSchemaIgnoreParams = 'genomes,igenomes_base,fasta,monochromeLogs' - validationShowHiddenParams = false - validate_params = true + custom_config_version = 'master' + custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null + // Schema validation default options + validate_params = true } // Load base.config by default for all pipelines includeConfig 'conf/base.config' -// Load nf-core custom profiles from different Institutions -try { - includeConfig "${params.custom_config_base}/nfcore_custom.config" -} catch (Exception e) { - System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config") -} - -// Load nf-core/funcscan custom profiles from different institutions. -try { - includeConfig "${params.custom_config_base}/pipeline/funcscan.config" -} catch (Exception e) { - System.err.println("WARNING: Could not load nf-core/config/funcscan profiles: ${params.custom_config_base}/pipeline/funcscan.config") -} - profiles { debug { dumpHashes = true @@ -290,7 +266,7 @@ profiles { podman.enabled = false shifter.enabled = false charliecloud.enabled = false - conda.channels = ['conda-forge', 'bioconda', 'defaults'] + conda.channels = ['conda-forge', 'bioconda'] apptainer.enabled = false } mamba { @@ -390,18 +366,20 @@ profiles { test_preannotated_bgc { includeConfig 'conf/test_preannotated_bgc.config' } } -// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile -// Will not be used unless Apptainer / Docker / Podman / Singularity are enabled -// Set to your registry if you have a mirror of containers -apptainer.registry = 'quay.io' -docker.registry = 'quay.io' -podman.registry = 'quay.io' -singularity.registry = 'quay.io' +// Load nf-core custom profiles from different Institutions +includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" -// Nextflow plugins -plugins { - id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet -} +// Load nf-core/funcscan custom profiles from different institutions. +includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/funcscan.config" : "/dev/null" + +// Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile +// Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled +// Set to your registry if you have a mirror of containers +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' +charliecloud.registry = 'quay.io' // Export these variables to prevent local Python/R libraries from conflicting with those in the container // The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container. @@ -414,8 +392,15 @@ env { JULIA_DEPOT_PATH = "/usr/local/share/julia" } -// Capture exit codes from upstream processes when piping -process.shell = ['/bin/bash', '-euo', 'pipefail'] +// Set bash options +process.shell = """\ +bash + +set -e # Exit if a tool returns a non-zero status/exit code +set -u # Treat unset variables and parameters as an error +set -o pipefail # Returns the status of the last command to exit with a non-zero status or zero if all successfully execute +set -C # No clobber - prevent output redirection from overwriting files. +""" // Disable process selector warnings by default. Use debug profile to enable warnings. nextflow.enable.configProcessNamesValidation = false @@ -444,43 +429,46 @@ manifest { homePage = 'https://github.com/nf-core/funcscan' description = """Pipeline for screening for functional components of assembled contigs""" mainScript = 'main.nf' - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=24.04.2' version = '2.1.0dev' doi = '10.5281/zenodo.7643099' } -// Load modules.config for DSL2 module specific options -includeConfig 'conf/modules.config' +// Nextflow plugins +plugins { + id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet +} -// Function to ensure that resource requirements don't go beyond -// a maximum limit -def check_max(obj, type) { - if (type == 'memory') { - try { - if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1) - return params.max_memory as nextflow.util.MemoryUnit - else - return obj - } catch (all) { - println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj" - return obj - } - } else if (type == 'time') { - try { - if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1) - return params.max_time as nextflow.util.Duration - else - return obj - } catch (all) { - println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj" - return obj - } - } else if (type == 'cpus') { - try { - return Math.min( obj, params.max_cpus as int ) - } catch (all) { - println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj" - return obj - } +validation { + defaultIgnoreParams = ["genomes"] + help { + enabled = true + command = "nextflow run $manifest.name -profile --input samplesheet.csv --outdir " + fullParameter = "help_full" + showHiddenParameter = "show_hidden" + beforeText = """ +-\033[2m----------------------------------------------------\033[0m- + \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m +\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m +\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m +\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m + \033[0;32m`._,._,\'\033[0m +\033[0;35m ${manifest.name} ${manifest.version}\033[0m +-\033[2m----------------------------------------------------\033[0m- +""" + afterText = """${manifest.doi ? "* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""} +* The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + +* Software dependencies + https://github.com/${manifest.name}/blob/master/CITATIONS.md +""" + } + summary { + beforeText = validation.help.beforeText + afterText = validation.help.afterText } } + +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' diff --git a/nextflow_schema.json b/nextflow_schema.json index ca01d496..b1a7bf06 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/nf-core/funcscan/master/nextflow_schema.json", "title": "nf-core/funcscan pipeline parameters", "description": "Pipeline for screening for functional components of assembled contigs", "type": "object", - "definitions": { + "$defs": { "input_output_options": { "title": "Input/output options", "type": "object", @@ -152,15 +152,15 @@ "fa_icon": "fab fa-audible" }, "taxa_classification_mmseqs_taxonomy_sensitivity": { - "type": "string", - "default": "5.0", - "help_text": "This flag specifies the speed and sensitivity of the taxonomic search. It stands for how many kmers should be produced during the preliminary seeding stage. A very fast search requires a low value e.g. '1.0' and a a very sensitive search requires e.g. '7.0'. More details can be found in the [documentation](https://mmseqs.com/latest/userguide.pdf).\n\n> Modifies tool parameter(s):\n> - mmseqs taxonomy: `--s`", + "type": "number", + "default": 5.0, + "help_text": "This flag specifies the speed and sensitivity of the taxonomic search. It stands for how many kmers should be produced during the preliminary seeding stage. A very fast search requires a low value e.g. '1.0' and a a very sensitive search requires e.g. '7.0'. More details can be found in the [documentation](https://mmseqs.com/latest/userguide.pdf).\n\n> Modifies tool parameter(s):\n> - mmseqs taxonomy: `-s`", "description": "Specify the speed and sensitivity for taxonomy assignment.", "fa_icon": "fas fa-history" }, "taxa_classification_mmseqs_taxonomy_orffilters": { - "type": "string", - "default": "2.0", + "type": "number", + "default": 2.0, "help_text": "This flag specifies the sensitivity used for prefiltering the query ORF. Before the taxonomy-assigning step, MMseqs2 searches the predicted ORFs against the provided database. This value influences the speed with which the search is carried out. More details can be found in the [documentation](https://mmseqs.com/latest/userguide.pdf).\n\n> Modifies tool parameter(s):\n> - mmseqs taxonomy: `--orf-filter-s`", "description": "Specify the ORF search sensitivity in the prefilter step.", "fa_icon": "fas fa-history" @@ -626,11 +626,18 @@ "description": "Antimicrobial peptides parsing, filtering, and annotating submodule of AMPcombi2. More info: https://github.com/Darcy220606/AMPcombi", "default": "", "properties": { + "amp_ampcombi_db_id": { + "type": "string", + "description": "The name of the database used to classify the AMPs.", + "help_text": "AMPcombi can use three different AMP databases to classify the recovered AMPS. These can either be: \n\n- [DRAMP database](http://dramp.cpu-bioinfor.org/downloads/): Only general AMPs are downloaded and filtered to remove any entry that has an instance of non amino acid residues in their sequence.\n\n- [APD](https://aps.unmc.edu/): Only experimentally validated AMPs are present.\n\n- [UniRef100](https://academic.oup.com/bioinformatics/article/23/10/1282/197795): Combines a more general protein dataset including curated and non curated AMPs. Helpful for identifying the clusters to remove any potential false positives. Beware: If the thresholds are for ampcombi are not strict enough, alignment with this database can take a long time. \n\nBy default this is set to 'DRAMP'. Other valid options include 'APD' or 'UniRef100'.\n\nFor more information check the AMPcombi [documentation](https://ampcombi.readthedocs.io/en/main/usage.html#parse-tables).", + "fa_icon": "fas fa-address-book", + "default": "DRAMP", + "enum": ["DRAMP", "APD", "UniRef100"] + }, "amp_ampcombi_db": { "type": "string", - "description": "Path to AMPcombi reference database directory (DRAMP).", - "help_text": "AMPcombi uses the 'general AMPs' dataset of the [DRAMP database](http://dramp.cpu-bioinfor.org/downloads/) for taxonomic classification. If you have a local version of it, you can provide the path to the directory(!) that contains the following reference database files:\n1. fasta file with `.fasta` file extension\n2. the corresponding table with with functional and taxonomic classifications in `.tsv` file extension.\n\nThe contents of the directory should have files such as `*.dmnd` and `*.fasta` in the top level.\n\nFor more information check the AMPcombi [documentation](https://github.com/Darcy220606/AMPcombi).", - "fa_icon": "fas fa-address-book" + "description": "The path to the folder containing the reference database files.", + "help_text": "The path to the folder containing the reference database files (`*.fasta` and `*.tsv`); a fasta file and the corresponding table with structural, functional and if reported taxonomic classifications. AMPcombi will then generate the corresponding `mmseqs2` directory, in which all binary files are prepared for the downstream alignment of teh recovered AMPs with [MMseqs2](https://github.com/soedinglab/MMseqs2). These can also be provided by the user by setting up an mmseqs2 compatible database using `mmseqs createdb *.fasta` in a directory called `mmseqs2`.\n\nExample file structure for the reference database supplied by the user:\n\n```bash\namp_DRAMP_database/\n\u251c\u2500\u2500 general_amps_2024_11_13.fasta\n\u251c\u2500\u2500 general_amps_2024_11_13.txt\n\u2514\u2500\u2500 mmseqs2\n \u251c\u2500\u2500 ref_DB\n \u251c\u2500\u2500 ref_DB.dbtype\n \u251c\u2500\u2500 ref_DB_h\n \u251c\u2500\u2500 ref_DB_h.dbtype\n \u251c\u2500\u2500 ref_DB_h.index\n \u251c\u2500\u2500 ref_DB.index\n \u251c\u2500\u2500 ref_DB.lookup\n \u2514\u2500\u2500 ref_DB.source\n\nFor more information check the AMPcombi [documentation](https://ampcombi.readthedocs.io/en/main/usage.html#parse-tables)." }, "amp_ampcombi_parsetables_cutoff": { "type": "number", @@ -641,7 +648,7 @@ }, "amp_ampcombi_parsetables_aalength": { "type": "integer", - "default": 100, + "default": 120, "description": "Filter out all amino acid fragments shorter than this number.", "help_text": "Any AMP hit that does not satisfy this length cut-off will be removed from the final AMPcombi2 summary table.\n\n> Modifies tool parameter(s):\n> - AMPCOMBI: `--aminoacid_length`", "fa_icon": "fas fa-ruler-horizontal" @@ -1192,14 +1199,12 @@ }, "bgc_antismash_pfam2go": { "type": "boolean", - "default": false, "description": "Run Pfam to Gene Ontology mapping module.", "help_text": "This maps the proteins to Pfam database to annotate BGC modules with functional information based on the protein families they contain. For more information see the antiSMASH [documentation](https://docs.antismash.secondarymetabolites.org/).\n\n> Modifies tool parameter(s):\n> - antiSMASH: `--pfam2go`", "fa_icon": "fas fa-search" }, "bgc_antismash_rre": { "type": "boolean", - "default": false, "description": "Run RREFinder precision mode on all RiPP gene clusters.", "help_text": "This enables the prediction of regulatory elements on the BGC that help in the control of protein expression. For more information see the antiSMASH [documentation](https://docs.antismash.secondarymetabolites.org/).\n\n> Modifies tool parameter(s):\n> - antiSMASH: `--rre`", "fa_icon": "fas fa-search" @@ -1214,7 +1219,6 @@ }, "bgc_antismash_tfbs": { "type": "boolean", - "default": false, "description": "Run TFBS finder on all gene clusters.", "help_text": "This enables the prediction of transcription factor binding sites which control the gene expression. For more information see the antiSMASH [documentation](https://docs.antismash.secondarymetabolites.org/).\n\n> Modifies tool parameter(s):\n> - antiSMASH: `--tfbs`", "fa_icon": "fas fa-search" @@ -1439,41 +1443,6 @@ } } }, - "max_job_request_options": { - "title": "Max job request options", - "type": "object", - "fa_icon": "fab fa-acquisitions-incorporated", - "description": "Set the top limit for requested resources for any single job.", - "help_text": "If you are running on a smaller system, a pipeline step requesting more resources than are available may cause the Nextflow to stop the run with an error. These options allow you to cap the maximum resources requested by any single job so that the pipeline will run on your system.\n\nNote that you can not _increase_ the resources requested by any job using these options. For that you will need your own configuration file. See [the nf-core website](https://nf-co.re/usage/configuration) for details.", - "properties": { - "max_cpus": { - "type": "integer", - "description": "Maximum number of CPUs that can be requested for any single job.", - "default": 16, - "fa_icon": "fas fa-microchip", - "hidden": true, - "help_text": "Use to set an upper-limit for the CPU requirement for each process. Should be an integer e.g. `--max_cpus 1`" - }, - "max_memory": { - "type": "string", - "description": "Maximum amount of memory that can be requested for any single job.", - "default": "128.GB", - "fa_icon": "fas fa-memory", - "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", - "hidden": true, - "help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`" - }, - "max_time": { - "type": "string", - "description": "Maximum amount of time that can be requested for any single job.", - "default": "240.h", - "fa_icon": "far fa-clock", - "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$", - "hidden": true, - "help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '2.h'`" - } - } - }, "generic_options": { "title": "Generic options", "type": "object", @@ -1481,12 +1450,6 @@ "description": "Less common options for the pipeline, typically set in a config file.", "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", "properties": { - "help": { - "type": "boolean", - "description": "Display help text.", - "fa_icon": "fas fa-question-circle", - "hidden": true - }, "version": { "type": "boolean", "description": "Display version and exit.", @@ -1562,27 +1525,6 @@ "fa_icon": "fas fa-check-square", "hidden": true }, - "validationShowHiddenParams": { - "type": "boolean", - "fa_icon": "far fa-eye-slash", - "description": "Show all params when using `--help`", - "hidden": true, - "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters." - }, - "validationFailUnrecognisedParams": { - "type": "boolean", - "fa_icon": "far fa-check-circle", - "description": "Validation of parameters fails when an unrecognised parameter is found.", - "hidden": true, - "help_text": "By default, when an unrecognised parameter is found, it returns a warinig." - }, - "validationLenientMode": { - "type": "boolean", - "fa_icon": "far fa-check-circle", - "description": "Validation of parameters in lenient more.", - "hidden": true, - "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)." - }, "pipelines_testdata_base_path": { "type": "string", "fa_icon": "far fa-check-circle", @@ -1595,100 +1537,97 @@ }, "allOf": [ { - "$ref": "#/definitions/input_output_options" - }, - { - "$ref": "#/definitions/screening_type_activation" + "$ref": "#/$defs/input_output_options" }, { - "$ref": "#/definitions/taxonomic_classification_general_options" + "$ref": "#/$defs/screening_type_activation" }, { - "$ref": "#/definitions/taxonomic_classification_mmseqs2_databases" + "$ref": "#/$defs/taxonomic_classification_general_options" }, { - "$ref": "#/definitions/taxonomic_classification_mmseqs2_taxonomy" + "$ref": "#/$defs/taxonomic_classification_mmseqs2_databases" }, { - "$ref": "#/definitions/annotation_general_options" + "$ref": "#/$defs/taxonomic_classification_mmseqs2_taxonomy" }, { - "$ref": "#/definitions/annotation_bakta" + "$ref": "#/$defs/annotation_general_options" }, { - "$ref": "#/definitions/annotation_prokka" + "$ref": "#/$defs/annotation_bakta" }, { - "$ref": "#/definitions/annotation_prodigal" + "$ref": "#/$defs/annotation_prokka" }, { - "$ref": "#/definitions/annotation_pyrodigal" + "$ref": "#/$defs/annotation_prodigal" }, { - "$ref": "#/definitions/database_downloading_options" + "$ref": "#/$defs/annotation_pyrodigal" }, { - "$ref": "#/definitions/amp_amplify" + "$ref": "#/$defs/database_downloading_options" }, { - "$ref": "#/definitions/amp_ampir" + "$ref": "#/$defs/amp_amplify" }, { - "$ref": "#/definitions/amp_hmmsearch" + "$ref": "#/$defs/amp_ampir" }, { - "$ref": "#/definitions/amp_macrel" + "$ref": "#/$defs/amp_hmmsearch" }, { - "$ref": "#/definitions/amp_ampcombi2_parsetables" + "$ref": "#/$defs/amp_macrel" }, { - "$ref": "#/definitions/amp_ampcombi2_cluster" + "$ref": "#/$defs/amp_ampcombi2_parsetables" }, { - "$ref": "#/definitions/arg_amrfinderplus" + "$ref": "#/$defs/amp_ampcombi2_cluster" }, { - "$ref": "#/definitions/arg_deeparg" + "$ref": "#/$defs/arg_amrfinderplus" }, { - "$ref": "#/definitions/arg_fargene" + "$ref": "#/$defs/arg_deeparg" }, { - "$ref": "#/definitions/arg_rgi" + "$ref": "#/$defs/arg_fargene" }, { - "$ref": "#/definitions/arg_abricate" + "$ref": "#/$defs/arg_rgi" }, { - "$ref": "#/definitions/arg_hamronization" + "$ref": "#/$defs/arg_abricate" }, { - "$ref": "#/definitions/arg_argnorm" + "$ref": "#/$defs/arg_hamronization" }, { - "$ref": "#/definitions/bgc_general_options" + "$ref": "#/$defs/arg_argnorm" }, { - "$ref": "#/definitions/bgc_antismash" + "$ref": "#/$defs/bgc_general_options" }, { - "$ref": "#/definitions/bgc_deepbgc" + "$ref": "#/$defs/bgc_antismash" }, { - "$ref": "#/definitions/bgc_gecco" + "$ref": "#/$defs/bgc_deepbgc" }, { - "$ref": "#/definitions/bgc_hmmsearch" + "$ref": "#/$defs/bgc_gecco" }, { - "$ref": "#/definitions/institutional_config_options" + "$ref": "#/$defs/bgc_hmmsearch" }, { - "$ref": "#/definitions/max_job_request_options" + "$ref": "#/$defs/institutional_config_options" }, { - "$ref": "#/definitions/generic_options" + "$ref": "#/$defs/generic_options" } ] } diff --git a/subworkflows/local/amp.nf b/subworkflows/local/amp.nf index 88f75393..293692a1 100644 --- a/subworkflows/local/amp.nf +++ b/subworkflows/local/amp.nf @@ -6,7 +6,7 @@ include { MACREL_CONTIGS } from '.. include { HMMER_HMMSEARCH as AMP_HMMER_HMMSEARCH } from '../../modules/nf-core/hmmer/hmmsearch/main' include { AMPLIFY_PREDICT } from '../../modules/nf-core/amplify/predict/main' include { AMPIR } from '../../modules/nf-core/ampir/main' -include { DRAMP_DOWNLOAD } from '../../modules/local/dramp_download' +include { AMP_DATABASE_DOWNLOAD } from '../../modules/local/amp_database_download' include { AMPCOMBI2_PARSETABLES } from '../../modules/nf-core/ampcombi2/parsetables' include { AMPCOMBI2_COMPLETE } from '../../modules/nf-core/ampcombi2/complete' include { AMPCOMBI2_CLUSTER } from '../../modules/nf-core/ampcombi2/cluster' @@ -111,13 +111,13 @@ workflow AMP { } if ( params.amp_ampcombi_db != null ) { - AMPCOMBI2_PARSETABLES ( ch_input_for_ampcombi.input, ch_input_for_ampcombi.faa, ch_input_for_ampcombi.gbk, params.amp_ampcombi_db ) - } else { - DRAMP_DOWNLOAD() - ch_versions = ch_versions.mix( DRAMP_DOWNLOAD.out.versions ) - ch_ampcombi_input_db = DRAMP_DOWNLOAD.out.db - AMPCOMBI2_PARSETABLES ( ch_input_for_ampcombi.input, ch_input_for_ampcombi.faa, ch_input_for_ampcombi.gbk, ch_ampcombi_input_db ) - } + AMPCOMBI2_PARSETABLES ( ch_input_for_ampcombi.input, ch_input_for_ampcombi.faa, ch_input_for_ampcombi.gbk, params.amp_ampcombi_db_id, params.amp_ampcombi_db, [] ) + } else { + AMP_DATABASE_DOWNLOAD( params.amp_ampcombi_db_id ) + ch_versions = ch_versions.mix( AMP_DATABASE_DOWNLOAD.out.versions ) + ch_ampcombi_input_db = AMP_DATABASE_DOWNLOAD.out.db + AMPCOMBI2_PARSETABLES ( ch_input_for_ampcombi.input, ch_input_for_ampcombi.faa, ch_input_for_ampcombi.gbk, params.amp_ampcombi_db_id, ch_ampcombi_input_db, [] ) + } ch_versions = ch_versions.mix( AMPCOMBI2_PARSETABLES.out.versions ) ch_ampcombi_summaries = AMPCOMBI2_PARSETABLES.out.tsv.map{ it[1] }.collect() diff --git a/subworkflows/local/utils_nfcore_funcscan_pipeline/main.nf b/subworkflows/local/utils_nfcore_funcscan_pipeline/main.nf index 0d4b7afb..c710304e 100644 --- a/subworkflows/local/utils_nfcore_funcscan_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_funcscan_pipeline/main.nf @@ -8,29 +8,24 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { UTILS_NFVALIDATION_PLUGIN } from '../../nf-core/utils_nfvalidation_plugin' -include { paramsSummaryMap } from 'plugin/nf-validation' -include { fromSamplesheet } from 'plugin/nf-validation' -include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' -include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' -include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -include { dashedLine } from '../../nf-core/utils_nfcore_pipeline' -include { nfCoreLogo } from '../../nf-core/utils_nfcore_pipeline' -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' -include { workflowCitation } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUBWORKFLOW TO INITIALISE PIPELINE -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow PIPELINE_INITIALISATION { - take: version // boolean: Display version and exit - help // boolean: Display help text validate_params // boolean: Boolean whether to validate parameters against the schema at runtime monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args @@ -44,7 +39,7 @@ workflow PIPELINE_INITIALISATION { // // Print version and exit if required and dump pipeline parameters to JSON file // - UTILS_NEXTFLOW_PIPELINE ( + UTILS_NEXTFLOW_PIPELINE( version, true, outdir, @@ -54,24 +49,19 @@ workflow PIPELINE_INITIALISATION { // // Validate parameters and generate parameter summary to stdout // - pre_help_text = nfCoreLogo(monochrome_logs) - post_help_text = '\n' + workflowCitation() + '\n' + dashedLine(monochrome_logs) - def String workflow_command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " - UTILS_NFVALIDATION_PLUGIN ( - help, - workflow_command, - pre_help_text, - post_help_text, + UTILS_NFSCHEMA_PLUGIN( + workflow, validate_params, - "nextflow_schema.json" + null ) // // Check config provided to the pipeline // - UTILS_NFCORE_PIPELINE ( + UTILS_NFCORE_PIPELINE( nextflow_cli_args ) + // // Custom validation for pipeline parameters // @@ -80,8 +70,9 @@ workflow PIPELINE_INITIALISATION { // // Create channel from input file provided through params.input // + Channel - .fromSamplesheet("input") + .fromList(samplesheetToList(input, "${projectDir}/assets/schema_input.json")) .set { ch_samplesheet } emit: @@ -90,13 +81,12 @@ workflow PIPELINE_INITIALISATION { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUBWORKFLOW FOR PIPELINE COMPLETION -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow PIPELINE_COMPLETION { - take: email // string: email address email_on_fail // string: email address sent on pipeline failure @@ -107,7 +97,6 @@ workflow PIPELINE_COMPLETION { multiqc_report // string: Path to MultiQC report main: - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") // @@ -115,25 +104,32 @@ workflow PIPELINE_COMPLETION { // workflow.onComplete { if (email || email_on_fail) { - completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs, multiqc_report.toList()) + completionEmail( + summary_params, + email, + email_on_fail, + plaintext_email, + outdir, + monochrome_logs, + multiqc_report.toList() + ) } completionSummary(monochrome_logs) - if (hook_url) { imNotification(summary_params, hook_url) } } workflow.onError { - log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + log.error("Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting") } } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTIONS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // // Check and validate pipeline parameters @@ -141,19 +137,20 @@ workflow PIPELINE_COMPLETION { def validateInputParameters() { // Validate antiSMASH inputs for containers // 1. Make sure that either both or none of the antiSMASH directories are supplied - if ( ['docker', 'singularity'].contains(workflow.containerEngine) && ( ( params.run_bgc_screening && !params.bgc_antismash_db && params.bgc_antismash_installdir && !params.bgc_skip_antismash) || ( params.run_bgc_screening && params.bgc_antismash_db && !params.bgc_antismash_installdir && !params.bgc_skip_antismash ) ) ) + if (['docker', 'singularity'].contains(workflow.containerEngine) && ((params.run_bgc_screening && !params.bgc_antismash_db && params.bgc_antismash_installdir && !params.bgc_skip_antismash) || (params.run_bgc_screening && params.bgc_antismash_db && !params.bgc_antismash_installdir && !params.bgc_skip_antismash))) { error("[nf-core/funcscan] ERROR: You supplied either the antiSMASH database or its installation directory, but not both. Please either supply both directories or none (letting the pipeline download them instead).") - - // 2. If both are supplied: Exit if we have a name collision error - else if ( ['docker', 'singularity'].contains(workflow.containerEngine) && ( params.run_bgc_screening && params.bgc_antismash_db && params.bgc_antismash_installdir && !params.bgc_skip_antismash ) ) { + } + else if (['docker', 'singularity'].contains(workflow.containerEngine) && (params.run_bgc_screening && params.bgc_antismash_db && params.bgc_antismash_installdir && !params.bgc_skip_antismash)) { antismash_database_dir = new File(params.bgc_antismash_db) antismash_install_dir = new File(params.bgc_antismash_installdir) - if ( antismash_database_dir.name == antismash_install_dir.name ) error("[nf-core/funcscan] ERROR: Your supplied antiSMASH database and installation directories have identical names: \"" + antismash_install_dir.name + "\".\nPlease make sure to name them differently, for example:\n - Database directory: "+ antismash_database_dir.parent + "/antismash_db\n - Installation directory: " + antismash_install_dir.parent + "/antismash_dir") + if (antismash_database_dir.name == antismash_install_dir.name) { + error("[nf-core/funcscan] ERROR: Your supplied antiSMASH database and installation directories have identical names: " + antismash_install_dir.name + ".\nPlease make sure to name them differently, for example:\n - Database directory: " + antismash_database_dir.parent + "/antismash_db\n - Installation directory: " + antismash_install_dir.parent + "/antismash_dir") + } } // 3. Give warning if not using container system assuming conda - if ( params.run_bgc_screening && ( !params.bgc_antismash_db ) && !params.bgc_skip_antismash && ( session.config.conda && session.config.conda.enabled ) ) { - log.warn "[nf-core/funcscan] Running antiSMASH download database module, and detected conda has been enabled. Assuming using conda for pipeline run. Check config if this is not expected!" + if (params.run_bgc_screening && (!params.bgc_antismash_db) && !params.bgc_skip_antismash && (session.config.conda && session.config.conda.enabled)) { + log.warn("[nf-core/funcscan] Running antiSMASH download database module, and detected conda has been enabled. Assuming using conda for pipeline run. Check config if this is not expected!") } } @@ -164,20 +161,20 @@ def validateInputSamplesheet(input) { def (metas, fastas) = input[1..2] // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end - def endedness_ok = metas.collect{ it.single_end }.unique().size == 1 + def endedness_ok = metas.collect { meta -> meta.single_end }.unique().size == 1 if (!endedness_ok) { error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") } - return [ metas[0], fastas ] + return [metas[0], fastas] } // // Get attribute from genome config file e.g. fasta // def getGenomeAttribute(attribute) { if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { - if (params.genomes[ params.genome ].containsKey(attribute)) { - return params.genomes[ params.genome ][ attribute ] + if (params.genomes[params.genome].containsKey(attribute)) { + return params.genomes[params.genome][attribute] } } return null @@ -188,15 +185,10 @@ def getGenomeAttribute(attribute) { // def genomeExistsError() { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" error(error_string) } } - // // Generate methods description for MultiQC // @@ -205,97 +197,98 @@ def toolCitationText() { // Uncomment function in methodsDescriptionText to render in MultiQC report def preprocessing_text = "The pipeline used the following tools: preprocessing included SeqKit2 (Shen et al. 2024)." - def annotation_text = [ - "Annotation was carried out with:", - params.annotation_tool == 'prodigal' ? "Prodigal (Hyatt et al. 2010)." : "", - params.annotation_tool == 'pyrodigal' ? "Pyrodigal (Larralde 2022)." : "", - params.annotation_tool == 'bakta' ? "BAKTA (Schwengers et al. 2021)." : "", - params.annotation_tool == 'prokka' ? "PROKKA (Seemann 2014)." : "", - ].join(' ').trim() - - def amp_text = [ - "The following antimicrobial peptide screening tools were used:", - !params.amp_skip_amplify ? "AMPlify (Li et al. 2022)," : "", - !params.amp_skip_macrel ? "Macrel (Santos-Júnior et al. 2020)," : "", - !params.amp_skip_ampir ? "ampir (Fingerhut et al. 2021)," : "", - params.amp_run_hmmsearch ? "HMMER (Eddy 2011)," : "", - ". The output from the antimicrobial peptide screening tools were standardised and summarised with AMPcombi (Ibrahim and Perelo 2023)." - ].join(' ').trim().replaceAll(", \\.", ".") - - def arg_text = [ - "The following antimicrobial resistance gene screening tools were used:", - !params.arg_skip_fargene ? "fARGene (Berglund et al. 2019)," : "", - !params.arg_skip_rgi ? "RGI (Alcock et al. 2020)," : "", - !params.arg_skip_amrfinderplus ? "AMRfinderplus (Feldgarden et al. 2021)," : "", - !params.arg_skip_deeparg ? "deepARG (Arango-Argoty 2018)," : "", - !params.arg_skip_abricate ? "ABRicate (Seemann 2020)," : "", - !params.arg_skip_argnorm ? ". The outputs from ARG screening tools were normalized to the antibiotic resistance ontology using argNorm (Perovic et al. 2024)," : "", - ". The output from the antimicrobial resistance gene screening tools were standardised and summarised with hAMRonization (Maguire et al. 2023)." - ].join(' ').trim().replaceAll(", +\\.", ".") - - def bgc_text = [ - "The following biosynthetic gene cluster screening tools were used:", - !params.bgc_skip_antismash ? "antiSMASH (Blin et al. 2021)," : "", - !params.bgc_skip_deepbgc ? "deepBGC (Hannigan et al. 2019)," : "", - !params.bgc_skip_gecco ? "GECCO (Carroll et al. 2021)," : "", - params.bgc_run_hmmsearch ? "HMMER (Eddy 2011)," : "", - ". The output from the biosynthetic gene cluster screening tools were standardised and summarised with comBGC (Frangenberg et al. 2023)." - ].join(' ').replaceAll(", +\\.", ".").trim() + def annotation_text = [ + "Annotation was carried out with:", + params.annotation_tool == 'prodigal' ? "Prodigal (Hyatt et al. 2010)." : "", + params.annotation_tool == 'pyrodigal' ? "Pyrodigal (Larralde 2022)." : "", + params.annotation_tool == 'bakta' ? "BAKTA (Schwengers et al. 2021)." : "", + params.annotation_tool == 'prokka' ? "PROKKA (Seemann 2014)." : "" + ].join(' ').trim() + + def amp_text = [ + "The following antimicrobial peptide screening tools were used:", + !params.amp_skip_amplify ? "AMPlify (Li et al. 2022)," : "", + !params.amp_skip_macrel ? "Macrel (Santos-Júnior et al. 2020)," : "", + !params.amp_skip_ampir ? "ampir (Fingerhut et al. 2021)," : "", + params.amp_run_hmmsearch ? "HMMER (Eddy 2011)," : "", + ". The output from the antimicrobial peptide screening tools were standardised and summarised with AMPcombi (Ibrahim and Perelo 2023)." + ].join(' ').trim().replaceAll(', .', ".") + + def arg_text = [ + "The following antimicrobial resistance gene screening tools were used:", + !params.arg_skip_fargene ? "fARGene (Berglund et al. 2019)," : "", + !params.arg_skip_rgi ? "RGI (Alcock et al. 2020)," : "", + !params.arg_skip_amrfinderplus ? "AMRfinderplus (Feldgarden et al. 2021)," : "", + !params.arg_skip_deeparg ? "deepARG (Arango-Argoty 2018)," : "", + !params.arg_skip_abricate ? "ABRicate (Seemann 2020)," : "", + !params.arg_skip_argnorm ? ". The outputs from ARG screening tools were normalized to the antibiotic resistance ontology using argNorm (Perovic et al. 2024)," : "", + ". The output from the antimicrobial resistance gene screening tools were standardised and summarised with hAMRonization (Maguire et al. 2023)." + ].join(' ').trim().replaceAll(', +.', ".") + + def bgc_text = [ + "The following biosynthetic gene cluster screening tools were used:", + !params.bgc_skip_antismash ? "antiSMASH (Blin et al. 2021)," : "", + !params.bgc_skip_deepbgc ? "deepBGC (Hannigan et al. 2019)," : "", + !params.bgc_skip_gecco ? "GECCO (Carroll et al. 2021)," : "", + params.bgc_run_hmmsearch ? "HMMER (Eddy 2011)," : "", + ". The output from the biosynthetic gene cluster screening tools were standardised and summarised with comBGC (Frangenberg et al. 2023)." + ].join(' ').replaceAll(', +.', ".").trim() def postprocessing_text = "Run statistics were reported using MultiQC (Ewels et al. 2016)." - def citation_text = [ + def citation_text = [ preprocessing_text, annotation_text, params.run_amp_screening ? amp_text : "", params.run_arg_screening ? arg_text : "", params.run_bgc_screening ? bgc_text : "", - postprocessing_text, + postprocessing_text ].join(' ').trim() return citation_text } def toolBibliographyText() { - // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", + // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? '
  • Author (2023) Pub name, Journal, DOI
  • " : "", // Uncomment function in methodsDescriptionText to render in MultiQC report - def preprocessing_text = "
  • Shen, W., Sipos, B., & Zhao, L. (2024). SeqKit2: A Swiss army knife for sequence and alignment processing. iMeta, e191. https://doi.org/10.1002/imt2.191
  • " - - def annotation_text = [ - params.annotation_tool == 'prodigal' ? "
  • Hyatt, D., Chen, G. L., Locascio, P. F., Land, M. L., Larimer, F. W., & Hauser, L. J. (2010). Prodigal: prokaryotic gene recognition and translation initiation site identification. BMC bioinformatics, 11, 119. DOI: 10.1186/1471-2105-11-119" : "", - params.annotation_tool == 'pyrodigal' ? "
  • Larralde, M. (2022). Pyrodigal: Python bindings and interface to Prodigal, an efficient method for gene prediction in prokaryotes. Journal of Open Source Software, 7(72), 4296. DOI: 10.21105/joss.04296
  • " : "", - params.annotation_tool == 'bakta' ? "
  • Schwengers, O., Jelonek, L., Dieckmann, M. A., Beyvers, S., Blom, J., & Goesmann, A. (2021). Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. Microbial Genomics, 7(11). DOI: 10.1099/mgen.0.000685
  • " : "", - params.annotation_tool == 'prokka' ? "
  • Seemann, T. (2014). Prokka: rapid prokaryotic genome annotation. Bioinformatics (Oxford, England), 30(14), 2068–2069. DOI: 10.1093/bioinformatics/btu153
  • " : "", - ].join(' ').trim() - - def amp_text = [ - !params.amp_skip_amplify ? "
  • Li, C., Sutherland, D., Hammond, S. A., Yang, C., Taho, F., Bergman, L., Houston, S., Warren, R. L., Wong, T., Hoang, L., Cameron, C. E., Helbing, C. C., & Birol, I. (2022). AMPlify: attentive deep learning model for discovery of novel antimicrobial peptides effective against WHO priority pathogens. BMC genomics, 23(1), 77. DOI: 10.1186/s12864-022-08310-4
  • " : "", - !params.amp_skip_macrel ? "
  • Santos-Júnior, C. D., Pan, S., Zhao, X. M., & Coelho, L. P. (2020). Macrel: antimicrobial peptide screening in genomes and metagenomes. PeerJ, 8, e10555. DOI: 10.7717/peerj.10555
  • " : "", - !params.amp_skip_ampir ? "
  • Fingerhut, L., Miller, D. J., Strugnell, J. M., Daly, N. L., & Cooke, I. R. (2021). ampir: an R package for fast genome-wide prediction of antimicrobial peptides. Bioinformatics (Oxford, England), 36(21), 5262–5263. DOI: 10.1093/bioinformatics/btaa653
  • " : "", - "
  • Ibrahim, A. & Perelo, L. (2023). Darcy220606/AMPcombi. DOI: 10.5281/zenodo.7639121
  • " - ].join(' ').trim().replaceAll(", \\.", ".") - - def arg_text = [ - !params.arg_skip_fargene ? "
  • Berglund, F., Österlund, T., Boulund, F., Marathe, N. P., Larsson, D., & Kristiansson, E. (2019). Identification and reconstruction of novel antibiotic resistance genes from metagenomes. Microbiome, 7(1), 52. DOI: 10.1186/s40168-019-0670-1
  • " : "", - !params.arg_skip_rgi ? "
  • Alcock, B. P., Raphenya, A. R., Lau, T., Tsang, K. K., Bouchard, M., Edalatmand, A., Huynh, W., Nguyen, A. V., Cheng, A. A., Liu, S., Min, S. Y., Miroshnichenko, A., Tran, H. K., Werfalli, R. E., Nasir, J. A., Oloni, M., Speicher, D. J., Florescu, A., Singh, B., Faltyn, M., … McArthur, A. G. (2020). CARD 2020: antibiotic resistome surveillance with the comprehensive antibiotic resistance database. Nucleic acids research, 48(D1), D517–D525. DOI: 10.1093/nar/gkz935
  • " : "", - !params.arg_skip_amrfinderplus ? "
  • Feldgarden, M., Brover, V., Gonzalez-Escalona, N., Frye, J. G., Haendiges, J., Haft, D. H., Hoffmann, M., Pettengill, J. B., Prasad, A. B., Tillman, G. E., Tyson, G. H., & Klimke, W. (2021). AMRFinderPlus and the Reference Gene Catalog facilitate examination of the genomic links among antimicrobial resistance, stress response, and virulence. Scientific reports, 11(1), 12728. DOI: 10.1038/s41598-021-91456-0
  • " : "", - !params.arg_skip_deeparg ? "
  • Arango-Argoty, G., Garner, E., Pruden, A., Heath, L. S., Vikesland, P., & Zhang, L. (2018). DeepARG: a deep learning approach for predicting antibiotic resistance genes from metagenomic data. Microbiome, 6(1), 23. DOI: 10.1186/s40168-018-0401-z" : "", - !params.arg_skip_abricate ? "
  • Seemann, T. (2020). ABRicate. Github https://github.com/tseemann/abricate.
  • " : "", - !params.arg_skip_argnorm ? "
  • Perovic, S. U., Ramji, V., Chong, H., Duan, Y., Maguire, F., Coelho, L. P. (2024). argNorm. DOI: .
  • " : "", - "
  • Public Health Alliance for Genomic Epidemiology (pha4ge). (2022). Parse multiple Antimicrobial Resistance Analysis Reports into a common data structure. Github. Retrieved October 5, 2022, from https://github.com/pha4ge/hAMRonization
  • " - ].join(' ').trim().replaceAll(", +\\.", ".") - - def bgc_text = [ - !params.bgc_skip_antismash ? "
  • Blin, K., Shaw, S., Kloosterman, A. M., Charlop-Powers, Z., van Wezel, G. P., Medema, M. H., & Weber, T. (2021). antiSMASH 6.0: improving cluster detection and comparison capabilities. Nucleic acids research, 49(W1), W29–W35. DOI:
  • " : "", - !params.bgc_skip_deepbgc ? "
  • Hannigan, G. D., Prihoda, D., Palicka, A., Soukup, J., Klempir, O., Rampula, L., Durcak, J., Wurst, M., Kotowski, J., Chang, D., Wang, R., Piizzi, G., Temesi, G., Hazuda, D. J., Woelk, C. H., & Bitton, D. A. (2019). A deep learning genome-mining strategy for biosynthetic gene cluster prediction. Nucleic acids research, 47(18), e110. DOI: 10.1093/nar/gkz654
  • " : "", - !params.bgc_skip_gecco ? "
  • Carroll, L. M. , Larralde, M., Fleck, J. S., Ponnudurai, R., Milanese, A., Cappio Barazzone, E. & Zeller, G. (2021). Accurate de novo identification of biosynthetic gene clusters with GECCO. bioRxiv DOI: 0.1101/2021.05.03.442509
  • " : "", - "
  • Frangenberg, J. Fellows Yates, J. A., Ibrahim, A., Perelo, L., & Beber, M. E. (2023). nf-core/funcscan: 1.0.0 - German Rollmops - 2023-02-15. https://doi.org/10.5281/zenodo.7643100
  • " - ].join(' ').replaceAll(", +\\.", ".").trim() - - def postprocessing_text = "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. https://doi.org/10.1093/bioinformatics/btw354
  • " + def preprocessing_text = '
  • Shen, W., Sipos, B., & Zhao, L. (2024). SeqKit2: A Swiss army knife for sequence and alignment processing. iMeta, e191. https://doi.org/10.1002/imt2.191
  • ' + + def annotation_text = [ + params.annotation_tool == 'prodigal' ? '
  • Hyatt, D., Chen, G. L., Locascio, P. F., Land, M. L., Larimer, F. W., & Hauser, L. J. (2010). Prodigal: prokaryotic gene recognition and translation initiation site identification. BMC bioinformatics, 11, 119. DOI: 10.1186/1471-2105-11-119
  • ' : "", + params.annotation_tool == 'pyrodigal' ? '
  • Larralde, M. (2022). Pyrodigal: Python bindings and interface to Prodigal, an efficient method for gene prediction in prokaryotes. Journal of Open Source Software, 7(72), 4296. DOI: 10.21105/joss.04296
  • ' : "", + params.annotation_tool == 'bakta' ? '
  • Schwengers, O., Jelonek, L., Dieckmann, M. A., Beyvers, S., Blom, J., & Goesmann, A. (2021). Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. Microbial Genomics, 7(11). DOI: 10.1099/mgen.0.000685
  • ' : "", + params.annotation_tool == 'prokka' ? '
  • Seemann, T. (2014). Prokka: rapid prokaryotic genome annotation. Bioinformatics (Oxford, England), 30(14), 2068–2069. DOI: 10.1093/bioinformatics/btu153
  • ' : "" + ].join(' ').trim() + + def amp_text = [ + !params.amp_skip_amplify ? '
  • Li, C., Sutherland, D., Hammond, S. A., Yang, C., Taho, F., Bergman, L., Houston, S., Warren, R. L., Wong, T., Hoang, L., Cameron, C. E., Helbing, C. C., & Birol, I. (2022). AMPlify: attentive deep learning model for discovery of novel antimicrobial peptides effective against WHO priority pathogens. BMC genomics, 23(1), 77. DOI: 10.1186/s12864-022-08310-4
  • ' : "", + !params.amp_skip_macrel ? '
  • Santos-Júnior, C. D., Pan, S., Zhao, X. M., & Coelho, L. P. (2020). Macrel: antimicrobial peptide screening in genomes and metagenomes. PeerJ, 8, e10555. DOI: 10.7717/peerj.10555
  • ' : "", + !params.amp_skip_ampir ? '
  • Fingerhut, L., Miller, D. J., Strugnell, J. M., Daly, N. L., & Cooke, I. R. (2021). ampir: an R package for fast genome-wide prediction of antimicrobial peptides. Bioinformatics (Oxford, England), 36(21), 5262–5263. DOI: 10.1093/bioinformatics/btaa653
  • ' : "", + '
  • Ibrahim, A. & Perelo, L. (2023). Darcy220606/AMPcombi. DOI: 10.5281/zenodo.7639121
  • ' + ].join(' ').trim().replaceAll(', .', ".") + + def arg_text = [ + !params.arg_skip_fargene ? '
  • Berglund, F., Österlund, T., Boulund, F., Marathe, N. P., Larsson, D., & Kristiansson, E. (2019). Identification and reconstruction of novel antibiotic resistance genes from metagenomes. Microbiome, 7(1), 52. DOI: 10.1186/s40168-019-0670-1
  • ' : "", + !params.arg_skip_rgi ? '
  • Alcock, B. P., Raphenya, A. R., Lau, T., Tsang, K. K., Bouchard, M., Edalatmand, A., Huynh, W., Nguyen, A. V., Cheng, A. A., Liu, S., Min, S. Y., Miroshnichenko, A., Tran, H. K., Werfalli, R. E., Nasir, J. A., Oloni, M., Speicher, D. J., Florescu, A., Singh, B., Faltyn, M., … McArthur, A. G. (2020). CARD 2020: antibiotic resistome surveillance with the comprehensive antibiotic resistance database. Nucleic acids research, 48(D1), D517–D525. DOI: 10.1093/nar/gkz935
  • ' : "", + !params.arg_skip_amrfinderplus ? '
  • Feldgarden, M., Brover, V., Gonzalez-Escalona, N., Frye, J. G., Haendiges, J., Haft, D. H., Hoffmann, M., Pettengill, J. B., Prasad, A. B., Tillman, G. E., Tyson, G. H., & Klimke, W. (2021). AMRFinderPlus and the Reference Gene Catalog facilitate examination of the genomic links among antimicrobial resistance, stress response, and virulence. Scientific reports, 11(1), 12728. DOI: 10.1038/s41598-021-91456-0
  • ' : "", + !params.arg_skip_deeparg ? '
  • Arango-Argoty, G., Garner, E., Pruden, A., Heath, L. S., Vikesland, P., & Zhang, L. (2018). DeepARG: a deep learning approach for predicting antibiotic resistance genes from metagenomic data. Microbiome, 6(1), 23. DOI: 10.1186/s40168-018-0401-z' : "", + !params.arg_skip_abricate ? '
  • Seemann, T. (2020). ABRicate. Github https://github.com/tseemann/abricate.
  • ' : "", + !params.arg_skip_argnorm ? '
  • Perovic, S. U., Ramji, V., Chong, H., Duan, Y., Maguire, F., Coelho, L. P. (2024). argNorm. DOI: .
  • ' : "", + '
  • Public Health Alliance for Genomic Epidemiology (pha4ge). (2022). Parse multiple Antimicrobial Resistance Analysis Reports into a common data structure. Github. Retrieved October 5, 2022, from https://github.com/pha4ge/hAMRonization
  • ' + ].join(' ').trim().replaceAll(', +.', ".") + + + def bgc_text = [ + !params.bgc_skip_antismash ? '
  • Blin, K., Shaw, S., Kloosterman, A. M., Charlop-Powers, Z., van Wezel, G. P., Medema, M. H., & Weber, T. (2021). antiSMASH 6.0: improving cluster detection and comparison capabilities. Nucleic acids research, 49(W1), W29–W35. DOI:
  • ' : "", + !params.bgc_skip_deepbgc ? '
  • Hannigan, G. D., Prihoda, D., Palicka, A., Soukup, J., Klempir, O., Rampula, L., Durcak, J., Wurst, M., Kotowski, J., Chang, D., Wang, R., Piizzi, G., Temesi, G., Hazuda, D. J., Woelk, C. H., & Bitton, D. A. (2019). A deep learning genome-mining strategy for biosynthetic gene cluster prediction. Nucleic acids research, 47(18), e110. DOI: 10.1093/nar/gkz654
  • ' : "", + !params.bgc_skip_gecco ? '
  • Carroll, L. M. , Larralde, M., Fleck, J. S., Ponnudurai, R., Milanese, A., Cappio Barazzone, E. & Zeller, G. (2021). Accurate de novo identification of biosynthetic gene clusters with GECCO. bioRxiv DOI: 0.1101/2021.05.03.442509
  • ' : "", + '
  • Frangenberg, J. Fellows Yates, J. A., Ibrahim, A., Perelo, L., & Beber, M. E. (2023). nf-core/funcscan: 1.0.0 - German Rollmops - 2023-02-15. https://doi.org/10.5281/zenodo.7643100
  • ' + ].join(' ').replaceAll(', +.', ".").trim() + + def postprocessing_text = '
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. https://doi.org/10.1093/bioinformatics/btw354
  • ' // Special as reused in multiple subworkflows, and we don't want to cause duplicates - def hmmsearch_text = ( params.run_amp_screening && params.amp_run_hmmsearch ) || ( params.run_bgc_screening && params.bgc_run_hmmsearch ) ? "
  • Eddy S. R. (2011). Accelerated Profile HMM Searches. PLoS computational biology, 7(10), e1002195. DOI: 10.1371/journal.pcbi.1002195
  • " : "" + def hmmsearch_text = (params.run_amp_screening && params.amp_run_hmmsearch) || (params.run_bgc_screening && params.bgc_run_hmmsearch) ? '
  • Eddy S. R. (2011). Accelerated Profile HMM Searches. PLoS computational biology, 7(10), e1002195. DOI: 10.1371/journal.pcbi.1002195
  • ' : "" def reference_text = [ preprocessing_text, @@ -304,7 +297,7 @@ def toolBibliographyText() { params.run_arg_screening ? arg_text : "", params.run_bgc_screening ? bgc_text : "", hmmsearch_text, - postprocessing_text, + postprocessing_text ].join(' ').trim() return reference_text @@ -322,23 +315,28 @@ def methodsDescriptionText(mqc_methods_yaml) { // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers // Removing ` ` since the manifest.doi is a string and not a proper list def temp_doi_ref = "" - String[] manifest_doi = meta.manifest_map.doi.tokenize(",") - for (String doi_ref: manifest_doi) temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " + def manifest_doi = meta.manifest_map.doi.tokenize(",") + manifest_doi.each { doi_ref -> + temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " + } meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) - } else meta["doi_text"] = "" + } + else { + meta["doi_text"] = "" + } meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " // Tool references meta["tool_citations"] = "" meta["tool_bibliography"] = "" - meta["tool_citations"] = toolCitationText().replaceAll(", \\.", ".").replaceAll("\\. \\.", ".").replaceAll(", \\.", ".") + meta["tool_citations"] = toolCitationText().replaceAll(', .', ".").replaceAll('. .', ".").replaceAll(', .', ".") meta["tool_bibliography"] = toolBibliographyText() def methods_text = mqc_methods_yaml.text - def engine = new groovy.text.SimpleTemplateEngine() + def engine = new groovy.text.SimpleTemplateEngine() def description_html = engine.createTemplate(methods_text).make(meta) return description_html.toString() diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index ac31f28f..0fcbf7b3 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -2,18 +2,13 @@ // Subworkflow with functionality that may be useful for any Nextflow pipeline // -import org.yaml.snakeyaml.Yaml -import groovy.json.JsonOutput -import nextflow.extension.FilesEx - /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUBWORKFLOW DEFINITION -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow UTILS_NEXTFLOW_PIPELINE { - take: print_version // boolean: print version dump_parameters // boolean: dump parameters @@ -26,7 +21,7 @@ workflow UTILS_NEXTFLOW_PIPELINE { // Print workflow version and exit on --version // if (print_version) { - log.info "${workflow.manifest.name} ${getWorkflowVersion()}" + log.info("${workflow.manifest.name} ${getWorkflowVersion()}") System.exit(0) } @@ -49,16 +44,16 @@ workflow UTILS_NEXTFLOW_PIPELINE { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTIONS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // // Generate version string // def getWorkflowVersion() { - String version_string = "" + def version_string = "" as String if (workflow.manifest.version) { def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' version_string += "${prefix_v}${workflow.manifest.version}" @@ -76,13 +71,13 @@ def getWorkflowVersion() { // Dump pipeline parameters to a JSON file // def dumpParametersToJSON(outdir) { - def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') - def filename = "params_${timestamp}.json" - def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") - def jsonStr = JsonOutput.toJson(params) - temp_pf.text = JsonOutput.prettyPrint(jsonStr) + def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) - FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") temp_pf.delete() } @@ -90,37 +85,40 @@ def dumpParametersToJSON(outdir) { // When running with -profile conda, warn if channels have not been set-up appropriately // def checkCondaChannels() { - Yaml parser = new Yaml() + def parser = new org.yaml.snakeyaml.Yaml() def channels = [] try { def config = parser.load("conda config --show channels".execute().text) channels = config.channels - } catch(NullPointerException | IOException e) { - log.warn "Could not verify conda channel configuration." - return + } + catch (NullPointerException e) { + log.warn("Could not verify conda channel configuration.") + return null + } + catch (IOException e) { + log.warn("Could not verify conda channel configuration.") + return null } // Check that all channels are present // This channel list is ordered by required channel priority. - def required_channels_in_order = ['conda-forge', 'bioconda', 'defaults'] + def required_channels_in_order = ['conda-forge', 'bioconda'] def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean // Check that they are in the right order - def channel_priority_violation = false - def n = required_channels_in_order.size() - for (int i = 0; i < n - 1; i++) { - channel_priority_violation |= !(channels.indexOf(required_channels_in_order[i]) < channels.indexOf(required_channels_in_order[i+1])) - } + def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } if (channels_missing | channel_priority_violation) { - log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " There is a problem with your Conda configuration!\n\n" + - " You will need to set-up the conda-forge and bioconda channels correctly.\n" + - " Please refer to https://bioconda.github.io/\n" + - " The observed channel order is \n" + - " ${channels}\n" + - " but the following channel order is required:\n" + - " ${required_channels_in_order}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + log.warn """\ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + There is a problem with your Conda configuration! + You will need to set-up the conda-forge and bioconda channels correctly. + Please refer to https://bioconda.github.io/ + The observed channel order is + ${channels} + but the following channel order is required: + ${required_channels_in_order} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + """.stripIndent(true) } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config index d0a926bf..a09572e5 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -3,7 +3,7 @@ manifest { author = """nf-core""" homePage = 'https://127.0.0.1' description = """Dummy pipeline""" - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 14558c39..5cb7bafe 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -2,17 +2,13 @@ // Subworkflow with utility functions specific to the nf-core pipeline template // -import org.yaml.snakeyaml.Yaml -import nextflow.extension.FilesEx - /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUBWORKFLOW DEFINITION -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow UTILS_NFCORE_PIPELINE { - take: nextflow_cli_args @@ -25,23 +21,20 @@ workflow UTILS_NFCORE_PIPELINE { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTIONS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // // Warn if a -profile or Nextflow config has not been provided to run the pipeline // def checkConfigProvided() { - valid_config = true + def valid_config = true as Boolean if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { - log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + - "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + - " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + - " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + - " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + - "Please refer to the quick start section and usage docs for the pipeline.\n " + log.warn( + "[${workflow.manifest.name}] You are attempting to run the pipeline without any custom configuration!\n\n" + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + "Please refer to the quick start section and usage docs for the pipeline.\n " + ) valid_config = false } return valid_config @@ -52,12 +45,14 @@ def checkConfigProvided() { // def checkProfileProvided(nextflow_cli_args) { if (workflow.profile.endsWith(',')) { - error "The `-profile` option cannot end with a trailing comma, please remove it and re-run the pipeline!\n" + - "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + error( + "The `-profile` option cannot end with a trailing comma, please remove it and re-run the pipeline!\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) } if (nextflow_cli_args[0]) { - log.warn "nf-core pipelines do not accept positional arguments. The positional argument `${nextflow_cli_args[0]}` has been detected.\n" + - "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + log.warn( + "nf-core pipelines do not accept positional arguments. The positional argument `${nextflow_cli_args[0]}` has been detected.\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) } } @@ -66,25 +61,21 @@ def checkProfileProvided(nextflow_cli_args) { // def workflowCitation() { def temp_doi_ref = "" - String[] manifest_doi = workflow.manifest.doi.tokenize(",") - // Using a loop to handle multiple DOIs + def manifest_doi = workflow.manifest.doi.tokenize(",") + // Handling multiple DOIs // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers // Removing ` ` since the manifest.doi is a string and not a proper list - for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" - return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + - "* The pipeline\n" + - temp_doi_ref + "\n" + - "* The nf-core framework\n" + - " https://doi.org/10.1038/s41587-020-0439-x\n\n" + - "* Software dependencies\n" + - " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" + manifest_doi.each { doi_ref -> + temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" + } + return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" } // // Generate workflow version string // def getWorkflowVersion() { - String version_string = "" + def version_string = "" as String if (workflow.manifest.version) { def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' version_string += "${prefix_v}${workflow.manifest.version}" @@ -102,8 +93,8 @@ def getWorkflowVersion() { // Get software versions for pipeline // def processVersionsFromYAML(yaml_file) { - Yaml yaml = new Yaml() - versions = yaml.load(yaml_file).collectEntries { k, v -> [ k.tokenize(':')[-1], v ] } + def yaml = new org.yaml.snakeyaml.Yaml() + def versions = yaml.load(yaml_file).collectEntries { k, v -> [k.tokenize(':')[-1], v] } return yaml.dumpAsMap(versions).trim() } @@ -113,8 +104,8 @@ def processVersionsFromYAML(yaml_file) { def workflowVersionToYAML() { return """ Workflow: - $workflow.manifest.name: ${getWorkflowVersion()} - Nextflow: $workflow.nextflow.version + ${workflow.manifest.name}: ${getWorkflowVersion()} + Nextflow: ${workflow.nextflow.version} """.stripIndent().trim() } @@ -122,11 +113,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions - .unique() - .map { processVersionsFromYAML(it) } - .unique() - .mix(Channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) } // @@ -134,25 +121,31 @@ def softwareVersionsToYAML(ch_versions) { // def paramsSummaryMultiqc(summary_params) { def summary_section = '' - for (group in summary_params.keySet()) { - def group_params = summary_params.get(group) // This gets the parameters of that particular group - if (group_params) { - summary_section += "

    $group

    \n" - summary_section += "
    \n" - for (param in group_params.keySet()) { - summary_section += "
    $param
    ${group_params.get(param) ?: 'N/A'}
    \n" + summary_params + .keySet() + .each { group -> + def group_params = summary_params.get(group) + // This gets the parameters of that particular group + if (group_params) { + summary_section += "

    ${group}

    \n" + summary_section += "
    \n" + group_params + .keySet() + .sort() + .each { param -> + summary_section += "
    ${param}
    ${group_params.get(param) ?: 'N/A'}
    \n" + } + summary_section += "
    \n" } - summary_section += "
    \n" } - } - String yaml_file_text = "id: '${workflow.manifest.name.replace('/','-')}-summary'\n" - yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" - yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" - yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" - yaml_file_text += "plot_type: 'html'\n" - yaml_file_text += "data: |\n" - yaml_file_text += "${summary_section}" + def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" + yaml_file_text += "plot_type: 'html'\n" + yaml_file_text += "data: |\n" + yaml_file_text += "${summary_section}" return yaml_file_text } @@ -161,7 +154,7 @@ def paramsSummaryMultiqc(summary_params) { // nf-core logo // def nfCoreLogo(monochrome_logs=true) { - Map colors = logColours(monochrome_logs) + def colors = logColours(monochrome_logs) as Map String.format( """\n ${dashedLine(monochrome_logs)} @@ -180,7 +173,7 @@ def nfCoreLogo(monochrome_logs=true) { // Return dashed line // def dashedLine(monochrome_logs=true) { - Map colors = logColours(monochrome_logs) + def colors = logColours(monochrome_logs) as Map return "-${colors.dim}----------------------------------------------------${colors.reset}-" } @@ -188,7 +181,7 @@ def dashedLine(monochrome_logs=true) { // ANSII colours used for terminal logging // def logColours(monochrome_logs=true) { - Map colorcodes = [:] + def colorcodes = [:] as Map // Reset / Meta colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" @@ -200,54 +193,54 @@ def logColours(monochrome_logs=true) { colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" // Regular Colors - colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" - colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" - colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" - colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" - colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" - colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" - colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" - colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" + colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" + colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" + colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" + colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" + colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" + colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" + colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" + colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" // Bold - colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" - colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" - colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" - colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" - colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" - colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" - colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" - colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" + colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" + colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" + colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" + colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" + colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" + colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" + colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" + colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" // Underline - colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" - colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" - colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" - colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" - colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" - colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" - colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" - colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" + colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" + colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" + colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" + colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" + colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" + colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" + colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" + colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" // High Intensity - colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" - colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" - colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" - colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" - colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" - colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" - colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" - colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" + colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" + colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" + colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" + colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" + colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" + colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" + colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" + colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" // Bold High Intensity - colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" - colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" - colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" - colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" - colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" - colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" - colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" - colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" + colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" + colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" + colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" + colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" + colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" + colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" + colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" + colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" return colorcodes } @@ -262,14 +255,15 @@ def attachMultiqcReport(multiqc_report) { mqc_report = multiqc_report.getVal() if (mqc_report.getClass() == ArrayList && mqc_report.size() >= 1) { if (mqc_report.size() > 1) { - log.warn "[$workflow.manifest.name] Found multiple reports from process 'MULTIQC', will use only one" + log.warn("[${workflow.manifest.name}] Found multiple reports from process 'MULTIQC', will use only one") } mqc_report = mqc_report[0] } } - } catch (all) { + } + catch (Exception all) { if (multiqc_report) { - log.warn "[$workflow.manifest.name] Could not attach MultiQC report to summary email" + log.warn("[${workflow.manifest.name}] Could not attach MultiQC report to summary email") } } return mqc_report @@ -281,26 +275,35 @@ def attachMultiqcReport(multiqc_report) { def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs=true, multiqc_report=null) { // Set up the e-mail variables - def subject = "[$workflow.manifest.name] Successful: $workflow.runName" + def subject = "[${workflow.manifest.name}] Successful: ${workflow.runName}" if (!workflow.success) { - subject = "[$workflow.manifest.name] FAILED: $workflow.runName" + subject = "[${workflow.manifest.name}] FAILED: ${workflow.runName}" } def summary = [:] - for (group in summary_params.keySet()) { - summary << summary_params[group] - } + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } def misc_fields = [:] misc_fields['Date Started'] = workflow.start misc_fields['Date Completed'] = workflow.complete misc_fields['Pipeline script file path'] = workflow.scriptFile misc_fields['Pipeline script hash ID'] = workflow.scriptId - if (workflow.repository) misc_fields['Pipeline repository Git URL'] = workflow.repository - if (workflow.commitId) misc_fields['Pipeline repository Git Commit'] = workflow.commitId - if (workflow.revision) misc_fields['Pipeline Git branch/tag'] = workflow.revision - misc_fields['Nextflow Version'] = workflow.nextflow.version - misc_fields['Nextflow Build'] = workflow.nextflow.build + if (workflow.repository) { + misc_fields['Pipeline repository Git URL'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['Pipeline repository Git Commit'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['Pipeline Git branch/tag'] = workflow.revision + } + misc_fields['Nextflow Version'] = workflow.nextflow.version + misc_fields['Nextflow Build'] = workflow.nextflow.build misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp def email_fields = [:] @@ -338,39 +341,41 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi // Render the sendmail template def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as nextflow.util.MemoryUnit - def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes() ] + def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") def sendmail_template = engine.createTemplate(sf).make(smail_fields) def sendmail_html = sendmail_template.toString() // Send the HTML e-mail - Map colors = logColours(monochrome_logs) + def colors = logColours(monochrome_logs) as Map if (email_address) { try { - if (plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') } + if (plaintext_email) { +new org.codehaus.groovy.GroovyException('Send plaintext e-mail, not HTML') } // Try to send HTML e-mail using sendmail def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html") sendmail_tf.withWriter { w -> w << sendmail_html } - [ 'sendmail', '-t' ].execute() << sendmail_html - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (sendmail)-" - } catch (all) { + ['sendmail', '-t'].execute() << sendmail_html + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (sendmail)-") + } + catch (Exception all) { // Catch failures and try with plaintext - def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ] + def mail_cmd = ['mail', '-s', subject, '--content-type=text/html', email_address] mail_cmd.execute() << email_html - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (mail)-" + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (mail)-") } } // Write summary e-mail HTML to a file def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html") output_hf.withWriter { w -> w << email_html } - FilesEx.copyTo(output_hf.toPath(), "${outdir}/pipeline_info/pipeline_report.html"); + nextflow.extension.FilesEx.copyTo(output_hf.toPath(), "${outdir}/pipeline_info/pipeline_report.html") output_hf.delete() // Write summary e-mail TXT to a file def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt") output_tf.withWriter { w -> w << email_txt } - FilesEx.copyTo(output_tf.toPath(), "${outdir}/pipeline_info/pipeline_report.txt"); + nextflow.extension.FilesEx.copyTo(output_tf.toPath(), "${outdir}/pipeline_info/pipeline_report.txt") output_tf.delete() } @@ -378,15 +383,17 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi // Print pipeline summary on completion // def completionSummary(monochrome_logs=true) { - Map colors = logColours(monochrome_logs) + def colors = logColours(monochrome_logs) as Map if (workflow.success) { if (workflow.stats.ignoredCount == 0) { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Pipeline completed successfully${colors.reset}-" - } else { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.yellow} Pipeline completed successfully, but with errored process(es) ${colors.reset}-" + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Pipeline completed successfully${colors.reset}-") + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.yellow} Pipeline completed successfully, but with errored process(es) ${colors.reset}-") } - } else { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Pipeline completed with errors${colors.reset}-" + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.red} Pipeline completed with errors${colors.reset}-") } } @@ -395,21 +402,30 @@ def completionSummary(monochrome_logs=true) { // def imNotification(summary_params, hook_url) { def summary = [:] - for (group in summary_params.keySet()) { - summary << summary_params[group] - } + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } def misc_fields = [:] - misc_fields['start'] = workflow.start - misc_fields['complete'] = workflow.complete - misc_fields['scriptfile'] = workflow.scriptFile - misc_fields['scriptid'] = workflow.scriptId - if (workflow.repository) misc_fields['repository'] = workflow.repository - if (workflow.commitId) misc_fields['commitid'] = workflow.commitId - if (workflow.revision) misc_fields['revision'] = workflow.revision - misc_fields['nxf_version'] = workflow.nextflow.version - misc_fields['nxf_build'] = workflow.nextflow.build - misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp + misc_fields['start'] = workflow.start + misc_fields['complete'] = workflow.complete + misc_fields['scriptfile'] = workflow.scriptFile + misc_fields['scriptid'] = workflow.scriptId + if (workflow.repository) { + misc_fields['repository'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['commitid'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['revision'] = workflow.revision + } + misc_fields['nxf_version'] = workflow.nextflow.version + misc_fields['nxf_build'] = workflow.nextflow.build + misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp def msg_fields = [:] msg_fields['version'] = getWorkflowVersion() @@ -434,13 +450,13 @@ def imNotification(summary_params, hook_url) { def json_message = json_template.toString() // POST - def post = new URL(hook_url).openConnection(); + def post = new URL(hook_url).openConnection() post.setRequestMethod("POST") post.setDoOutput(true) post.setRequestProperty("Content-Type", "application/json") - post.getOutputStream().write(json_message.getBytes("UTF-8")); - def postRC = post.getResponseCode(); - if (! postRC.equals(200)) { - log.warn(post.getErrorStream().getText()); + post.getOutputStream().write(json_message.getBytes("UTF-8")) + def postRC = post.getResponseCode() + if (!postRC.equals(200)) { + log.warn(post.getErrorStream().getText()) } } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf new file mode 100644 index 00000000..4994303e --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -0,0 +1,46 @@ +// +// Subworkflow that uses the nf-schema plugin to validate parameters and render the parameter summary +// + +include { paramsSummaryLog } from 'plugin/nf-schema' +include { validateParameters } from 'plugin/nf-schema' + +workflow UTILS_NFSCHEMA_PLUGIN { + + take: + input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow + validate_params // boolean: validate the parameters + parameters_schema // string: path to the parameters JSON schema. + // this has to be the same as the schema given to `validation.parametersSchema` + // when this input is empty it will automatically use the configured schema or + // "${projectDir}/nextflow_schema.json" as default. This input should not be empty + // for meta pipelines + + main: + + // + // Print parameter summary to stdout. This will display the parameters + // that differ from the default given in the JSON schema + // + if(parameters_schema) { + log.info paramsSummaryLog(input_workflow, parameters_schema:parameters_schema) + } else { + log.info paramsSummaryLog(input_workflow) + } + + // + // Validate the parameters using nextflow_schema.json or the schema + // given via the validation.parametersSchema configuration option + // + if(validate_params) { + if(parameters_schema) { + validateParameters(parameters_schema:parameters_schema) + } else { + validateParameters() + } + } + + emit: + dummy_emit = true +} + diff --git a/subworkflows/nf-core/utils_nfschema_plugin/meta.yml b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml new file mode 100644 index 00000000..f7d9f028 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "utils_nfschema_plugin" +description: Run nf-schema to validate parameters and create a summary of changed parameters +keywords: + - validation + - JSON schema + - plugin + - parameters + - summary +components: [] +input: + - input_workflow: + type: object + description: | + The workflow object of the used pipeline. + This object contains meta data used to create the params summary log + - validate_params: + type: boolean + description: Validate the parameters and error if invalid. + - parameters_schema: + type: string + description: | + Path to the parameters JSON schema. + This has to be the same as the schema given to the `validation.parametersSchema` config + option. When this input is empty it will automatically use the configured schema or + "${projectDir}/nextflow_schema.json" as default. The schema should not be given in this way + for meta pipelines. +output: + - dummy_emit: + type: boolean + description: Dummy emit to make nf-core subworkflows lint happy +authors: + - "@nvnieuwk" +maintainers: + - "@nvnieuwk" diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test new file mode 100644 index 00000000..842dc432 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -0,0 +1,117 @@ +nextflow_workflow { + + name "Test Subworkflow UTILS_NFSCHEMA_PLUGIN" + script "../main.nf" + workflow "UTILS_NFSCHEMA_PLUGIN" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/utils_nfschema_plugin" + tag "plugin/nf-schema" + + config "./nextflow.config" + + test("Should run nothing") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params") { + + when { + + params { + test_data = '' + outdir = 1 + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } + + test("Should run nothing - custom schema") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params - custom schema") { + + when { + + params { + test_data = '' + outdir = 1 + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config new file mode 100644 index 00000000..0907ac58 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -0,0 +1,8 @@ +plugins { + id "nf-schema@2.1.0" +} + +validation { + parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + monochromeLogs = true +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json similarity index 95% rename from subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json rename to subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json index 7626c1c9..331e0d2f 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json", "title": ". pipeline parameters", "description": "", "type": "object", - "definitions": { + "$defs": { "input_output_options": { "title": "Input/output options", "type": "object", @@ -87,10 +87,10 @@ }, "allOf": [ { - "$ref": "#/definitions/input_output_options" + "$ref": "#/$defs/input_output_options" }, { - "$ref": "#/definitions/generic_options" + "$ref": "#/$defs/generic_options" } ] } diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf deleted file mode 100644 index 2585b65d..00000000 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf +++ /dev/null @@ -1,62 +0,0 @@ -// -// Subworkflow that uses the nf-validation plugin to render help text and parameter summary -// - -/* -======================================================================================== - IMPORT NF-VALIDATION PLUGIN -======================================================================================== -*/ - -include { paramsHelp } from 'plugin/nf-validation' -include { paramsSummaryLog } from 'plugin/nf-validation' -include { validateParameters } from 'plugin/nf-validation' - -/* -======================================================================================== - SUBWORKFLOW DEFINITION -======================================================================================== -*/ - -workflow UTILS_NFVALIDATION_PLUGIN { - - take: - print_help // boolean: print help - workflow_command // string: default commmand used to run pipeline - pre_help_text // string: string to be printed before help text and summary log - post_help_text // string: string to be printed after help text and summary log - validate_params // boolean: validate parameters - schema_filename // path: JSON schema file, null to use default value - - main: - - log.debug "Using schema file: ${schema_filename}" - - // Default values for strings - pre_help_text = pre_help_text ?: '' - post_help_text = post_help_text ?: '' - workflow_command = workflow_command ?: '' - - // - // Print help message if needed - // - if (print_help) { - log.info pre_help_text + paramsHelp(workflow_command, parameters_schema: schema_filename) + post_help_text - System.exit(0) - } - - // - // Print parameter summary to stdout - // - log.info pre_help_text + paramsSummaryLog(workflow, parameters_schema: schema_filename) + post_help_text - - // - // Validate parameters relative to the parameter JSON schema - // - if (validate_params){ - validateParameters(parameters_schema: schema_filename) - } - - emit: - dummy_emit = true -} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml b/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml deleted file mode 100644 index 3d4a6b04..00000000 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -name: "UTILS_NFVALIDATION_PLUGIN" -description: Use nf-validation to initiate and validate a pipeline -keywords: - - utility - - pipeline - - initialise - - validation -components: [] -input: - - print_help: - type: boolean - description: | - Print help message and exit - - workflow_command: - type: string - description: | - The command to run the workflow e.g. "nextflow run main.nf" - - pre_help_text: - type: string - description: | - Text to print before the help message - - post_help_text: - type: string - description: | - Text to print after the help message - - validate_params: - type: boolean - description: | - Validate the parameters and error if invalid. - - schema_filename: - type: string - description: | - The filename of the schema to validate against. -output: - - dummy_emit: - type: boolean - description: | - Dummy emit to make nf-core subworkflows lint happy -authors: - - "@adamrtalbot" -maintainers: - - "@adamrtalbot" - - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test deleted file mode 100644 index 5784a33f..00000000 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test +++ /dev/null @@ -1,200 +0,0 @@ -nextflow_workflow { - - name "Test Workflow UTILS_NFVALIDATION_PLUGIN" - script "../main.nf" - workflow "UTILS_NFVALIDATION_PLUGIN" - tag "subworkflows" - tag "subworkflows_nfcore" - tag "plugin/nf-validation" - tag "'plugin/nf-validation'" - tag "utils_nfvalidation_plugin" - tag "subworkflows/utils_nfvalidation_plugin" - - test("Should run nothing") { - - when { - - params { - monochrome_logs = true - test_data = '' - } - - workflow { - """ - help = false - workflow_command = null - pre_help_text = null - post_help_text = null - validate_params = false - schema_filename = "$moduleTestDir/nextflow_schema.json" - - input[0] = help - input[1] = workflow_command - input[2] = pre_help_text - input[3] = post_help_text - input[4] = validate_params - input[5] = schema_filename - """ - } - } - - then { - assertAll( - { assert workflow.success } - ) - } - } - - test("Should run help") { - - - when { - - params { - monochrome_logs = true - test_data = '' - } - workflow { - """ - help = true - workflow_command = null - pre_help_text = null - post_help_text = null - validate_params = false - schema_filename = "$moduleTestDir/nextflow_schema.json" - - input[0] = help - input[1] = workflow_command - input[2] = pre_help_text - input[3] = post_help_text - input[4] = validate_params - input[5] = schema_filename - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.exitStatus == 0 }, - { assert workflow.stdout.any { it.contains('Input/output options') } }, - { assert workflow.stdout.any { it.contains('--outdir') } } - ) - } - } - - test("Should run help with command") { - - when { - - params { - monochrome_logs = true - test_data = '' - } - workflow { - """ - help = true - workflow_command = "nextflow run noorg/doesntexist" - pre_help_text = null - post_help_text = null - validate_params = false - schema_filename = "$moduleTestDir/nextflow_schema.json" - - input[0] = help - input[1] = workflow_command - input[2] = pre_help_text - input[3] = post_help_text - input[4] = validate_params - input[5] = schema_filename - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.exitStatus == 0 }, - { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, - { assert workflow.stdout.any { it.contains('Input/output options') } }, - { assert workflow.stdout.any { it.contains('--outdir') } } - ) - } - } - - test("Should run help with extra text") { - - - when { - - params { - monochrome_logs = true - test_data = '' - } - workflow { - """ - help = true - workflow_command = "nextflow run noorg/doesntexist" - pre_help_text = "pre-help-text" - post_help_text = "post-help-text" - validate_params = false - schema_filename = "$moduleTestDir/nextflow_schema.json" - - input[0] = help - input[1] = workflow_command - input[2] = pre_help_text - input[3] = post_help_text - input[4] = validate_params - input[5] = schema_filename - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.exitStatus == 0 }, - { assert workflow.stdout.any { it.contains('pre-help-text') } }, - { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, - { assert workflow.stdout.any { it.contains('Input/output options') } }, - { assert workflow.stdout.any { it.contains('--outdir') } }, - { assert workflow.stdout.any { it.contains('post-help-text') } } - ) - } - } - - test("Should validate params") { - - when { - - params { - monochrome_logs = true - test_data = '' - outdir = 1 - } - workflow { - """ - help = false - workflow_command = null - pre_help_text = null - post_help_text = null - validate_params = true - schema_filename = "$moduleTestDir/nextflow_schema.json" - - input[0] = help - input[1] = workflow_command - input[2] = pre_help_text - input[3] = post_help_text - input[4] = validate_params - input[5] = schema_filename - """ - } - } - - then { - assertAll( - { assert workflow.failed }, - { assert workflow.stdout.any { it.contains('ERROR ~ ERROR: Validation of pipeline parameters failed!') } } - ) - } - } -} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml deleted file mode 100644 index 60b1cfff..00000000 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/utils_nfvalidation_plugin: - - subworkflows/nf-core/utils_nfvalidation_plugin/** diff --git a/tests/test.nf.test b/tests/test.nf.test index c3db6a93..28e088b5 100644 --- a/tests/test.nf.test +++ b/tests/test.nf.test @@ -54,6 +54,7 @@ nextflow_pipeline { // AMPcombi { assert path("$outputDir/reports/ampcombi2/Ampcombi_summary.tsv").text.contains("NODE_515831_length_303_cov_1.532258_1") }, + { assert path("$outputDir/reports/ampcombi2/Ampcombi_parse_tables.log").text.contains("amp_DRAMP_database is found and will be used") }, { assert snapshot( path("$outputDir/reports/ampcombi2/Ampcombi_cluster.log"), path("$outputDir/reports/ampcombi2/Ampcombi_complete.log"), @@ -71,6 +72,8 @@ nextflow_pipeline { { assert file("$outputDir/arg/deeparg/sample_2/sample_2.align.daa").name }, { assert path("$outputDir/arg/deeparg/sample_1/sample_1.mapping.potential.ARG").text.contains("#ARG") }, { assert path("$outputDir/arg/deeparg/sample_2/sample_2.mapping.potential.ARG").text.contains("#ARG") }, + { assert path("$outputDir/arg/deeparg/sample_1/sample_1.align.daa.tsv").text.contains("rifampin_monooxygenase|rifamycin|rifampin_monooxygenase") }, + { assert path("$outputDir/arg/deeparg/sample_2/sample_2.align.daa.tsv").text.contains("rifampin_monooxygenase|rifamycin|rifampin_monooxygenase") }, // ABRicate { assert snapshot( diff --git a/tests/test.nf.test.snap b/tests/test.nf.test.snap index b8784d4e..c09747ac 100644 --- a/tests/test.nf.test.snap +++ b/tests/test.nf.test.snap @@ -53,9 +53,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T15:33:45.575881231" + "timestamp": "2024-12-18T12:41:33.325286058" }, "ampir": { "content": [ @@ -66,21 +66,21 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T15:33:45.512274661" + "timestamp": "2024-12-18T12:41:33.055416682" }, "ampcombi_logfiles": { "content": [ "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", - "Ampcombi_parse_tables.log:md5,cb5dc95f6b64edc2f0eb56bb541660d5" + "Ampcombi_parse_tables.log:md5,ff27d0c3657ce99d2c29a136f598e4f8" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T15:33:45.560675596" + "timestamp": "2024-12-18T12:41:33.230701016" }, "amplify": { "content": [ @@ -89,28 +89,28 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T15:33:45.522977776" + "timestamp": "2024-12-18T12:41:33.1312123" }, "macrel": { "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T15:33:45.525854315" + "timestamp": "2024-12-18T10:35:54.749106433" }, "amrfinderplus": { "content": [ diff --git a/tests/test_bakta.nf.test.snap b/tests/test_bakta.nf.test.snap index ff73f307..2a81f001 100644 --- a/tests/test_bakta.nf.test.snap +++ b/tests/test_bakta.nf.test.snap @@ -74,13 +74,13 @@ "content": [ "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", - "Ampcombi_parse_tables.log:md5,cb5dc95f6b64edc2f0eb56bb541660d5" + "Ampcombi_parse_tables.log:md5,ff27d0c3657ce99d2c29a136f598e4f8" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.0", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T16:51:37.230099612" + "timestamp": "2024-12-18T11:04:21.067236601" }, "amplify": { "content": [ @@ -97,20 +97,20 @@ "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.0", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-23T16:51:37.208256804" + "timestamp": "2024-12-18T11:04:20.948791843" }, "amrfinderplus": { "content": [ diff --git a/tests/test_preannotated.nf.test.snap b/tests/test_preannotated.nf.test.snap index e53c7215..7f957b19 100644 --- a/tests/test_preannotated.nf.test.snap +++ b/tests/test_preannotated.nf.test.snap @@ -82,27 +82,27 @@ }, "macrel": { "content": [ - "sample_1.macrel.smorfs.faa.gz:md5,9cddad1e4b6dbcb76888f1a87db388ec", - "sample_2.macrel.smorfs.faa.gz:md5,e055dd2a9e44f3dcaa8af7198600349c", - "sample_3.macrel.smorfs.faa.gz:md5,9cddad1e4b6dbcb76888f1a87db388ec", - "sample_1.macrel.all_orfs.faa.gz:md5,c276fb1ec494ff53ded1e6fc118e25b9", - "sample_2.macrel.all_orfs.faa.gz:md5,e75e434a30922d80169d0666fd07e446", - "sample_3.macrel.all_orfs.faa.gz:md5,c276fb1ec494ff53ded1e6fc118e25b9", - "sample_1.macrel.prediction.gz:md5,0277725512f7d2954a99692bb65f1475", - "sample_2.macrel.prediction.gz:md5,06f7ce99cfe6f364d38743aae094402a", - "sample_3.macrel.prediction.gz:md5,0277725512f7d2954a99692bb65f1475", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.smorfs.faa.gz:md5,a4f853b560c6a8c215e0d243c24ec056", + "sample_2.macrel.smorfs.faa.gz:md5,83ae7b9808d7183d87b41c10253c9c9e", + "sample_3.macrel.smorfs.faa.gz:md5,a4f853b560c6a8c215e0d243c24ec056", + "sample_1.macrel.all_orfs.faa.gz:md5,d1ae1cadc3770994b2ed4982aadd5406", + "sample_2.macrel.all_orfs.faa.gz:md5,d9612a4275a912cabdae13b1ccc1857e", + "sample_3.macrel.all_orfs.faa.gz:md5,d1ae1cadc3770994b2ed4982aadd5406", + "sample_1.macrel.prediction.gz:md5,62146cf9f759c9c6c2c2f9e5ba816119", + "sample_2.macrel.prediction.gz:md5,1b479d31bb7dbf636a2028ddef72f5cc", + "sample_3.macrel.prediction.gz:md5,62146cf9f759c9c6c2c2f9e5ba816119", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_3.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-27T08:11:24.514344973" + "timestamp": "2024-12-18T11:50:30.926088397" }, "hamronization": { "content": [ diff --git a/tests/test_prokka.nf.test.snap b/tests/test_prokka.nf.test.snap index 07cfeefd..1ac682b3 100644 --- a/tests/test_prokka.nf.test.snap +++ b/tests/test_prokka.nf.test.snap @@ -74,13 +74,13 @@ "content": [ "Ampcombi_cluster.log:md5,4c78f5f134edf566f39e04e3ab7d8558", "Ampcombi_complete.log:md5,3dabfea4303bf94bd4f5d78c5b8c83c1", - "Ampcombi_parse_tables.log:md5,1e2b5abad7d17e03428066f345b91117" + "Ampcombi_parse_tables.log:md5,a00a87b772b12c0d712f3e524cbe3bb2" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-24T12:53:09.914363724" + "timestamp": "2024-12-18T11:10:28.28666354" }, "amplify": { "content": [ @@ -97,20 +97,20 @@ "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-24T12:53:09.892460736" + "timestamp": "2024-12-18T11:10:28.238554892" }, "amrfinderplus": { "content": [ diff --git a/tests/test_taxonomy_bakta.nf.test.snap b/tests/test_taxonomy_bakta.nf.test.snap index 5606db1e..c406c942 100644 --- a/tests/test_taxonomy_bakta.nf.test.snap +++ b/tests/test_taxonomy_bakta.nf.test.snap @@ -93,12 +93,12 @@ "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], diff --git a/tests/test_taxonomy_prokka.nf.test.snap b/tests/test_taxonomy_prokka.nf.test.snap index 8e2e581a..c00c3286 100644 --- a/tests/test_taxonomy_prokka.nf.test.snap +++ b/tests/test_taxonomy_prokka.nf.test.snap @@ -93,12 +93,12 @@ "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], diff --git a/tests/test_taxonomy_pyrodigal.nf.test.snap b/tests/test_taxonomy_pyrodigal.nf.test.snap index 668aab92..9cde9d2a 100644 --- a/tests/test_taxonomy_pyrodigal.nf.test.snap +++ b/tests/test_taxonomy_pyrodigal.nf.test.snap @@ -93,19 +93,19 @@ "content": [ "sample_1.macrel.smorfs.faa.gz:md5,1b5e2434860e635e95324d1804a3be7b", "sample_2.macrel.smorfs.faa.gz:md5,38108b5cdfdc2196afe67418b9b04682", - "sample_1.macrel.all_orfs.faa.gz:md5,86f6b3b590d1b22d9c5aa164f8a14080", - "sample_2.macrel.all_orfs.faa.gz:md5,fdb384925af50ecade05dccaff68afd8", - "sample_1.macrel.prediction.gz:md5,0c4b16e0838be56e012b99169863a168", - "sample_2.macrel.prediction.gz:md5,440deffd6b6d9986ce098e44c66db9ae", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", - "README.md:md5,fa3706dfc95d0538a52c4d0d824be5fb", + "sample_1.macrel.all_orfs.faa.gz:md5,844bb10e2f84e1a2b2db56eb36391dcf", + "sample_2.macrel.all_orfs.faa.gz:md5,9c0b8b1c3b03d7b20aee0b57103861ab", + "sample_1.macrel.prediction.gz:md5,9553e1dae8a5b912da8d74fa3f1cd9eb", + "sample_2.macrel.prediction.gz:md5,ae155e454eb7abd7c48c06aad9261603", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", + "README.md:md5,cf088d9256ff7b7730699f17b64b4028", "sample_1.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "sample_2.macrel_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.10.2" }, - "timestamp": "2024-07-24T16:24:30.025771" + "timestamp": "2024-12-18T11:35:52.952483937" } } \ No newline at end of file diff --git a/workflows/funcscan.nf b/workflows/funcscan.nf index 07e0a3d8..e0db12c0 100644 --- a/workflows/funcscan.nf +++ b/workflows/funcscan.nf @@ -4,21 +4,11 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_funcscan_pipeline' -include { paramsSummaryMap; validateParameters; paramsHelp; paramsSummaryLog; fromSamplesheet } from 'plugin/nf-validation' - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - CONFIG FILES -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -ch_multiqc_config = Channel.fromPath( "$projectDir/assets/multiqc_config.yml", checkIfExists: true ) -ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config, checkIfExists: true ) : Channel.empty() -ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty() -ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) +include { MULTIQC } from '../modules/nf-core/multiqc/main' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_funcscan_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -29,11 +19,11 @@ ch_multiqc_custom_methods_description = params.multiqc_methods_description ? fil // // SUBWORKFLOW: Consisting of a mix of local and nf-core/modules // -include { ANNOTATION } from '../subworkflows/local/annotation' -include { AMP } from '../subworkflows/local/amp' -include { ARG } from '../subworkflows/local/arg' -include { BGC } from '../subworkflows/local/bgc' -include { TAXA_CLASS } from '../subworkflows/local/taxa_class' +include { ANNOTATION } from '../subworkflows/local/annotation' +include { AMP } from '../subworkflows/local/amp' +include { ARG } from '../subworkflows/local/arg' +include { BGC } from '../subworkflows/local/bgc' +include { TAXA_CLASS } from '../subworkflows/local/taxa_class' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -44,9 +34,8 @@ include { TAXA_CLASS } from '../subworkflows/local/taxa_class' // // MODULE: Installed directly from nf-core/modules // -include { MULTIQC } from '../modules/nf-core/multiqc/main' -include { GUNZIP as GUNZIP_INPUT_PREP } from '../modules/nf-core/gunzip/main' -include { SEQKIT_SEQ } from '../modules/nf-core/seqkit/seq/main' +include { GUNZIP as GUNZIP_INPUT_PREP } from '../modules/nf-core/gunzip/main' +include { SEQKIT_SEQ } from '../modules/nf-core/seqkit/seq/main' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -55,7 +44,6 @@ include { SEQKIT_SEQ } from '../modules/nf-core/seqkit/seq/m */ workflow FUNCSCAN { - take: ch_samplesheet // channel: samplesheet read in from --input @@ -64,57 +52,67 @@ workflow FUNCSCAN { ch_versions = Channel.empty() ch_multiqc_files = Channel.empty() - ch_input = Channel.fromSamplesheet("input") + /* + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CONFIG FILES + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + + ch_multiqc_config = Channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty() + ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) + // Some tools require uncompressed input - ch_input_prep = ch_input - .map{ meta, fasta, faa, gbk -> [meta + [category: 'all'], [fasta, faa, gbk]] } - .transpose() - .branch { - compressed: it[1].toString().endsWith('.gz') - uncompressed: it[1] - } + ch_input_prep = ch_samplesheet + .map { meta, fasta, faa, gbk -> [meta + [category: 'all'], [fasta, faa, gbk]] } + .transpose() + .branch { + compressed: it[1].toString().endsWith('.gz') + uncompressed: it[1] + } - GUNZIP_INPUT_PREP ( ch_input_prep.compressed ) - ch_versions = ch_versions.mix( GUNZIP_INPUT_PREP.out.versions ) + GUNZIP_INPUT_PREP(ch_input_prep.compressed) + ch_versions = ch_versions.mix(GUNZIP_INPUT_PREP.out.versions) // Merge all the already uncompressed and newly compressed FASTAs here into // a single input channel for downstream ch_intermediate_input = GUNZIP_INPUT_PREP.out.gunzip - .mix( ch_input_prep.uncompressed ) - .groupTuple() - .map{ - meta, files -> - def fasta_found = files.find{it.toString().tokenize('.').last().matches('fasta|fas|fna|fa')} - def faa_found = files.find{it.toString().endsWith('.faa')} - def gbk_found = files.find{it.toString().tokenize('.').last().matches('gbk|gbff')} - def fasta = fasta_found != null ? fasta_found : [] - def faa = faa_found != null ? faa_found : [] - def gbk = gbk_found != null ? gbk_found : [] - - [meta, fasta, faa, gbk] - } - .branch { - meta, fasta, faa, gbk -> - preannotated: gbk != [] - fastas: true - } + .mix(ch_input_prep.uncompressed) + .groupTuple() + .map { meta, files -> + def fasta_found = files.find { it.toString().tokenize('.').last().matches('fasta|fas|fna|fa') } + def faa_found = files.find { it.toString().endsWith('.faa') } + def gbk_found = files.find { it.toString().tokenize('.').last().matches('gbk|gbff') } + def fasta = fasta_found != null ? fasta_found : [] + def faa = faa_found != null ? faa_found : [] + def gbk = gbk_found != null ? gbk_found : [] + + [meta, fasta, faa, gbk] + } + .branch { meta, fasta, faa, gbk -> + preannotated: gbk != [] + fastas: true + } // Duplicate and filter the duplicated file for long contigs only for BGC // This is to speed up BGC run and prevent 'no hits found' fails - if ( params.run_bgc_screening ){ - SEQKIT_SEQ ( ch_intermediate_input.fastas.map{meta, fasta, faa, gbk -> [ meta, fasta ]} ) + if (params.run_bgc_screening) { + SEQKIT_SEQ(ch_intermediate_input.fastas.map { meta, fasta, faa, gbk -> [meta, fasta] }) ch_input_for_annotation = ch_intermediate_input.fastas - .map { meta, fasta, protein, gbk -> [ meta, fasta ] } - .mix( SEQKIT_SEQ.out.fastx.map{ meta, fasta -> [ meta + [category: 'long'], fasta ] } ) - .filter { - meta, fasta -> - if ( fasta != [] && fasta.isEmpty() ) log.warn("[nf-core/funcscan] Sample ${meta.id} does not have contigs longer than ${params.bgc_mincontiglength} bp. Will not be screened for BGCs.") - !fasta.isEmpty() + .map { meta, fasta, protein, gbk -> [meta, fasta] } + .mix(SEQKIT_SEQ.out.fastx.map { meta, fasta -> [meta + [category: 'long'], fasta] }) + .filter { meta, fasta -> + if (fasta != [] && fasta.isEmpty()) { + log.warn("[nf-core/funcscan] Sample ${meta.id} does not have contigs longer than ${params.bgc_mincontiglength} bp. Will not be screened for BGCs.") + } + !fasta.isEmpty() } - ch_versions = ch_versions.mix( SEQKIT_SEQ.out.versions ) - } else { - ch_input_for_annotation = ch_intermediate_input.fastas.map { meta, fasta, protein, gbk -> [ meta, fasta ] } + ch_versions = ch_versions.mix(SEQKIT_SEQ.out.versions) + } + else { + ch_input_for_annotation = ch_intermediate_input.fastas.map { meta, fasta, protein, gbk -> [meta, fasta] } } /* @@ -122,40 +120,38 @@ workflow FUNCSCAN { */ // Some tools require annotated FASTAs - if ( ( params.run_arg_screening && !params.arg_skip_deeparg ) || ( params.run_amp_screening ) || ( params.run_bgc_screening ) ) { - ANNOTATION( ch_input_for_annotation ) - ch_versions = ch_versions.mix( ANNOTATION.out.versions ) + if ((params.run_arg_screening && !params.arg_skip_deeparg) || params.run_amp_screening || params.run_bgc_screening) { + ANNOTATION(ch_input_for_annotation) + ch_versions = ch_versions.mix(ANNOTATION.out.versions) ch_new_annotation = ch_input_for_annotation - .join( ANNOTATION.out.faa ) - .join( ANNOTATION.out.gbk ) - - } else { + .join(ANNOTATION.out.faa) + .join(ANNOTATION.out.gbk) + } + else { ch_new_annotation = ch_intermediate_input.fastas } // Mix back the preannotated samples with the newly annotated ones ch_prepped_input = ch_new_annotation - .filter { meta, fasta, faa, gbk -> meta.category != 'long' } - .mix( ch_intermediate_input.preannotated ) - .multiMap { - meta, fasta, faa, gbk -> - fastas: [meta, fasta] - faas: [meta, faa] - gbks: [meta, gbk] - } - - if ( params.run_bgc_screening ){ - - ch_prepped_input_long = ch_new_annotation - .filter { meta, fasta, faa, gbk -> meta.category == 'long'} - .mix( ch_intermediate_input.preannotated ) - .multiMap { - meta, fasta, faa, gbk -> - fastas: [meta, fasta] - faas: [meta, faa] - gbks: [meta, gbk] - } + .filter { meta, fasta, faa, gbk -> meta.category != 'long' } + .mix(ch_intermediate_input.preannotated) + .multiMap { meta, fasta, faa, gbk -> + fastas: [meta, fasta] + faas: [meta, faa] + gbks: [meta, gbk] + } + + if (params.run_bgc_screening) { + + ch_prepped_input_long = ch_new_annotation + .filter { meta, fasta, faa, gbk -> meta.category == 'long' } + .mix(ch_intermediate_input.preannotated) + .multiMap { meta, fasta, faa, gbk -> + fastas: [meta, fasta] + faas: [meta, faa] + gbks: [meta, gbk] + } } /* @@ -165,17 +161,17 @@ workflow FUNCSCAN { // The final subworkflow reports need taxonomic classification. // This can be either on NT or AA level depending on annotation. // TODO: Only NT at the moment. AA tax. classification will be added only when its PR is merged. - if ( params.run_taxa_classification ) { - TAXA_CLASS ( ch_prepped_input.fastas ) - ch_versions = ch_versions.mix( TAXA_CLASS.out.versions ) - ch_taxonomy_tsv = TAXA_CLASS.out.sample_taxonomy - - } else { + if (params.run_taxa_classification) { + TAXA_CLASS(ch_prepped_input.fastas) + ch_versions = ch_versions.mix(TAXA_CLASS.out.versions) + ch_taxonomy_tsv = TAXA_CLASS.out.sample_taxonomy + } + else { - ch_mmseqs_db = Channel.empty() - ch_taxonomy_querydb = Channel.empty() - ch_taxonomy_querydb_taxdb = Channel.empty() - ch_taxonomy_tsv = Channel.empty() + ch_mmseqs_db = Channel.empty() + ch_taxonomy_querydb = Channel.empty() + ch_taxonomy_querydb_taxdb = Channel.empty() + ch_taxonomy_tsv = Channel.empty() } /* @@ -185,139 +181,143 @@ workflow FUNCSCAN { /* AMPs */ - if ( params.run_amp_screening && !params.run_taxa_classification ) { - AMP ( + if (params.run_amp_screening && !params.run_taxa_classification) { + AMP( ch_prepped_input.fastas, - ch_prepped_input.faas - .filter { - meta, file -> - if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. AMP screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - - }, + ch_prepped_input.faas.filter { meta, file -> + if (file != [] && file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. AMP screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, ch_taxonomy_tsv, ch_prepped_input.gbks ) ch_versions = ch_versions.mix(AMP.out.versions) - } else if ( params.run_amp_screening && params.run_taxa_classification ) { - AMP ( + } + else if (params.run_amp_screening && params.run_taxa_classification) { + AMP( ch_prepped_input.fastas, - ch_prepped_input.faas - .filter { - meta, file -> - if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. AMP screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, - ch_taxonomy_tsv - .filter { - meta, file -> - if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") - !file.isEmpty() - }, + ch_prepped_input.faas.filter { meta, file -> + if (file != [] && file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. AMP screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, + ch_taxonomy_tsv.filter { meta, file -> + if (file != [] && file.isEmpty()) { + log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") + } + !file.isEmpty() + }, ch_prepped_input.gbks ) - ch_versions = ch_versions.mix( AMP.out.versions ) + ch_versions = ch_versions.mix(AMP.out.versions) } /* ARGs */ - if ( params.run_arg_screening && !params.run_taxa_classification ) { - if ( params.arg_skip_deeparg ) { - ARG ( + if (params.run_arg_screening && !params.run_taxa_classification) { + if (params.arg_skip_deeparg) { + ARG( ch_prepped_input.fastas, [], ch_taxonomy_tsv - ) - } else { - ARG ( + ) + } + else { + ARG( ch_prepped_input.fastas, - ch_prepped_input.faas - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. ARG screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, + ch_prepped_input.faas.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. ARG screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, ch_taxonomy_tsv ) } - ch_versions = ch_versions.mix( ARG.out.versions ) - } else if ( params.run_arg_screening && params.run_taxa_classification ) { - if ( params.arg_skip_deeparg ) { - ARG ( + ch_versions = ch_versions.mix(ARG.out.versions) + } + else if (params.run_arg_screening && params.run_taxa_classification) { + if (params.arg_skip_deeparg) { + ARG( ch_prepped_input.fastas, [], - ch_taxonomy_tsv - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") - !file.isEmpty() + ch_taxonomy_tsv.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") } - ) - } else { - ARG ( + !file.isEmpty() + } + ) + } + else { + ARG( ch_prepped_input.fastas, - ch_prepped_input.faas - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. ARG screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, - ch_taxonomy_tsv - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") - !file.isEmpty() + ch_prepped_input.faas.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. ARG screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, + ch_taxonomy_tsv.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") + } + !file.isEmpty() } ) } - ch_versions = ch_versions.mix( ARG.out.versions ) + ch_versions = ch_versions.mix(ARG.out.versions) } /* BGCs */ - if ( params.run_bgc_screening && !params.run_taxa_classification ) { - BGC ( + if (params.run_bgc_screening && !params.run_taxa_classification) { + BGC( ch_prepped_input_long.fastas, - ch_prepped_input_long.faas - .filter { - meta, file -> - if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty GFF file. BGC screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, - ch_prepped_input_long.gbks - .filter { - meta, file -> - if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. BGC screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, + ch_prepped_input_long.faas.filter { meta, file -> + if (file != [] && file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty GFF file. BGC screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, + ch_prepped_input_long.gbks.filter { meta, file -> + if (file != [] && file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. BGC screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, ch_taxonomy_tsv ) - ch_versions = ch_versions.mix( BGC.out.versions ) - } else if ( params.run_bgc_screening && params.run_taxa_classification ) { - BGC ( + ch_versions = ch_versions.mix(BGC.out.versions) + } + else if (params.run_bgc_screening && params.run_taxa_classification) { + BGC( ch_prepped_input_long.fastas, - ch_prepped_input_long.faas - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. BGC screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, - ch_prepped_input_long.gbks - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty GBK file. BGC screening tools requiring this file will not be executed: ${meta.id}") - !file.isEmpty() - }, - ch_taxonomy_tsv - .filter { - meta, file -> - if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") - !file.isEmpty() + ch_prepped_input_long.faas.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty FAA file. BGC screening tools requiring this file will not be executed: ${meta.id}") } + !file.isEmpty() + }, + ch_prepped_input_long.gbks.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Annotation of following sample produced an empty GBK file. BGC screening tools requiring this file will not be executed: ${meta.id}") + } + !file.isEmpty() + }, + ch_taxonomy_tsv.filter { meta, file -> + if (file.isEmpty()) { + log.warn("[nf-core/funcscan] Taxonomy classification of the following sample produced an empty TSV file. Taxonomy merging will not be executed: ${meta.id}") + } + !file.isEmpty() + } ) - ch_versions = ch_versions.mix( BGC.out.versions ) + ch_versions = ch_versions.mix(BGC.out.versions) } // @@ -326,35 +326,42 @@ workflow FUNCSCAN { softwareVersionsToYAML(ch_versions) .collectFile( storeDir: "${params.outdir}/pipeline_info", - name: 'nf_core_pipeline_software_mqc_versions.yml', + name: 'nf_core_' + 'pipeline_software_' + 'mqc_' + 'versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } + ) + .set { ch_collated_versions } + // // MODULE: MultiQC // - ch_multiqc_config = Channel.fromPath( - "$projectDir/assets/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? - Channel.fromPath(params.multiqc_config, checkIfExists: true) : - Channel.empty() - ch_multiqc_logo = params.multiqc_logo ? - Channel.fromPath(params.multiqc_logo, checkIfExists: true) : - Channel.fromPath("${workflow.projectDir}/docs/images/nf-core-funcscan_logo_light.png", checkIfExists: true) - - summary_params = paramsSummaryMap( - workflow, parameters_schema: "nextflow_schema.json") + ch_multiqc_config = Channel.fromPath( + "${projectDir}/assets/multiqc_config.yml", + checkIfExists: true + ) + ch_multiqc_custom_config = params.multiqc_config + ? Channel.fromPath(params.multiqc_config, checkIfExists: true) + : Channel.empty() + ch_multiqc_logo = params.multiqc_logo + ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) + : Channel.fromPath("${workflow.projectDir}/docs/images/nf-core-funcscan_logo_light.png", checkIfExists: true) + + summary_params = paramsSummaryMap( + workflow, + parameters_schema: "nextflow_schema.json" + ) ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) - - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? - file(params.multiqc_methods_description, checkIfExists: true) : - file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) - ch_methods_description = Channel.value( - methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_files = ch_multiqc_files.mix( - ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') + ) + ch_multiqc_custom_methods_description = params.multiqc_methods_description + ? file(params.multiqc_methods_description, checkIfExists: true) + : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) + ch_methods_description = Channel.value( + methodsDescriptionText(ch_multiqc_custom_methods_description) + ) + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) ch_multiqc_files = ch_multiqc_files.mix( ch_methods_description.collectFile( @@ -363,11 +370,11 @@ workflow FUNCSCAN { ) ) - if ( ( params.run_arg_screening && !params.arg_skip_deeparg ) || ( params.run_amp_screening && ( params.amp_run_hmmsearch || !params.amp_skip_amplify || !params.amp_skip_ampir ) ) || ( params.run_bgc_screening ) ) { - ch_multiqc_files = ch_multiqc_files.mix( ANNOTATION.out.multiqc_files.collect{it[1]} ) + if ((params.run_arg_screening && !params.arg_skip_deeparg) || (params.run_amp_screening && (params.amp_run_hmmsearch || !params.amp_skip_amplify || !params.amp_skip_ampir)) || params.run_bgc_screening) { + ch_multiqc_files = ch_multiqc_files.mix(ANNOTATION.out.multiqc_files.collect { it[1] }) } - MULTIQC ( + MULTIQC( ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), @@ -378,11 +385,5 @@ workflow FUNCSCAN { emit: multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html - versions = ch_versions // channel: [ path(versions.yml) ] + versions = ch_versions // channel: [ path(versions.yml) ] } - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - THE END -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/