diff --git a/.editorconfig b/.editorconfig index a6981b47..835c83dd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,5 @@ trim_trailing_whitespace = true indent_size = 4 indent_style = space -[*.{yml,yaml}] +[*.{md,yml,yaml}] indent_size = 2 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7faf4340..cba1dc95 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,7 +16,9 @@ Contributions to the code are even more welcome ;) If you'd like to write some code for nf-core/modules, the standard workflow is as follows: 1. Check that there isn't already an issue about your idea in the [nf-core/modules issues](https://github.com/nf-core/modules/issues) to avoid duplicating work - * If there isn't one already, please create one so that others know you're working on this + +- 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/modules repository](https://github.com/nf-core/modules) to your GitHub account 3. When adding a module file, follow the [guidelines](https://github.com/nf-core/modules#adding-a-new-module-file) 4. Ensure that [tests are working locally](https://github.com/nf-core/modules#running-tests-locally) @@ -40,7 +42,6 @@ These tests are run both with the latest available version of `Nextflow` and als For further information/help, please consult the [nf-core/modules README](https://github.com/nf-core/modules) and don't hesitate to get in touch on the nf-core Slack [#modules](https://nfcore.slack.com/channels/modules) channel ([join our Slack here](https://nf-co.re/join/slack)). - ### Images and figures For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f1122ea3..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -name: Bug report -about: Report something that is broken or incorrect -title: "[BUG]" ---- - - - -## Check Documentation - -I have checked the following places for your error: - -- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) -- [ ] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) - -## Description of the bug - - - -## Steps to reproduce - -Steps to reproduce the behaviour: - -1. Command line: -2. See error: - -## Expected behaviour - - - -## Log files - -Have you provided the following extra information/files: - -- [ ] The command used to run the module -- [ ] The `.nextflow.log` file - -## System - -- Hardware: -- Executor: -- OS: -- Version - -## Nextflow Installation - -- Version: - -## Container engine - -- Engine: -- version: -- Image tag: - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..74907cfe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,52 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: checkboxes + attributes: + label: Have you checked the docs? + description: I have checked the following places for my error + options: + - label: "[nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)" + required: true + - label: "[nf-core modules documentation](https://nf-co.re/docs/contributing/modules)" + required: true + + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal. + render: console + placeholder: | + $ nextflow run ... + + Some output where something broke + + - type: textarea + id: files + attributes: + label: Relevant files + description: | + Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed. + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files. + + - type: textarea + id: system + attributes: + label: System information + description: | + * Nextflow version _(eg. 21.10.3)_ + * Hardware _(eg. HPC, Desktop, Cloud)_ + * Executor _(eg. slurm, local, awsbatch)_ + * Container engine and version: _(e.g. Docker 1.0.0, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ + * Image tag: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 72d6c058..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for nf-core/modules -title: "[FEATURE]" ---- - - - -## Is your feature request related to a problem? Please describe - - - - - -## Describe the solution you'd like - - - -## Describe alternatives you've considered - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..316fba90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest an idea for nf-core/modules +labels: feature +title: "[FEATURE]" +body: + - type: textarea + id: description + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the bug is. + placeholder: | + + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: A clear and concise description of the solution you want to happen. + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add any other context about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/new_module.md b/.github/ISSUE_TEMPLATE/new_module.md deleted file mode 100644 index 5c7e61cc..00000000 --- a/.github/ISSUE_TEMPLATE/new_module.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: New module -about: Suggest a new module for nf-core/modules -title: "new module: TOOL/SUBTOOL" -label: new module ---- - - - -I think it would be good to have a module for [TOOL](https://bioconda.github.io/recipes/TOOL/README.html) - -- [ ] This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command -- [ ] There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module -- [ ] There is no [open issue](https://github.com/nf-core/modules/issues) for this module -- [ ] If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module diff --git a/.github/ISSUE_TEMPLATE/new_module.yml b/.github/ISSUE_TEMPLATE/new_module.yml new file mode 100644 index 00000000..2d3e9d47 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_module.yml @@ -0,0 +1,36 @@ +name: New module +description: Suggest a new module for nf-core/modules +title: "new module: TOOL/SUBTOOL" +labels: new module +body: + - type: checkboxes + attributes: + label: Is there an existing module for this? + description: This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command + options: + - label: I have searched for the existing module + required: true + + - type: checkboxes + attributes: + label: Is there an open PR for this? + description: There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module + options: + - label: I have searched for existing PRs + required: true + + - type: checkboxes + attributes: + label: Is there an open issue for this? + description: There is no [open issue](https://github.com/nf-core/modules/issues) for this module + options: + - label: I have searched for existing issues + required: true + + - type: checkboxes + attributes: + label: Are you going to work on this? + description: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + options: + - label: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b9f7a4e8..8fc9ae0d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -27,6 +27,6 @@ Closes #XXX - [ ] Add a resource `label` - [ ] Use BioConda and BioContainers if possible to fulfil software requirements. - Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky: - - [ ] `PROFILE=docker pytest --tag --symlink --keep-workflow-wd` - - [ ] `PROFILE=singularity pytest --tag --symlink --keep-workflow-wd` - - [ ] `PROFILE=conda pytest --tag --symlink --keep-workflow-wd` + - [ ] `PROFILE=docker pytest --tag --symlink --keep-workflow-wd --git-aware` + - [ ] `PROFILE=singularity pytest --tag --symlink --keep-workflow-wd --git-aware` + - [ ] `PROFILE=conda pytest --tag --symlink --keep-workflow-wd --git-aware` diff --git a/.github/workflows/code-linting.yml b/.github/workflows/code-linting.yml index d15c4af6..9b066467 100644 --- a/.github/workflows/code-linting.yml +++ b/.github/workflows/code-linting.yml @@ -5,51 +5,31 @@ on: pull_request: branches: [master] - jobs: - Markdown: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v1 - with: - node-version: "10" - - - name: Install markdownlint - run: npm install -g markdownlint-cli - - - name: Run Markdownlint - run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.markdownlint.yml - - EditorConfig: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v1 - with: - node-version: "10" - - - name: Install editorconfig-checker - run: npm install -g editorconfig-checker - - - name: Run ECLint check - run: editorconfig-checker -exclude README.md $(git ls-files | grep -v test) - - YAML: + Prettier: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v2 - name: Install NodeJS - uses: actions/setup-node@v1 - with: - node-version: "10" + uses: actions/setup-node@v2 - - name: Install yaml-lint - run: npm install -g yaml-lint + - name: Install Prettier + run: npm install -g prettier - - name: Run yaml-lint - run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yaml" -or -name "*.yml") + - name: Run Prettier --check + run: prettier --check . + + EditorConfig: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + + - name: Install editorconfig-checker + run: npm install -g editorconfig-checker + + - name: Run ECLint check + run: editorconfig-checker -exclude README.md $(git ls-files | grep -v test) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index ee922c45..2e4f70f8 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -86,17 +86,13 @@ jobs: # Test the module - name: Run pytest-workflow # only use one thread for pytest-workflow to avoid race condition on conda cache. - run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof + run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof --git-aware --color=yes - name: Output log on failure if: failure() run: | - echo "======> log.out <=======" - cat /home/runner/pytest_workflow_*/*/log.out - echo - echo - echo "======> log.err <=======" - cat /home/runner/pytest_workflow_*/*/log.err + sudo apt install bat > /dev/null + batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err} - name: Upload logs on failure if: failure() diff --git a/.gitpod.yml b/.gitpod.yml index 289c86e5..d24968be 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,13 +2,13 @@ image: nfcore/gitpod:latest vscode: extensions: # based on nf-core.nf-core-extensionpack - - codezombiech.gitignore # Language support for .gitignore files - # - cssho.vscode-svgviewer # SVG viewer - - davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code - - eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed - - 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 - - oderwat.indent-rainbow # Highlight indentation level - - streetsidesoftware.code-spell-checker # Spelling checker for source code + - codezombiech.gitignore # Language support for .gitignore files + # - cssho.vscode-svgviewer # SVG viewer + - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code + - eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed + - 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 + - oderwat.indent-rainbow # Highlight indentation level + - streetsidesoftware.code-spell-checker # Spelling checker for source code diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index 9b72da3c..00000000 --- a/.markdownlint.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Markdownlint configuration file -default: true -line-length: false -no-multiple-blanks: 0 -blanks-around-headers: false -blanks-around-lists: false -header-increment: false -no-duplicate-header: - siblings_only: true -ul-indent: - indent: 4 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..a76cd9ac --- /dev/null +++ b/.prettierignore @@ -0,0 +1,16 @@ +includes/Maven_Pro/ + +# gitignore +.nextflow* +work/ +results/ +test_output/ +output/ +.DS_Store +*.code-workspace +tests/data/ +.screenrc +.*.sw? +__pycache__ +*.pyo +*.pyc diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 00000000..c81f9a76 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1 @@ +printWidth: 120 diff --git a/README.md b/README.md index beee42e7..1d8312cc 100644 --- a/README.md +++ b/README.md @@ -31,109 +31,109 @@ We have written a helper command in the `nf-core/tools` package that uses the Gi 1. Install the latest version of [`nf-core/tools`](https://github.com/nf-core/tools#installation) (`>=2.0`) 2. List the available modules: - ```console - $ nf-core modules list remote + ```console + $ nf-core modules list remote - ,--./,-. - ___ __ __ __ ___ /,-._.--~\ - |\ | |__ __ / ` / \ |__) |__ } { - | \| | \__, \__/ | \ |___ \`-._,-`-, - `._,._,' + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' - nf-core/tools version 2.0 + nf-core/tools version 2.0 - INFO Modules available from nf-core/modules (master): pipeline_modules.py:164 + INFO Modules available from nf-core/modules (master): pipeline_modules.py:164 - ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ - ┃ Module Name ┃ - ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ - │ bandage/image │ - │ bcftools/consensus │ - │ bcftools/filter │ - │ bcftools/isec │ - ..truncated.. - ``` + ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ + ┃ Module Name ┃ + ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ + │ bandage/image │ + │ bcftools/consensus │ + │ bcftools/filter │ + │ bcftools/isec │ + ..truncated.. + ``` 3. Install the module in your pipeline directory: - ```console - $ nf-core modules install fastqc + ```console + $ nf-core modules install fastqc - ,--./,-. - ___ __ __ __ ___ /,-._.--~\ - |\ | |__ __ / ` / \ |__) |__ } { - | \| | \__, \__/ | \ |___ \`-._,-`-, - `._,._,' + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' - nf-core/tools version 2.0 + nf-core/tools version 2.0 - INFO Installing fastqc pipeline_modules.py:213 - INFO Downloaded 3 files to ./modules/nf-core/modules/fastqc pipeline_modules.py:236 - ``` + INFO Installing fastqc pipeline_modules.py:213 + INFO Downloaded 3 files to ./modules/nf-core/modules/fastqc pipeline_modules.py:236 + ``` 4. Import the module in your Nextflow script: - ```nextflow - #!/usr/bin/env nextflow + ```nextflow + #!/usr/bin/env nextflow - nextflow.enable.dsl = 2 + nextflow.enable.dsl = 2 - include { FASTQC } from './modules/nf-core/modules/fastqc/main' - ``` + include { FASTQC } from './modules/nf-core/modules/fastqc/main' + ``` 5. Remove the module from the pipeline repository if required: - ```console - $ nf-core modules remove fastqc + ```console + $ nf-core modules remove fastqc - ,--./,-. - ___ __ __ __ ___ /,-._.--~\ - |\ | |__ __ / ` / \ |__) |__ } { - | \| | \__, \__/ | \ |___ \`-._,-`-, - `._,._,' + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' - nf-core/tools version 2.0 + nf-core/tools version 2.0 - INFO Removing fastqc pipeline_modules.py:271 - INFO Successfully removed fastqc pipeline_modules.py:285 - ``` + INFO Removing fastqc pipeline_modules.py:271 + INFO Successfully removed fastqc pipeline_modules.py:285 + ``` 6. Check that a locally installed nf-core module is up-to-date compared to the one hosted in this repo: - ```console - $ nf-core modules lint fastqc + ```console + $ nf-core modules lint fastqc - ,--./,-. - ___ __ __ __ ___ /,-._.--~\ - |\ | |__ __ / ` / \ |__) |__ } { - | \| | \__, \__/ | \ |___ \`-._,-`-, - `._,._,' + ,--./,-. + ___ __ __ __ ___ /,-._.--~\ + |\ | |__ __ / ` / \ |__) |__ } { + | \| | \__, \__/ | \ |___ \`-._,-`-, + `._,._,' - nf-core/tools version 2.0 + nf-core/tools version 2.0 - INFO Linting pipeline: . lint.py:104 - INFO Linting module: fastqc lint.py:106 + INFO Linting pipeline: . lint.py:104 + INFO Linting module: fastqc lint.py:106 - ╭─────────────────────────────────────────────────────────────────────────────────╮ - │ [!] 1 Test Warning │ - ╰─────────────────────────────────────────────────────────────────────────────────╯ - ╭──────────────┬───────────────────────────────┬──────────────────────────────────╮ - │ Module name │ Test message │ File path │ - ├──────────────┼───────────────────────────────┼──────────────────────────────────┤ - │ fastqc │ Local copy of module outdated │ modules/nf-core/modules/fastqc/ │ - ╰──────────────┴────────────────────────────── ┴──────────────────────────────────╯ - ╭──────────────────────╮ - │ LINT RESULTS SUMMARY │ - ├──────────────────────┤ - │ [✔] 15 Tests Passed │ - │ [!] 1 Test Warning │ - │ [✗] 0 Test Failed │ - ╰──────────────────────╯ - ``` + ╭─────────────────────────────────────────────────────────────────────────────────╮ + │ [!] 1 Test Warning │ + ╰─────────────────────────────────────────────────────────────────────────────────╯ + ╭──────────────┬───────────────────────────────┬──────────────────────────────────╮ + │ Module name │ Test message │ File path │ + ├──────────────┼───────────────────────────────┼──────────────────────────────────┤ + │ fastqc │ Local copy of module outdated │ modules/nf-core/modules/fastqc/ │ + ╰──────────────┴────────────────────────────── ┴──────────────────────────────────╯ + ╭──────────────────────╮ + │ LINT RESULTS SUMMARY │ + ├──────────────────────┤ + │ [✔] 15 Tests Passed │ + │ [!] 1 Test Warning │ + │ [✗] 0 Test Failed │ + ╰──────────────────────╯ + ``` ## Adding new modules -If you wish to contribute a new module, please see the documentation on the [nf-core website](https://nf-co.re/developers/adding_modules). +If you wish to contribute a new module, please see the documentation on the [nf-core website](https://nf-co.re/developers/modules#writing-a-new-module-reference). > Please be kind to our code reviewers and submit one pull request per module :) diff --git a/modules/abacas/meta.yml b/modules/abacas/meta.yml index 039fb0be..c685e650 100644 --- a/modules/abacas/meta.yml +++ b/modules/abacas/meta.yml @@ -14,7 +14,7 @@ tools: documentation: http://abacas.sourceforge.net/documentation.html tool_dev_url: None doi: "10.1093/bioinformatics/btp347" - licence: ['GPL v2-or-later'] + licence: ["GPL v2-or-later"] input: - meta: diff --git a/modules/abricate/run/main.nf b/modules/abricate/run/main.nf new file mode 100644 index 00000000..11992791 --- /dev/null +++ b/modules/abricate/run/main.nf @@ -0,0 +1,34 @@ +process ABRICATE_RUN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::abricate=1.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/abricate%3A1.0.1--ha8f3691_1': + 'quay.io/biocontainers/abricate:1.0.1--ha8f3691_1' }" + + input: + tuple val(meta), path(assembly) + + output: + tuple val(meta), path("*.txt"), emit: report + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + abricate \\ + $assembly \\ + $args \\ + --threads $task.cpus > ${prefix}.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' ) + END_VERSIONS + """ +} diff --git a/modules/abricate/run/meta.yml b/modules/abricate/run/meta.yml new file mode 100644 index 00000000..1365bcd7 --- /dev/null +++ b/modules/abricate/run/meta.yml @@ -0,0 +1,43 @@ +name: abricate_run +description: Screen assemblies for antimicrobial resistance against multiple databases +keywords: + - bacteria + - assembly + - antimicrobial reistance +tools: + - abricate: + description: Mass screening of contigs for antibiotic resistance genes + homepage: https://github.com/tseemann/abricate + documentation: https://github.com/tseemann/abricate + tool_dev_url: https://github.com/tseemann/abricate + doi: "" + licence: ["GPL v2", "GPL v2"] + +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}" + +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}" + +authors: + - "@rpetit3" diff --git a/modules/abricate/summary/main.nf b/modules/abricate/summary/main.nf new file mode 100644 index 00000000..b3ba4d58 --- /dev/null +++ b/modules/abricate/summary/main.nf @@ -0,0 +1,33 @@ +process ABRICATE_SUMMARY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::abricate=1.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/abricate%3A1.0.1--ha8f3691_1': + 'quay.io/biocontainers/abricate:1.0.1--ha8f3691_1' }" + + input: + tuple val(meta), path(reports) + + output: + tuple val(meta), path("*.txt"), emit: report + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + abricate \\ + --summary \\ + $reports > ${prefix}.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' ) + END_VERSIONS + """ +} diff --git a/modules/abricate/summary/meta.yml b/modules/abricate/summary/meta.yml new file mode 100644 index 00000000..c6653b80 --- /dev/null +++ b/modules/abricate/summary/meta.yml @@ -0,0 +1,43 @@ +name: abricate_summary +description: Screen assemblies for antimicrobial resistance against multiple databases +keywords: + - bacteria + - assembly + - antimicrobial reistance +tools: + - abricate: + description: Mass screening of contigs for antibiotic resistance genes + homepage: https://github.com/tseemann/abricate + documentation: https://github.com/tseemann/abricate + tool_dev_url: https://github.com/tseemann/abricate + doi: "" + licence: ["GPL v2", "GPL v2"] + +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}" + +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" + - summary: + type: file + description: Tab-delimited report of aggregated results + pattern: "*.{txt}" + +authors: + - "@rpetit3" diff --git a/modules/adapterremoval/main.nf b/modules/adapterremoval/main.nf index 55c5f17c..0e17c055 100644 --- a/modules/adapterremoval/main.nf +++ b/modules/adapterremoval/main.nf @@ -9,49 +9,46 @@ process ADAPTERREMOVAL { input: tuple val(meta), path(reads) + path(adapterlist) output: - tuple val(meta), path('*.fastq.gz'), emit: reads - tuple val(meta), path('*.log') , emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.truncated.fastq.gz") , optional: true, emit: singles_truncated + tuple val(meta), path("${prefix}.discarded.fastq.gz") , optional: true, emit: discarded + tuple val(meta), path("${prefix}.pair{1,2}.truncated.fastq.gz") , optional: true, emit: paired_truncated + tuple val(meta), path("${prefix}.collapsed.fastq.gz") , optional: true, emit: collapsed + tuple val(meta), path("${prefix}.collapsed.truncated.fastq.gz") , optional: true, emit: collapsed_truncated + tuple val(meta), path("${prefix}.paired.fastq.gz") , optional: true, emit: paired_interleaved + tuple val(meta), path('*.settings') , emit: settings + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def list = adapterlist ? "--adapter-list ${adapterlist}" : "" + prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ AdapterRemoval \\ --file1 $reads \\ $args \\ - --basename $prefix \\ - --threads $task.cpus \\ - --settings ${prefix}.log \\ - --output1 ${prefix}.trimmed.fastq.gz \\ + $adapterlist \\ + --basename ${prefix} \\ + --threads ${task.cpus} \\ --seed 42 \\ - --gzip \\ + --gzip - cat <<-END_VERSIONS > versions.yml - "${task.process}": - adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g") - END_VERSIONS - """ - } else if (!meta.single_end && !meta.collapse) { - """ - AdapterRemoval \\ - --file1 ${reads[0]} \\ - --file2 ${reads[1]} \\ - $args \\ - --basename $prefix \\ - --threads $task.cpus \\ - --settings ${prefix}.log \\ - --output1 ${prefix}.pair1.trimmed.fastq.gz \\ - --output2 ${prefix}.pair2.trimmed.fastq.gz \\ - --seed 42 \\ - --gzip \\ + ensure_fastq() { + if [ -f "\${1}" ]; then + mv "\${1}" "\${1::-3}.fastq.gz" + fi + + } + + ensure_fastq '${prefix}.truncated.gz' + ensure_fastq '${prefix}.discarded.gz' cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -63,15 +60,28 @@ process ADAPTERREMOVAL { AdapterRemoval \\ --file1 ${reads[0]} \\ --file2 ${reads[1]} \\ - --collapse \\ $args \\ - --basename $prefix \\ + $adapterlist \\ + --basename ${prefix} \\ --threads $task.cpus \\ - --settings ${prefix}.log \\ --seed 42 \\ - --gzip \\ + --gzip + + ensure_fastq() { + if [ -f "\${1}" ]; then + mv "\${1}" "\${1::-3}.fastq.gz" + fi + + } + + ensure_fastq '${prefix}.truncated.gz' + ensure_fastq '${prefix}.discarded.gz' + ensure_fastq '${prefix}.pair1.truncated.gz' + ensure_fastq '${prefix}.pair2.truncated.gz' + ensure_fastq '${prefix}.collapsed.gz' + ensure_fastq '${prefix}.collapsed.truncated.gz' + ensure_fastq '${prefix}.paired.gz' - cat *.collapsed.gz *.collapsed.truncated.gz > ${prefix}.merged.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g") diff --git a/modules/adapterremoval/meta.yml b/modules/adapterremoval/meta.yml index 05386fd8..77273f60 100644 --- a/modules/adapterremoval/meta.yml +++ b/modules/adapterremoval/meta.yml @@ -1,50 +1,90 @@ name: adapterremoval description: Trim sequencing adapters and collapse overlapping reads keywords: - - trimming - - adapters - - merging - - fastq + - trimming + - adapters + - merging + - fastq tools: - - adapterremoval: - description: The AdapterRemoval v2 tool for merging and clipping reads. - homepage: https://github.com/MikkelSchubert/adapterremoval - documentation: https://adapterremoval.readthedocs.io - licence: ['GPL v3'] + - adapterremoval: + description: The AdapterRemoval v2 tool for merging and clipping reads. + homepage: https://github.com/MikkelSchubert/adapterremoval + documentation: https://adapterremoval.readthedocs.io + licence: ["GPL v3"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false, collapse:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - pattern: "*.{fq,fastq,fg.gz,fastq.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + pattern: "*.{fq,fastq,fq.gz,fastq.gz}" + - adapterlist: + type: file + description: Optional text file containing list of adapters to look for for removal + with one adapter per line. Otherwise will look for default adapters (see + AdapterRemoval man page), or can be modified to remove user-specified + adapters via ext.args. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input adapter trimmed FastQ files of size 1 or 2 for - single-end or collapsed data and paired-end data, respectively. - pattern: "*.{fastq.gz}" - - log: - type: file - description: AdapterRemoval log file - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - singles_truncated: + type: file + description: | + Adapter trimmed FastQ files of either single-end reads, or singleton + 'orphaned' reads from merging of paired-end data (i.e., one of the pair + was lost due to filtering thresholds). + pattern: "*.truncated.fastq.gz" + - discarded: + type: file + description: | + Adapter trimmed FastQ files of reads that did not pass filtering + thresholds. + pattern: "*.discarded.fastq.gz" + - pair1_truncated: + type: file + description: | + Adapter trimmed R1 FastQ files of paired-end reads that did not merge + with their respective R2 pair due to long templates. The respective pair + is stored in 'pair2_truncated'. + pattern: "*.pair1.truncated.fastq.gz" + - pair2_truncated: + type: file + description: | + Adapter trimmed R2 FastQ files of paired-end reads that did not merge + with their respective R1 pair due to long templates. The respective pair + is stored in 'pair1_truncated'. + pattern: "*.pair2.truncated.fastq.gz" + - collapsed: + type: file + description: | + Collapsed FastQ of paired-end reads that successfully merged with their + respective R1 pair but were not trimmed. + pattern: "*.collapsed.fastq.gz" + - collapsed_truncated: + type: file + description: | + Collapsed FastQ of paired-end reads that successfully merged with their + respective R1 pair and were trimmed of adapter due to sufficient overlap. + pattern: "*.collapsed.truncated.fastq.gz" + - log: + type: file + description: AdapterRemoval log file + pattern: "*.settings" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxibor" + - "@maxibor" + - "@jfy133" diff --git a/modules/adapterremovalfixprefix/main.nf b/modules/adapterremovalfixprefix/main.nf new file mode 100644 index 00000000..c0137fb4 --- /dev/null +++ b/modules/adapterremovalfixprefix/main.nf @@ -0,0 +1,38 @@ +def VERSION = '0.05' + +process ADAPTERREMOVALFIXPREFIX { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::adapterremovalfixprefix=0.0.5" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/adapterremovalfixprefix:0.0.5--hdfd78af_2': + 'quay.io/biocontainers/adapterremovalfixprefix:0.0.5--hdfd78af_2' }" + + input: + tuple val(meta), path(fastq) + + output: + tuple val(meta), path("*.fq.gz"), emit: fixed_fastq + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if ("$fastq" == "${prefix}.fq.gz") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + + """ + AdapterRemovalFixPrefix \\ + $fastq \\ + $args \\ + | gzip > ${prefix}.fq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + adapterremovalfixprefix: $VERSION + END_VERSIONS + """ +} diff --git a/modules/adapterremovalfixprefix/meta.yml b/modules/adapterremovalfixprefix/meta.yml new file mode 100644 index 00000000..db69bc07 --- /dev/null +++ b/modules/adapterremovalfixprefix/meta.yml @@ -0,0 +1,43 @@ +name: adapterremovalfixprefix +description: Fixes prefixes from AdapterRemoval2 output to make sure no clashing read names are in the output. For use with DeDup. +keywords: + - adapterremoval + - fastq + - dedup +tools: + - adapterremovalfixprefix: + description: Fixes adapter removal prefixes to make sure no clashing read names are in the output. + homepage: https://github.com/apeltzer/AdapterRemovalFixPrefix + documentation: None + tool_dev_url: https://github.com/apeltzer/AdapterRemovalFixPrefix + doi: "10.1186/s13059-016-0918-z" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: FASTQ file from AdapterRemoval2 + pattern: "*.{fq.gz,fastq.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" + - fixed_fastq: + type: file + description: FASTQ file with fixed read prefixes for DeDup + pattern: "*.{fq.gz}" + +authors: + - "@jfy133" diff --git a/modules/agrvate/meta.yml b/modules/agrvate/meta.yml index a8ab5816..bcaa6c0b 100644 --- a/modules/agrvate/meta.yml +++ b/modules/agrvate/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/VishnuRaghuram94/AgrVATE tool_dev_url: https://github.com/VishnuRaghuram94/AgrVATE doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/allelecounter/meta.yml b/modules/allelecounter/meta.yml index 7d921e12..0734512e 100644 --- a/modules/allelecounter/meta.yml +++ b/modules/allelecounter/meta.yml @@ -32,8 +32,8 @@ input: description: loci file pattern: "*.{tsv}" - fasta: - type: file - description: Input genome fasta file. Required when passing CRAM files. + type: file + description: Input genome fasta file. Required when passing CRAM files. output: - meta: diff --git a/modules/amplify/predict/main.nf b/modules/amplify/predict/main.nf new file mode 100644 index 00000000..d035516f --- /dev/null +++ b/modules/amplify/predict/main.nf @@ -0,0 +1,41 @@ +def VERSION = '1.0.3' // Version information not provided by tool + +process AMPLIFY_PREDICT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::amplify=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/amplify:1.0.3--py36hdfd78af_0': + 'quay.io/biocontainers/amplify:1.0.3--py36hdfd78af_0' }" + + input: + tuple val(meta), path(faa) + path(model_dir) + + output: + tuple val(meta), path('*.tsv'), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def custom_model_dir = model_dir ? "-md ${model_dir}" : "" + """ + AMPlify \\ + $args \\ + ${custom_model_dir} \\ + -s '${faa}' + + #rename output, because tool includes date and time in name + mv *.tsv ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + AMPlify: $VERSION + END_VERSIONS + """ +} diff --git a/modules/amplify/predict/meta.yml b/modules/amplify/predict/meta.yml new file mode 100644 index 00000000..c9ffe8a4 --- /dev/null +++ b/modules/amplify/predict/meta.yml @@ -0,0 +1,47 @@ +name: "amplify_predict" +description: AMPlify is an attentive deep learning model for antimicrobial peptide prediction. +keywords: + - antimicrobial peptides + - AMPs + - prediction + - model +tools: + - "amplify": + description: "Attentive deep learning model for antimicrobial peptide prediction" + homepage: "https://github.com/bcgsc/AMPlify" + documentation: "https://github.com/bcgsc/AMPlify" + tool_dev_url: "https://github.com/bcgsc/AMPlify" + doi: "https://doi.org/10.1186/s12864-022-08310-4" + licence: "['GPL v3']" + +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) + +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}" + +authors: + - "@louperelo" diff --git a/modules/amps/meta.yml b/modules/amps/meta.yml index 43d68599..34f825af 100644 --- a/modules/amps/meta.yml +++ b/modules/amps/meta.yml @@ -24,7 +24,7 @@ tools: documentation: "https://github.com/keyfm/amps" tool_dev_url: "https://github.com/keyfm/amps" doi: "10.1186/s13059-019-1903-0" - licence: ['GPL >=3'] + licence: ["GPL >=3"] input: - maltextract_results: diff --git a/modules/amrfinderplus/run/main.nf b/modules/amrfinderplus/run/main.nf new file mode 100644 index 00000000..47a8fb46 --- /dev/null +++ b/modules/amrfinderplus/run/main.nf @@ -0,0 +1,55 @@ +process AMRFINDERPLUS_RUN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::ncbi-amrfinderplus=3.10.23" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ncbi-amrfinderplus%3A3.10.23--h17dc2d4_0': + 'quay.io/biocontainers/ncbi-amrfinderplus:3.10.23--h17dc2d4_0' }" + + input: + tuple val(meta), path(fasta) + path db + + output: + tuple val(meta), path("${prefix}.tsv") , emit: report + tuple val(meta), path("${prefix}-mutations.tsv"), emit: mutation_report, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def is_compressed = fasta.getName().endsWith(".gz") ? true : false + prefix = task.ext.prefix ?: "${meta.id}" + organism_param = meta.containsKey("organism") ? "--organism ${meta.organism} --mutation_all ${prefix}-mutations.tsv" : "" + fasta_name = fasta.getName().replace(".gz", "") + fasta_param = "-n" + if (meta.containsKey("is_proteins")) { + if (meta.is_proteins) { + fasta_param = "-p" + } + } + """ + if [ "$is_compressed" == "true" ]; then + gzip -c -d $fasta > $fasta_name + fi + + mkdir amrfinderdb + tar xzvf $db -C amrfinderdb + + amrfinder \\ + $fasta_param $fasta_name \\ + $organism_param \\ + $args \\ + --database amrfinderdb \\ + --threads $task.cpus > ${prefix}.tsv + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + amrfinderplus: \$(amrfinder --version) + END_VERSIONS + """ +} diff --git a/modules/amrfinderplus/run/meta.yml b/modules/amrfinderplus/run/meta.yml new file mode 100644 index 00000000..813adf3e --- /dev/null +++ b/modules/amrfinderplus/run/meta.yml @@ -0,0 +1,51 @@ +name: amrfinderplus_run +description: Identify antimicrobial resistance in gene or protein sequences +keywords: + - bacteria + - fasta + - antibiotic resistance +tools: + - amrfinderplus: + 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"] + +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" + +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" + - mutation_report: + type: file + description: Report of organism-specific point-mutations + pattern: "*-mutations.tsv" + +authors: + - "@rpetit3" diff --git a/modules/amrfinderplus/update/main.nf b/modules/amrfinderplus/update/main.nf new file mode 100644 index 00000000..ad09c391 --- /dev/null +++ b/modules/amrfinderplus/update/main.nf @@ -0,0 +1,29 @@ +process AMRFINDERPLUS_UPDATE { + tag "update" + label 'process_low' + + conda (params.enable_conda ? "bioconda::ncbi-amrfinderplus=3.10.23" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ncbi-amrfinderplus%3A3.10.23--h17dc2d4_0': + 'quay.io/biocontainers/ncbi-amrfinderplus:3.10.23--h17dc2d4_0' }" + + output: + path "amrfinderdb.tar.gz", emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + mkdir amrfinderdb + amrfinder_update -d amrfinderdb + tar czvf amrfinderdb.tar.gz -C \$(readlink amrfinderdb/latest) ./ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + amrfinderplus: \$(amrfinder --version) + END_VERSIONS + """ +} diff --git a/modules/amrfinderplus/update/meta.yml b/modules/amrfinderplus/update/meta.yml new file mode 100644 index 00000000..0e20a92f --- /dev/null +++ b/modules/amrfinderplus/update/meta.yml @@ -0,0 +1,37 @@ +name: amrfinderplus_update +description: Identify antimicrobial resistance in gene or protein sequences +keywords: + - bacteria + - fasta + - antibiotic resistance +tools: + - amrfinderplus: + 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"] + +input: + - input_not_required: + type: null + description: module does not have an 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" + +authors: + - "@rpetit3" diff --git a/modules/antismash/antismashlite/main.nf b/modules/antismash/antismashlite/main.nf new file mode 100644 index 00000000..fb003a30 --- /dev/null +++ b/modules/antismash/antismashlite/main.nf @@ -0,0 +1,68 @@ +process ANTISMASH_ANTISMASHLITE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' : + 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" + + containerOptions { + workflow.containerEngine == 'singularity' ? + "-B $antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" : + workflow.containerEngine == 'docker' ? + "-v \$PWD/$antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" : + '' + } + + input: + tuple val(meta), path(sequence_input) + path(databases) + path(antismash_dir) // Optional input: AntiSMASH installation folder. It is not needed for using this module with conda, but required for docker/singularity (see meta.yml). + path(gff) + + output: + tuple val(meta), path("${prefix}/clusterblast/*_c*.txt") , optional: true, emit: clusterblast_file + tuple val(meta), path("${prefix}/{css,images,js}") , emit: html_accessory_files + tuple val(meta), path("${prefix}/knownclusterblast/region*/ctg*.html") , optional: true, emit: knownclusterblast_html + tuple val(meta), path("${prefix}/knownclusterblast/*_c*.txt") , optional: true, emit: knownclusterblast_txt + tuple val(meta), path("${prefix}/svg/clusterblast*.svg") , optional: true, emit: svg_files_clusterblast + tuple val(meta), path("${prefix}/svg/knownclusterblast*.svg") , optional: true, emit: svg_files_knownclusterblast + tuple val(meta), path("${prefix}/*.gbk") , emit: gbk_input + tuple val(meta), path("${prefix}/*.json") , emit: json_results + tuple val(meta), path("${prefix}/*.log") , emit: log + tuple val(meta), path("${prefix}/*.zip") , emit: zip + tuple val(meta), path("${prefix}/*region*.gbk") , emit: gbk_results + tuple val(meta), path("${prefix}/clusterblastoutput.txt") , optional: true, emit: clusterblastoutput + tuple val(meta), path("${prefix}/index.html") , emit: html + tuple val(meta), path("${prefix}/knownclusterblastoutput.txt") , optional: true, emit: knownclusterblastoutput + tuple val(meta), path("${prefix}/regions.js") , emit: json_sideloading + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + gff_flag = "--genefinding-gff3 ${gff}" + + """ + ## We specifically do not include annotations (--genefinding-tool none) as + ## this should be run as a separate module for versioning purposes + antismash \\ + $args \\ + $gff_flag \\ + -c $task.cpus \\ + --output-dir $prefix \\ + --genefinding-tool none \\ + --logfile $prefix/${prefix}.log \\ + --databases $databases \\ + $sequence_input + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + antismash-lite: \$(antismash --version | sed 's/antiSMASH //') + END_VERSIONS + """ +} diff --git a/modules/antismash/antismashlite/meta.yml b/modules/antismash/antismashlite/meta.yml new file mode 100644 index 00000000..b3e8564e --- /dev/null +++ b/modules/antismash/antismashlite/meta.yml @@ -0,0 +1,128 @@ +name: antismash_antismashlite +description: | + antiSMASH allows the rapid genome-wide identification, annotation + and analysis of secondary metabolite biosynthesis gene clusters. +keywords: + - secondary metabolites + - BGC + - biosynthetic gene cluster + - genome mining + - NRPS + - RiPP + - antibiotics + - prokaryotes + - bacteria + - eukaryotes + - fungi + - antismash + +tools: + - antismashlite: + description: "antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell" + homepage: "https://docs.antismash.secondarymetabolites.org" + documentation: "https://docs.antismash.secondarymetabolites.org" + tool_dev_url: "https://github.com/antismash/antismash" + doi: "10.1093/nar/gkab335" + licence: "['AGPL v3']" + +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. 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 + pattern: "*.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" + - clusterblast_file: + 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/}" + - knownclusterblast_html: + type: file + description: Tables with MIBiG hits in HTML format + pattern: "knownclusterblast/region*/ctg*.html" + - knownclusterblast_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" + - svg_files_knownclusterblast: + 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" + - json_results: + 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" + - 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" + - clusterblastoutput: + 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" + - knownclusterblastoutput: + 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" + +authors: + - "@jasmezz" diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..a0928333 --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,56 @@ +process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { + label 'process_low' + + conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' : + 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" + + /* + These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input 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. This is solely for use for CI tests of the nf-core/module version of antiSMASH. + Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them. + These files are also emitted as output channels in this module to enable the antismash-lite module to use them as mount volumes to the docker/singularity containers. + */ + + containerOptions { + workflow.containerEngine == 'singularity' ? + "-B $database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + workflow.containerEngine == 'docker' ? + "-v \$PWD/$database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + '' + } + + input: + path database_css + path database_detection + path database_modules + + output: + path("antismash_db") , emit: database + path("antismash_dir"), emit: antismash_dir + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + conda = params.enable_conda + """ + download-antismash-databases \\ + --database-dir antismash_db \\ + $args + + if [[ $conda = false ]]; \ + then \ + cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir; \ + else \ + cp -r \$(python -c 'import antismash;print(antismash.__file__.split("/__")[0])') antismash_dir; \ + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + antismash-lite: \$(antismash --version | sed 's/antiSMASH //') + END_VERSIONS + """ +} diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml new file mode 100644 index 00000000..f7ddf3b0 --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -0,0 +1,60 @@ +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. +keywords: + - secondary metabolites + - BGC + - biosynthetic gene cluster + - genome mining + - NRPS + - RiPP + - antibiotics + - prokaryotes + - bacteria + - eukaryotes + - fungi + - antismash + - database +tools: + - antismash: + description: antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell + homepage: https://docs.antismash.secondarymetabolites.org + documentation: https://docs.antismash.secondarymetabolites.org + tool_dev_url: https://github.com/antismash/antismash + doi: "10.1093/nar/gkab335" + licence: ["AGPL v3"] + +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" + +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_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" + +authors: + - "@jasmezz" diff --git a/modules/arriba/main.nf b/modules/arriba/main.nf index e0d30b45..b7883acd 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -2,15 +2,20 @@ process ARRIBA { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::arriba=2.1.0" : null) + conda (params.enable_conda ? "bioconda::arriba=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/arriba:2.1.0--h3198e80_1' : - 'quay.io/biocontainers/arriba:2.1.0--h3198e80_1' }" + 'https://depot.galaxyproject.org/singularity/arriba:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/arriba:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) path fasta path gtf + path blacklist + path known_fusions + path structural_variants + path tags + path protein_domains output: tuple val(meta), path("*.fusions.tsv") , emit: fusions @@ -23,7 +28,12 @@ process ARRIBA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def blacklist = (args.contains('-b')) ? '' : '-f blacklist' + def blacklist = blacklist ? "-b $blacklist" : "-f blacklist" + def known_fusions = known_fusions ? "-k $known_fusions" : "" + def structural_variants = structural_variants ? "-d $structual_variants" : "" + def tags = tags ? "-t $tags" : "" + def protein_domains = protein_domains ? "-p $protein_domains" : "" + """ arriba \\ -x $bam \\ @@ -32,6 +42,10 @@ process ARRIBA { -o ${prefix}.fusions.tsv \\ -O ${prefix}.fusions.discarded.tsv \\ $blacklist \\ + $known_fusions \\ + $structural_variants \\ + $tags \\ + $protein_domains \\ $args cat <<-END_VERSIONS > versions.yml @@ -39,4 +53,14 @@ process ARRIBA { arriba: \$(arriba -h | grep 'Version:' 2>&1 | sed 's/Version:\s//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo stub > ${prefix}.fusions.tsv + echo stub > ${prefix}.fusions.discarded.tsv + + echo "${task.process}:" > versions.yml + echo ' arriba: 2.2.1' >> versions.yml + """ } diff --git a/modules/arriba/meta.yml b/modules/arriba/meta.yml index 6ca16dab..119dd912 100644 --- a/modules/arriba/meta.yml +++ b/modules/arriba/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://arriba.readthedocs.io/en/latest/ tool_dev_url: https://github.com/suhrig/arriba doi: "10.1101/gr.257246.119" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -30,6 +30,26 @@ input: type: file description: Annotation GTF file pattern: "*.{gtf}" + - blacklist: + type: file + description: Blacklist file + pattern: "*.{tsv}" + - known_fusions: + type: file + description: Known fusions file + pattern: "*.{tsv}" + - structural_variants: + type: file + description: Structural variants file + pattern: "*.{tsv}" + - tags: + type: file + description: Tags file + pattern: "*.{tsv}" + - protein_domains: + type: file + description: Protein domains file + pattern: "*.{gff3}" output: - meta: @@ -51,4 +71,4 @@ output: pattern: "*.{fusions.discarded.tsv}" authors: - - "@praveenraj2018" + - "@praveenraj2018,@rannick" diff --git a/modules/artic/guppyplex/meta.yml b/modules/artic/guppyplex/meta.yml index 5056f908..fe288289 100644 --- a/modules/artic/guppyplex/meta.yml +++ b/modules/artic/guppyplex/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://artic.readthedocs.io/en/latest/ tool_dev_url: https://github.com/artic-network/fieldbioinformatics doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/artic/minion/main.nf b/modules/artic/minion/main.nf index af74b132..22a6fd87 100644 --- a/modules/artic/minion/main.nf +++ b/modules/artic/minion/main.nf @@ -13,7 +13,8 @@ process ARTIC_MINION { path sequencing_summary path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.reference.fasta") path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.scheme.bed") - path medaka_model + path medaka_model_file + val medaka_model_string val scheme val scheme_version @@ -44,7 +45,7 @@ process ARTIC_MINION { if (args.tokenize().contains('--medaka')) { fast5 = "" summary = "" - model = file(medaka_model).exists() ? "--medaka-model ./$medaka_model" : "--medaka-model $medaka_model" + model = medaka_model_file ? "--medaka-model ./$medaka_model_file" : "--medaka-model $medaka_model_string" } def hd5_plugin_path = task.ext.hd5_plugin_path ? "export HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "export HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin" """ diff --git a/modules/artic/minion/meta.yml b/modules/artic/minion/meta.yml index 464e1dc7..c0f97a0c 100644 --- a/modules/artic/minion/meta.yml +++ b/modules/artic/minion/meta.yml @@ -1,6 +1,6 @@ name: artic_minion description: | - Run the alignment/variant-call/consensus logic of the artic pipeline + Run the alignment/variant-call/consensus logic of the artic pipeline keywords: - artic - aggregate @@ -12,7 +12,7 @@ tools: documentation: https://artic.readthedocs.io/en/latest/ tool_dev_url: https://github.com/artic-network/fieldbioinformatics doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map @@ -21,11 +21,11 @@ input: e.g. [ id:'test', single_end:false ] - fastq: type: file - description: FastQ file containing reads + description: FastQ file containing reads pattern: "*.{fastq.gz}" - fast5_dir: type: directory - description: Directory containing MinION FAST5 files + description: Directory containing MinION FAST5 files pattern: "*" - sequencing_summary: type: file @@ -42,11 +42,16 @@ input: bed files containing coordinates of each primer in the scheme, relative to the reference genome pattern: "*.{scheme.bed}" - - medaka_model: + - medaka_model_file: type: file description: | - Medaka model to use (if option --medaka is set) - pattern: "*.*" + Medaka model file to use (if option --medaka is set) + pattern: "*.hdf5" + - medaka_model_string: + type: value + description: | + Medaka model string to use (if option --medaka is set) + pattern: "*" - scheme: type: value description: Name of the primer scheme diff --git a/modules/ascat/main.nf b/modules/ascat/main.nf new file mode 100644 index 00000000..35f262dd --- /dev/null +++ b/modules/ascat/main.nf @@ -0,0 +1,155 @@ +process ASCAT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::ascat=3.0.0 bioconda::cancerit-allelecount-4.3.0": null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:dfe5aaa885de434adb2b490b68972c5840c6d761-0': + 'quay.io/biocontainers/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:dfe5aaa885de434adb2b490b68972c5840c6d761-0' }" + + input: + tuple val(meta), path(input_normal), path(index_normal), path(input_tumor), path(index_tumor) + path(allele_files) + path(loci_files) + + output: + tuple val(meta), path("*png"), emit: png + tuple val(meta), path("*cnvs.txt"), emit: cnvs + tuple val(meta), path("*purityploidy.txt"), emit: purityploidy + tuple val(meta), path("*segments.txt"), emit: segments + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def gender = args.gender ? "$args.gender" : "NULL" + def genomeVersion = args.genomeVersion ? "$args.genomeVersion" : "NULL" + def purity = args.purity ? "$args.purity" : "NULL" + def ploidy = args.ploidy ? "$args.ploidy" : "NULL" + def gc_files = args.gc_files ? "$args.gc_files" : "NULL" + + def minCounts_arg = args.minCounts ? ",minCounts = $args.minCounts" : "" + def chrom_names_arg = args.chrom_names ? ",chrom_names = $args.chrom_names" : "" + def min_base_qual_arg = args.min_base_qual ? ",min_base_qual = $args.min_base_qual" : "" + def min_map_qual_arg = args.min_map_qual ? ",min_map_qual = $args.min_map_qual" : "" + def ref_fasta_arg = args.ref_fasta ? ",ref.fasta = '$args.ref_fasta'" : "" + def skip_allele_counting_tumour_arg = args.skip_allele_counting_tumour ? ",skip_allele_counting_tumour = $args.skip_allele_counting_tumour" : "" + def skip_allele_counting_normal_arg = args.skip_allele_counting_normal ? ",skip_allele_counting_normal = $args.skip_allele_counting_normal" : "" + + + + """ + #!/usr/bin/env Rscript + library(RColorBrewer) + library(ASCAT) + options(bitmapType='cairo') + + + #prepare from BAM files + ascat.prepareHTS( + tumourseqfile = "$input_tumor", + normalseqfile = "$input_normal", + tumourname = "Tumour", + normalname = "Normal", + allelecounter_exe = "alleleCounter", + alleles.prefix = "$allele_files", + loci.prefix = "$loci_files", + gender = "$gender", + genomeVersion = "$genomeVersion", + nthreads = $task.cpus + $minCounts_arg + $chrom_names_arg + $min_base_qual_arg + $min_map_qual_arg + $ref_fasta_arg + $skip_allele_counting_tumour_arg + $skip_allele_counting_normal_arg + ) + + + #Load the data + ascat.bc = ascat.loadData( + Tumor_LogR_file = "Tumour_tumourLogR.txt", + Tumor_BAF_file = "Tumour_normalBAF.txt", + Germline_LogR_file = "Tumour_normalLogR.txt", + Germline_BAF_file = "Tumour_normalBAF.txt", + genomeVersion = "$genomeVersion", + gender = "$gender" + ) + + #optional GC wave correction + if(!is.null($gc_files)){ + ascat.bc = ascat.GCcorrect(ascat.bc, $gc_files) + } + + #Plot the raw data + ascat.plotRawData(ascat.bc) + + #Segment the data + ascat.bc = ascat.aspcf(ascat.bc) + + #Plot the segmented data + ascat.plotSegmentedData(ascat.bc) + + #Run ASCAT to fit every tumor to a model, inferring ploidy, normal cell contamination, and discrete copy numbers + #If psi and rho are manually set: + if (!is.null($purity) && !is.null($ploidy)){ + ascat.output <- ascat.runAscat(ascat.bc, gamma=1, rho_manual=$purity, psi_manual=$ploidy) + } else if(!is.null($purity) && is.null($ploidy)){ + ascat.output <- ascat.runAscat(ascat.bc, gamma=1, rho_manual=$purity) + } else if(!is.null($ploidy) && is.null($purity)){ + ascat.output <- ascat.runAscat(ascat.bc, gamma=1, psi_manual=$ploidy) + } else { + ascat.output <- ascat.runAscat(ascat.bc, gamma=1) + } + + #Write out segmented regions (including regions with one copy of each allele) + write.table(ascat.output[["segments"]], file=paste0("$prefix", ".segments.txt"), sep="\t", quote=F, row.names=F) + + #Write out CNVs in bed format + cnvs=ascat.output[["segments"]][2:6] + write.table(cnvs, file=paste0("$prefix",".cnvs.txt"), sep="\t", quote=F, row.names=F, col.names=T) + + #Write out purity and ploidy info + summary <- tryCatch({ + matrix(c(ascat.output[["aberrantcellfraction"]], ascat.output[["ploidy"]]), ncol=2, byrow=TRUE)}, error = function(err) { + # error handler picks up where error was generated + print(paste("Could not find optimal solution: ",err)) + return(matrix(c(0,0),nrow=1,ncol=2,byrow = TRUE)) + } + ) + colnames(summary) <- c("AberrantCellFraction","Ploidy") + write.table(summary, file=paste0("$prefix",".purityploidy.txt"), sep="\t", quote=F, row.names=F, col.names=T) + + #version export. Have to hardcode process name and software name because + #won't run inside an R-block + version_file_path="versions.yml" + f <- file(version_file_path,"w") + writeLines("ASCAT:", f) + writeLines(" ascat: 3.0.0",f) + close(f) + """ + + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo stub > ${prefix}.cnvs.txt + echo stub > ${prefix}.purityploidy.txt + echo stub > ${prefix}.segments.txt + echo stub > Tumour.ASCATprofile.png + echo stub > Tumour.ASPCF.png + echo stub > Tumour.germline.png + echo stub > Tumour.rawprofile.png + echo stub > Tumour.sunrise.png + echo stub > Tumour.tumour.png + + echo 'ASCAT:' > versions.yml + echo ' ascat: 3.0.0' >> versions.yml + """ + + +} diff --git a/modules/ascat/meta.yml b/modules/ascat/meta.yml new file mode 100644 index 00000000..00d86069 --- /dev/null +++ b/modules/ascat/meta.yml @@ -0,0 +1,92 @@ +name: ascat +description: copy number profiles of tumour cells. +keywords: + - sort +tools: + - ascat: + description: ASCAT is a method to derive copy number profiles of tumour cells, accounting for normal cell admixture and tumour aneuploidy. ASCAT infers tumour purity (the fraction of tumour cells) and ploidy (the amount of DNA per tumour cell), expressed as multiples of haploid genomes from SNP array or massively parallel sequencing data, and calculates whole-genome allele-specific copy number profiles (the number of copies of both parental alleles for all SNP loci across the genome). + homepage: None + documentation: None + tool_dev_url: https://github.com/Crick-CancerGenomics/ascat + doi: "10.1093/bioinformatics/btaa538" + licence: ["GPL v3"] + +input: + - args: + type: map + description: | + Groovy Map containing tool parameters. MUST follow the structure/keywords below and be provided via modules.config. Parameters must be set between quotes. (optional) parameters can be removed from the map, if they are not set. For default values, please check the documentation above. + + ``` + { + [ + "gender": "XX", + "genomeVersion": "hg19" + "purity": (optional), + "ploidy": (optional), + "gc_files": (optional), + "minCounts": (optional), + "chrom_names": (optional), + "min_base_qual": (optional), + "min_map_qual": (optional), + "ref_fasta": (optional), + "skip_allele_counting_tumour": (optional), + "skip_allele_counting_normal": (optional) + ] + } + ``` + + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input_normal: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index_normal: + type: file + description: index for normal_bam + pattern: "*.{bai}" + - input_tumor: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index_tumor: + type: file + description: index for tumor_bam + pattern: "*.{bai}" + - allele_files: + type: file + description: allele files for ASCAT. Can be downloaded here https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS + - loci_files: + type: file + description: loci files for ASCAT. Can be downloaded here https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS +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" + - png: + type: file + description: ASCAT plots + pattern: "*.{png}" + - purityploidy: + type: file + description: purity and ploidy data + pattern: "*.purityploidy.txt" + - segments: + type: file + description: segments data + pattern: "*.segments.txt" +authors: + - "@aasNGC" + - "@lassefolkersen" + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/assemblyscan/meta.yml b/modules/assemblyscan/meta.yml index 40ea98b9..7b0b67fa 100644 --- a/modules/assemblyscan/meta.yml +++ b/modules/assemblyscan/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/rpetit3/assembly-scan tool_dev_url: https://github.com/rpetit3/assembly-scan doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/ataqv/ataqv/meta.yml b/modules/ataqv/ataqv/meta.yml index 760bf95f..a25272da 100644 --- a/modules/ataqv/ataqv/meta.yml +++ b/modules/ataqv/ataqv/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://github.com/ParkerLab/ataqv/blob/master/README.rst tool_dev_url: https://github.com/ParkerLab/ataqv doi: "https://doi.org/10.1016/j.cels.2020.02.009" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/bakta/main.nf b/modules/bakta/main.nf index 95e87899..70b2ecdb 100644 --- a/modules/bakta/main.nf +++ b/modules/bakta/main.nf @@ -2,10 +2,10 @@ process BAKTA { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bakta=1.2.2" : null) + conda (params.enable_conda ? "bioconda::bakta=1.4.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bakta:1.2.2--pyhdfd78af_0' : - 'quay.io/biocontainers/bakta:1.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/bakta:1.4.0--pyhdfd78af_1' : + 'quay.io/biocontainers/bakta:1.4.0--pyhdfd78af_1' }" input: tuple val(meta), path(fasta) @@ -23,6 +23,7 @@ process BAKTA { tuple val(meta), path("${prefix}.hypotheticals.tsv"), emit: hypotheticals_tsv tuple val(meta), path("${prefix}.hypotheticals.faa"), emit: hypotheticals_faa tuple val(meta), path("${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}.txt") , emit: txt path "versions.yml" , emit: versions when: @@ -61,6 +62,7 @@ process BAKTA { touch ${prefix}.hypotheticals.tsv touch ${prefix}.hypotheticals.faa touch ${prefix}.tsv + touch ${prefix}.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bakta/meta.yml b/modules/bakta/meta.yml index 29e6edbe..63f55ff3 100644 --- a/modules/bakta/meta.yml +++ b/modules/bakta/meta.yml @@ -1,17 +1,17 @@ name: bakta -description: Rapid annotation of bacterial genomes & plasmids. +description: Annotation of bacterial genomes (isolates, MAGs) and plasmids keywords: - annotation - fasta - - prokaryote + - bacteria tools: - bakta: - description: Rapid & standardized annotation of bacterial genomes & plasmids. + description: Rapid & standardized annotation of bacterial genomes, MAGs & plasmids. homepage: https://github.com/oschwengers/bakta documentation: https://github.com/oschwengers/bakta tool_dev_url: https://github.com/oschwengers/bakta doi: "10.1099/mgen.0.000685" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -29,7 +29,7 @@ input: Path to the Bakta database - proteins: type: file - description: FASTA file of trusted proteins to first annotate from (optional) + description: FASTA/GenBank file of trusted proteins to first annotate from (optional) - prodigal_tf: type: file description: Training file to use for Prodigal (optional) @@ -44,6 +44,10 @@ output: 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 @@ -74,7 +78,7 @@ output: pattern: "*.ffn" - hypotheticals_tsv: type: file - description: further information on hypothetical protein CDS as simple human readble tab separated values + description: additional information on hypothetical protein CDS as simple human readble tab separated values pattern: "*.hypotheticals.tsv" - hypotheticals_faa: type: file @@ -83,3 +87,4 @@ output: authors: - "@rpetit3" + - "@oschwengers" diff --git a/modules/bamaligncleaner/meta.yml b/modules/bamaligncleaner/meta.yml index d1e171f7..f248c1ad 100644 --- a/modules/bamaligncleaner/meta.yml +++ b/modules/bamaligncleaner/meta.yml @@ -8,7 +8,7 @@ tools: homepage: https://github.com/maxibor/bamAlignCleaner documentation: https://github.com/maxibor/bamAlignCleaner tool_dev_url: https://github.com/maxibor/bamAlignCleaner - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/bamcmp/meta.yml b/modules/bamcmp/meta.yml index 480d8609..36a5ff1b 100644 --- a/modules/bamcmp/meta.yml +++ b/modules/bamcmp/meta.yml @@ -10,14 +10,15 @@ keywords: tools: - bamcmp: - description: Bamcmp is a tool for deconvolving host and graft reads, using two bam files. Reads should be mapped to two genomes, and the mapped, - sorted bam files supplied to the tool. It is highly recommended to use the "-s as" option not the "-s mapq" option, else - reads which multimap to the contamination genome will be spuriously kept. + description: + Bamcmp is a tool for deconvolving host and graft reads, using two bam files. Reads should be mapped to two genomes, and the mapped, + sorted bam files supplied to the tool. It is highly recommended to use the "-s as" option not the "-s mapq" option, else + reads which multimap to the contamination genome will be spuriously kept. homepage: https://github.com/CRUKMI-ComputationalBiology/bamcmp documentation: https://github.com/CRUKMI-ComputationalBiology/bamcmp tool_dev_url: https://github.com/CRUKMI-ComputationalBiology/bamcmp doi: "10.1158/1541-7786.MCR-16-0431" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/bamtools/convert/meta.yml b/modules/bamtools/convert/meta.yml index acc7e4df..5796a4ab 100644 --- a/modules/bamtools/convert/meta.yml +++ b/modules/bamtools/convert/meta.yml @@ -19,7 +19,7 @@ tools: documentation: https://github.com/pezmaster31/bamtools/wiki tool_dev_url: http://github.com/pezmaster31/bamtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 014e5cdb..aaa5b663 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -2,10 +2,10 @@ process BAMTOOLS_SPLIT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : - 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' : + 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }" input: tuple val(meta), path(bam) @@ -20,11 +20,15 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') """ bamtools \\ - split \\ - -in $bam \\ - $args + merge \\ + $input_list \\ + | bamtools \\ + split \\ + -stub $prefix \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index b9b52f59..8af701f0 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/pezmaster31/bamtools/wiki tool_dev_url: http://github.com/pezmaster31/bamtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -23,7 +23,7 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A BAM file to split + description: A list of one or more BAM files to merge and then split pattern: "*.bam" output: @@ -43,3 +43,4 @@ output: authors: - "@sguizard" + - "@matthdsm" diff --git a/modules/bamutil/trimbam/meta.yml b/modules/bamutil/trimbam/meta.yml index a91ba0e1..29f8c951 100644 --- a/modules/bamutil/trimbam/meta.yml +++ b/modules/bamutil/trimbam/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://genome.sph.umich.edu/wiki/BamUtil:_trimBam tool_dev_url: https://github.com/statgen/bamUtil doi: "10.1101/gr.176552.114" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/bandage/image/meta.yml b/modules/bandage/image/meta.yml index 1c2b9840..1e824c4f 100644 --- a/modules/bandage/image/meta.yml +++ b/modules/bandage/image/meta.yml @@ -1,44 +1,44 @@ name: bandage_image description: Render an assembly graph in GFA 1.0 format to PNG and SVG image formats keywords: - - gfa - - graph - - assembly - - visualisation + - gfa + - graph + - assembly + - visualisation tools: - - bandage: - description: | - Bandage - a Bioinformatics Application for Navigating De novo Assembly Graphs Easily - homepage: https://github.com/rrwick/Bandage - documentation: https://github.com/rrwick/Bandage - licence: ['GPL-3.0-or-later'] + - bandage: + description: | + Bandage - a Bioinformatics Application for Navigating De novo Assembly Graphs Easily + homepage: https://github.com/rrwick/Bandage + documentation: https://github.com/rrwick/Bandage + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gfa: - type: file - description: Assembly graph in GFA 1.0 format - pattern: "*.gfa" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gfa: + type: file + description: Assembly graph in GFA 1.0 format + pattern: "*.gfa" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - png: - type: file - description: Bandage image in PNG format - pattern: "*.png" - - svg: - type: file - description: Bandage image in SVG format - pattern: "*.svg" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - png: + type: file + description: Bandage image in PNG format + pattern: "*.png" + - svg: + type: file + description: Bandage image in SVG format + pattern: "*.svg" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/bbmap/align/main.nf b/modules/bbmap/align/main.nf index 914399c5..aa1fbe1a 100644 --- a/modules/bbmap/align/main.nf +++ b/modules/bbmap/align/main.nf @@ -2,10 +2,10 @@ process BBMAP_ALIGN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.13 pigz=2.6" : null) + conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.15.1 pigz=2.6" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' : - 'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' : + 'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' }" input: tuple val(meta), path(fastq) diff --git a/modules/bbmap/align/meta.yml b/modules/bbmap/align/meta.yml index fe4d4334..a4682aee 100644 --- a/modules/bbmap/align/meta.yml +++ b/modules/bbmap/align/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ tool_dev_url: None doi: "" - licence: ['UC-LBL license (see package)'] + licence: ["UC-LBL license (see package)"] input: - meta: @@ -24,14 +24,14 @@ input: - fastq: type: file description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. - ref: type: file description: | - Either "ref" a directory containing an index, the name of another directory - with a "ref" subdirectory containing an index or the name of a fasta formatted - nucleotide file containg the reference to map to. + Either "ref" a directory containing an index, the name of another directory + with a "ref" subdirectory containing an index or the name of a fasta formatted + nucleotide file containg the reference to map to. output: - meta: diff --git a/modules/bbmap/bbduk/meta.yml b/modules/bbmap/bbduk/meta.yml index 50ab6ed4..6abd3d97 100644 --- a/modules/bbmap/bbduk/meta.yml +++ b/modules/bbmap/bbduk/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ tool_dev_url: None doi: "" - licence: ['UC-LBL license (see package)'] + licence: ["UC-LBL license (see package)"] input: - meta: @@ -20,14 +20,14 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. - contaminants: - type: file - description: | - Reference files containing adapter and/or contaminant sequences for sequence kmer matching + type: file + description: | + Reference files containing adapter and/or contaminant sequences for sequence kmer matching output: - meta: diff --git a/modules/bbmap/bbsplit/meta.yml b/modules/bbmap/bbsplit/meta.yml index 2e3d07c0..9d9f10da 100644 --- a/modules/bbmap/bbsplit/meta.yml +++ b/modules/bbmap/bbsplit/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ tool_dev_url: None doi: "" - licence: ['UC-LBL license (see package)'] + licence: ["UC-LBL license (see package)"] input: - meta: diff --git a/modules/bbmap/index/meta.yml b/modules/bbmap/index/meta.yml index 0b3e5778..e8b455ed 100644 --- a/modules/bbmap/index/meta.yml +++ b/modules/bbmap/index/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ tool_dev_url: None doi: "" - licence: ['UC-LBL license (see package)'] + licence: ["UC-LBL license (see package)"] input: - fasta: diff --git a/modules/bbmap/pileup/main.nf b/modules/bbmap/pileup/main.nf new file mode 100644 index 00000000..1f34efc5 --- /dev/null +++ b/modules/bbmap/pileup/main.nf @@ -0,0 +1,39 @@ +process BBMAP_PILEUP { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.15.1 pigz=2.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' : + 'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.stats.txt"), emit: covstats + tuple val(meta), path("*.hist.txt") , emit: hist + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + pileup.sh \\ + -Xmx${task.memory.toGiga()}g \\ + in=${bam} \\ + out=${prefix}.coverage.stats.txt \\ + hist=${prefix}.coverage.hist.txt \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bbmap: \$(bbversion.sh) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ +} diff --git a/modules/bbmap/pileup/meta.yml b/modules/bbmap/pileup/meta.yml new file mode 100644 index 00000000..5cd85f9a --- /dev/null +++ b/modules/bbmap/pileup/meta.yml @@ -0,0 +1,47 @@ +name: "bbmap_pileup" +description: Calculates per-scaffold or per-base coverage information from an unsorted sam or bam file. +keywords: + - fasta + - genome + - coverage +tools: + - bbmap: + description: BBMap is a short read aligner, as well as various other bioinformatic tools. + homepage: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ + documentation: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/ + tool_dev_url: "https://github.com/BioInfoTools/BBMap/blob/master/sh/pileup.sh" + doi: "" + licence: ["UC-LBL license (see package)"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - stats: + type: file + description: Per-scaffold coverage info + pattern: "*.stats.txt" + - hist: + type: file + description: "Histogram of # occurrences of each depth level" + pattern: "*.hist.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@Emiller88" diff --git a/modules/bcftools/annotate/main.nf b/modules/bcftools/annotate/main.nf new file mode 100644 index 00000000..40e32047 --- /dev/null +++ b/modules/bcftools/annotate/main.nf @@ -0,0 +1,42 @@ +process BCFTOOLS_ANNOTATE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::bcftools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bcftools:1.15--haf5b3da_0': + 'quay.io/biocontainers/bcftools:1.15--haf5b3da_0' }" + + input: + tuple val(meta), path(input) + + output: + tuple val(meta), path("*_annotated.vcf.gz"), optional:true , emit: vcf + tuple val(meta), path("*_annotated.bcf") , optional:true , emit: bcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def matcher = input ==~ /\S+\.*vcf\.\S*/ + def output_suffix = matcher ? "vcf.gz" : "bcf" + def output_type_compressed = matcher ? "z" : "b" + """ + bcftools \\ + annotate \\ + $args \\ + --output ${prefix}_annotated.${output_suffix} \\ + --output-type $output_type_compressed \\ + --threads $task.cpus \\ + $input + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$( bcftools --version |& sed '1!d; s/^.*bcftools //' ) + END_VERSIONS + """ +} diff --git a/modules/bcftools/annotate/meta.yml b/modules/bcftools/annotate/meta.yml new file mode 100644 index 00000000..afe447c1 --- /dev/null +++ b/modules/bcftools/annotate/meta.yml @@ -0,0 +1,45 @@ +name: bcftools_annotate +description: Add or remove annotations. +keywords: + - bcftools + - annotate + - vcf + - remove + - add +tools: + - annotate: + description: Add or remove annotations. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: https://samtools.github.io/bcftools/bcftools.html#annotate + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: files + description: Query VCF or BCF file, can be either uncompressed or compressed +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" + - vcf: + type: file + description: Compressed annotated VCF file + pattern: "*_annotated.vcf.gz" + - bcf: + type: file + description: Compressed annotated BCF file + pattern: "*_annotated.bcf" +authors: + - "@projectoriented" diff --git a/modules/bcftools/concat/meta.yml b/modules/bcftools/concat/meta.yml index b2848595..3984276f 100644 --- a/modules/bcftools/concat/meta.yml +++ b/modules/bcftools/concat/meta.yml @@ -1,43 +1,43 @@ name: bcftools_concat description: Concatenate VCF files keywords: - - variant calling - - concat - - bcftools - - VCF + - variant calling + - concat + - bcftools + - VCF tools: - - concat: - description: | - Concatenate VCF files. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - concat: + description: | + Concatenate VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcfs: - type: files - description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: files + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF concatenated output file - pattern: "*.{vcf.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF concatenated output file + pattern: "*.{vcf.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" diff --git a/modules/bcftools/consensus/meta.yml b/modules/bcftools/consensus/meta.yml index 761115a6..05a93a56 100644 --- a/modules/bcftools/consensus/meta.yml +++ b/modules/bcftools/consensus/meta.yml @@ -1,49 +1,49 @@ name: bcftools_consensus description: Compresses VCF files keywords: - - variant calling - - consensus - - VCF + - variant calling + - consensus + - VCF tools: - - consensus: - description: | - Create consensus sequence by applying VCF variants to a reference fasta file. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - consensus: + description: | + Create consensus sequence by applying VCF variants to a reference fasta file. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf}" - - tbi: - type: file - description: tabix index file - pattern: "*.{tbi}" - - fasta: - type: file - description: FASTA reference file - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf}" + - tbi: + type: file + description: tabix index file + pattern: "*.{tbi}" + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: FASTA reference consensus file - pattern: "*.{fasta,fa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA reference consensus file + pattern: "*.{fasta,fa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/filter/meta.yml b/modules/bcftools/filter/meta.yml index 72d28bf0..05a6d828 100644 --- a/modules/bcftools/filter/meta.yml +++ b/modules/bcftools/filter/meta.yml @@ -1,41 +1,41 @@ name: bcftools_filter description: Filters VCF files keywords: - - variant calling - - filtering - - VCF + - variant calling + - filtering + - VCF tools: - - filter: - description: | - Apply fixed-threshold filters to VCF files. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - filter: + description: | + Apply fixed-threshold filters to VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF input file - pattern: "*.{vcf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF input file + pattern: "*.{vcf}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF filtered output file - pattern: "*.{vcf}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF filtered output file + pattern: "*.{vcf}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/index/meta.yml b/modules/bcftools/index/meta.yml index 0d5dd3ef..b883fa5f 100644 --- a/modules/bcftools/index/meta.yml +++ b/modules/bcftools/index/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://samtools.github.io/bcftools/howtos/index.html tool_dev_url: https://github.com/samtools/bcftools doi: "10.1093/gigascience/giab008" - licence: ['MIT', 'GPL-3.0-or-later'] + licence: ["MIT", "GPL-3.0-or-later"] input: - meta: diff --git a/modules/bcftools/isec/meta.yml b/modules/bcftools/isec/meta.yml index d0be6dce..d9554bcc 100644 --- a/modules/bcftools/isec/meta.yml +++ b/modules/bcftools/isec/meta.yml @@ -1,49 +1,49 @@ name: bcftools_isec description: Apply set operations to VCF files keywords: - - variant calling - - intersect - - union - - complement - - VCF + - variant calling + - intersect + - union + - complement + - VCF tools: - - isec: - description: | - Computes intersections, unions and complements of VCF files. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - isec: + description: | + Computes intersections, unions and complements of VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcfs: - type: files - description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] - - tbis: - type: files - description: | - List containing the tbi index files corresponding to the vcfs input files - e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: files + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] + - tbis: + type: files + description: | + List containing the tbi index files corresponding to the vcfs input files + e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - results: - type: directory - description: Folder containing the set operations results perform on the vcf files - pattern: "${prefix}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: directory + description: Folder containing the set operations results perform on the vcf files + pattern: "${prefix}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/merge/meta.yml b/modules/bcftools/merge/meta.yml index c7e3a280..4223fd54 100644 --- a/modules/bcftools/merge/meta.yml +++ b/modules/bcftools/merge/meta.yml @@ -1,47 +1,47 @@ name: bcftools_merge description: Merge VCF files keywords: - - variant calling - - merge - - VCF + - variant calling + - merge + - VCF tools: - - merge: - description: | - Merge VCF files. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - merge: + description: | + Merge VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcfs: - type: files - description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] - - tbis: - type: files - description: | - List containing the tbi index files corresponding to the vcfs input files - e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: files + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] + - tbis: + type: files + description: | + List containing the tbi index files corresponding to the vcfs input files + e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF merged output file - pattern: "*.{vcf.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF merged output file + pattern: "*.{vcf.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/mpileup/meta.yml b/modules/bcftools/mpileup/meta.yml index 483d0e71..d10dac14 100644 --- a/modules/bcftools/mpileup/meta.yml +++ b/modules/bcftools/mpileup/meta.yml @@ -1,57 +1,57 @@ name: bcftools_mpileup description: Compresses VCF files keywords: - - variant calling - - mpileup - - VCF + - variant calling + - mpileup + - VCF tools: - - mpileup: - description: | - Generates genotype likelihoods at each genomic position with coverage. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - mpileup: + description: | + Generates genotype likelihoods at each genomic position with coverage. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Input BAM file - pattern: "*.{bam}" - - fasta: - type: file - description: FASTA reference file - pattern: "*.{fasta,fa}" - - save_mpileup: - type: boolean - description: Save mpileup file generated by bcftools mpileup - patter: "*.mpileup" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" + - save_mpileup: + type: boolean + description: Save mpileup file generated by bcftools mpileup + patter: "*.mpileup" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF gzipped output file - pattern: "*.{vcf.gz}" - - tbi: - type: file - description: tabix index file - pattern: "*.{tbi}" - - stats: - type: file - description: Text output file containing stats - pattern: "*{stats.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF gzipped output file + pattern: "*.{vcf.gz}" + - tbi: + type: file + description: tabix index file + pattern: "*.{tbi}" + - stats: + type: file + description: Text output file containing stats + pattern: "*{stats.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/norm/main.nf b/modules/bcftools/norm/main.nf index cd681f21..b81a4310 100644 --- a/modules/bcftools/norm/main.nf +++ b/modules/bcftools/norm/main.nf @@ -34,4 +34,15 @@ process BCFTOOLS_NORM { bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/bcftools/norm/meta.yml b/modules/bcftools/norm/meta.yml index 27978a53..ce4aee85 100644 --- a/modules/bcftools/norm/meta.yml +++ b/modules/bcftools/norm/meta.yml @@ -6,41 +6,41 @@ keywords: - variant calling - VCF tools: - - norm: - description: | - Normalize VCF files. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - norm: + description: | + Normalize VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - The vcf file to be normalized - e.g. 'file1.vcf' - - fasta: - type: file - description: FASTA reference file - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be normalized + e.g. 'file1.vcf' + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF normalized output file - pattern: "*.{vcf.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF normalized output file + pattern: "*.{vcf.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@abhi18av" + - "@abhi18av" diff --git a/modules/bcftools/query/meta.yml b/modules/bcftools/query/meta.yml index e49f13c8..fd4fd473 100644 --- a/modules/bcftools/query/meta.yml +++ b/modules/bcftools/query/meta.yml @@ -6,56 +6,56 @@ keywords: - bcftools - VCF tools: - - query: - description: | - Extracts fields from VCF or BCF files and outputs them in user-defined format. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - query: + description: | + Extracts fields from VCF or BCF files and outputs them in user-defined format. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - The vcf file to be qeuried. - pattern: "*.{vcf.gz, vcf}" - - tbi: - type: file - description: | - The tab index for the VCF file to be inspected. - pattern: "*.tbi" - - regions: - type: file - description: | - Optionally, restrict the operation to regions listed in this file. - - targets: - type: file - description: | - Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) - - samples: - type: file - description: | - Optional, file of sample names to be included or excluded. - e.g. 'file.tsv' + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be qeuried. + pattern: "*.{vcf.gz, vcf}" + - tbi: + type: file + description: | + The tab index for the VCF file to be inspected. + pattern: "*.tbi" + - regions: + type: file + description: | + Optionally, restrict the operation to regions listed in this file. + - targets: + type: file + description: | + Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) + - samples: + type: file + description: | + Optional, file of sample names to be included or excluded. + e.g. 'file.tsv' output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - txt: - type: file - description: BCFTools query output file - pattern: "*.txt" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - txt: + type: file + description: BCFTools query output file + pattern: "*.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@drpatelh" diff --git a/modules/bcftools/reheader/meta.yml b/modules/bcftools/reheader/meta.yml index ee8cba32..eaf44927 100644 --- a/modules/bcftools/reheader/meta.yml +++ b/modules/bcftools/reheader/meta.yml @@ -11,7 +11,7 @@ tools: homepage: http://samtools.github.io/bcftools/bcftools.html documentation: http://samtools.github.io/bcftools/bcftools.html#reheader doi: 10.1093/gigascience/giab008 - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/bcftools/sort/meta.yml b/modules/bcftools/sort/meta.yml index af894e82..0c244a48 100644 --- a/modules/bcftools/sort/meta.yml +++ b/modules/bcftools/sort/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html tool_dev_url: https://github.com/samtools/bcftools doi: "10.1093/bioinformatics/btp352" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/bcftools/stats/meta.yml b/modules/bcftools/stats/meta.yml index 505bf729..304b88ec 100644 --- a/modules/bcftools/stats/meta.yml +++ b/modules/bcftools/stats/meta.yml @@ -1,42 +1,42 @@ name: bcftools_stats description: Generates stats from VCF files keywords: - - variant calling - - stats - - VCF + - variant calling + - stats + - VCF tools: - - stats: - description: | - Parses VCF or BCF and produces text file stats which is suitable for - machine processing and can be plotted using plot-vcfstats. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - stats: + description: | + Parses VCF or BCF and produces text file stats which is suitable for + machine processing and can be plotted using plot-vcfstats. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF input file - pattern: "*.{vcf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF input file + pattern: "*.{vcf}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - stats: - type: file - description: Text output file containing stats - pattern: "*_{stats.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - stats: + type: file + description: Text output file containing stats + pattern: "*_{stats.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bcftools/view/main.nf b/modules/bcftools/view/main.nf index 2a240f4a..ca1121a5 100644 --- a/modules/bcftools/view/main.nf +++ b/modules/bcftools/view/main.nf @@ -41,4 +41,15 @@ process BCFTOOLS_VIEW { bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/bcftools/view/meta.yml b/modules/bcftools/view/meta.yml index df5b0f8f..326fd1fa 100644 --- a/modules/bcftools/view/meta.yml +++ b/modules/bcftools/view/meta.yml @@ -1,63 +1,63 @@ name: bcftools_view description: View, subset and filter VCF or BCF files by position and filtering expression. Convert between VCF and BCF keywords: - - variant calling - - view - - bcftools - - VCF + - variant calling + - view + - bcftools + - VCF tools: - - view: - description: | - View, subset and filter VCF or BCF files by position and filtering expression. Convert between VCF and BCF - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - view: + description: | + View, subset and filter VCF or BCF files by position and filtering expression. Convert between VCF and BCF + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - The vcf file to be inspected. - e.g. 'file.vcf' - - index: - type: file - description: | - The tab index for the VCF file to be inspected. - e.g. 'file.tbi' - - regions: - type: file - description: | - Optionally, restrict the operation to regions listed in this file. - e.g. 'file.vcf' - - targets: - type: file - description: | - Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) - e.g. 'file.vcf' - - samples: - type: file - description: | - Optional, file of sample names to be included or excluded. - e.g. 'file.tsv' + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be inspected. + e.g. 'file.vcf' + - index: + type: file + description: | + The tab index for the VCF file to be inspected. + e.g. 'file.tbi' + - regions: + type: file + description: | + Optionally, restrict the operation to regions listed in this file. + e.g. 'file.vcf' + - targets: + type: file + description: | + Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) + e.g. 'file.vcf' + - samples: + type: file + description: | + Optional, file of sample names to be included or excluded. + e.g. 'file.tsv' output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF normalized output file - pattern: "*.{vcf.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF normalized output file + pattern: "*.{vcf.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@abhi18av" + - "@abhi18av" diff --git a/modules/bclconvert/.gitignore b/modules/bclconvert/.gitignore new file mode 100644 index 00000000..45b0ea3a --- /dev/null +++ b/modules/bclconvert/.gitignore @@ -0,0 +1,2 @@ +bcl-convert +*.rpm diff --git a/modules/bclconvert/Dockerfile b/modules/bclconvert/Dockerfile new file mode 100644 index 00000000..df3e1d0f --- /dev/null +++ b/modules/bclconvert/Dockerfile @@ -0,0 +1,15 @@ +# Dockerfile to create container with bcl-convert +# Push to nfcore/bclconvert: + +FROM debian:bullseye-slim +LABEL authors="Matthias De Smet " \ + description="Docker image containing bcl-convert" +# Disclaimer: this container is not provided nor supported by Illumina +# 'ps' command is need by some nextflow executions to collect system stats +# Install procps and clean apt cache +RUN apt-get update \ + && apt-get install -y \ + procps \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* +COPY bcl-convert /usr/local/bin/bcl-convert +RUN chmod +x /usr/local/bin/bcl-convert diff --git a/modules/bclconvert/LICENSE b/modules/bclconvert/LICENSE new file mode 100644 index 00000000..6f523227 --- /dev/null +++ b/modules/bclconvert/LICENSE @@ -0,0 +1,30 @@ +ILLUMINA END-USER SOFTWARE LICENSE AGREEMENT + +IMPORTANT-READ CAREFULLY. THIS IS A LICENSE AGREEMENT THAT YOU ARE REQUIRED TO ACCEPT BEFORE, DOWNLOADING, INSTALLING AND USING ANY SOFTWARE MADE AVAILABLE FROM THE ILLUMINA SUPPORT CENTER (https://support.illumina.com). + +CAREFULLY READ ALL THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT BEFORE PROCEEDING WITH DOWNLOADING, INSTALLING, AND/OR USING THE SOFTWARE. YOU ARE NOT PERMITTED TO DOWNLOAD, INSTALL, AND/OR USE THE SOFTWARE UNTIL YOU HAVE AGREED TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. YOU REPRESENT AND WARRANT THAT YOU ARE DULY AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT ON BEHALF OF YOUR EMPLOYER. + +Software made available through the Illumina Support Center is licensed, not sold, to you. Your license to each software program made available through the Illumina Support Center is subject to your prior acceptance of either this Illumina End-User Software License Agreement (“Agreement”), or a custom end user license agreement (“Custom EULA”), if one is provided with the software. Any software that is subject to this Agreement is referred to herein as the “Software.” By accepting this Agreement, you agree the terms and conditions of this Agreement will apply to and govern any and all of your downloads, installations, and uses of each Illumina software program made available through the Illumina Support Center, except that your download, installation, and use of any software provided with a Custom EULA will be governed by the terms and conditions of the Custom EULA. + +This Agreement is made and entered into by and between Illumina, Inc., a Delaware corporation, having offices at 5200 Illumina Way, San Diego, CA 92122 (“Illumina”) and you as the end-user of the Software (hereinafter, “Licensee” or “you”). All software, firmware, and associated media, printed materials, and online and electronic documentation, including any updates or upgrades thereof, made available through the Illumina Support Center (collectively, “Software”) provided to Licensee are for use solely by Licensee and the provisions herein WILL apply with respect to such Software. + +License Grant. Subject to the terms and conditions of this Agreement, Illumina grants to Licensee, under the following terms and conditions, a personal, non-exclusive, revocable, non-transferable, non-sublicensable license, for its internal end-use purposes only, in the ordinary course of Licensee’s business to use the Software in executable object code form only, solely at the Licensee’s facility to, install and use the Software on a single computer accessible only by Licensee (and not on any public network or server), where the single computer is owned, leased, or otherwise substantially controlled by Licensee, for the purpose of processing and analyzing data generated from an Illumina genetic sequencing instrument owned and operated solely by Licensee (the “Product”). In the case of Software provided by Illumina in non-compiled form, Illumina grants Licensee a personal, non-exclusive, non-sublicenseable, restricted right to compile, install, and use one copy of the Software solely for processing and analyzing data generated from the Product. +License Restrictions. Except as expressly permitted in Section 1, Licensee may not make, have made, import, use, copy, reproduce, distribute, display, publish, sell, re-sell, lease, or sub-license the Software, in whole or in part, except as expressly provided for in this Agreement. Licensee may not modify, improve, translate, reverse engineer, decompile, disassemble, or create derivative works of the Software or otherwise attempt to (a) defeat, avoid, by-pass, remove, deactivate, or otherwise circumvent any software protection mechanisms in the Software including, without limitation, any such mechanism used to restrict or control the functionality of the Software, or (b) derive the source code or the underlying ideas, algorithms, structure, or organization form of the Software. Licensee will not allow, at any time, including during and after the term of the license, the Software or any portions or copies thereof in any form to become available to any third parties. Licensee may use the Software solely with genomic data that is generated using the Product; Licensee may not use the Software with any data generated from other products or instruments. Licensee may not use the Software to perform any data analysis services for any third party. +Ownership. The Software is protected by United States and international intellectual property laws. All right, title, and interest in and to the Software (including associated intellectual property rights) are and will remain vested in Illumina or Illumina’s affiliated companies or licensors. Licensee acknowledges that no rights, license or interest to any Illumina trademarks are granted hereunder. Licensee acknowledges that unauthorized reproduction or distribution of the Software, or any portion of it, may result in severe civil and criminal penalties. Illumina reserves all rights in and to the Software not expressly granted to Licensee under this Agreement. +Upgrades/Updates. Illumina may, at its sole discretion, provide updates or upgrades to the Software. In that case, Licensee WILL have the same rights and obligations under such updates or upgrades as it has for the versions of the Software initially provided to Licensee hereunder. Licensee recognizes that Illumina is not obligated to provide any upgrades or updates to, or support for, the Software. +Data Integrity/Loss. Licensee is responsible for the integrity and availability, including preventing the loss of data that Licensee generates, uses, analyzes, manages, or stores in connection with or through its use of the Software, including without limitation, investigating and implementing industry appropriate policies and procedures regarding the provision of access to Licensee’s data, monitoring access and use of Licensee’s data, conducting routine backups and archiving of Licensee’s data, and ensuring the adequacy of anti-virus software. Accordingly, Licensee agrees that Illumina is not responsible for any inability to access, loss or corruption of data as a result of Licensee’s use of the Software, and Illumina has no liability to Licensee in connection with such inability to access, loss or corruption of data. +Term of License. This Agreement will be in effect from the time Licensee expressly accepts the terms and conditions of this license, or otherwise installs the Software, thereby accepting the terms and conditions contained herein, and will remain in effect until terminated. This license will otherwise terminate upon the conditions set forth in this Agreement, if revoked by Illumina, or if Licensee fails to comply with any term or condition of this Agreement including failure to pay any applicable license fee. Licensee agrees upon termination of this Agreement for any reason to immediately discontinue use of and un-install the Software and destroy all copies of the Software in its possession and/or under its control, and return or destroy, at Illumina’s option, any compact disks, floppy disks or other media provided by Illumina storing the Software thereon (together with any authorized copies thereof), as well as any documentation associated therewith +Limited Warranty. Illumina warrants that, for a period of 6 months from the date of download or installation of the Software by Licensee, the Software will perform in all material respects in accordance with the accompanying documentation available on the Illumina Support Center. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN THE FOREGOING, AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED “AS IS” AND ILLUMINA EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS REGARDING THE SOFTWARE AND RESULTS GENERATED BY THE SOFTWARE, INCLUDING WITHOUT LIMITATION, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ALL OTHER EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABLE QUALITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALING OR USAGE OF TRADE. ILLUMINA DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE"S REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE ERROR FREE OR UNINTERRUPTED. +Limitation of Liability. +(a) ILLUMINA’S ENTIRE LIABILITY AND LICENSEE"S EXCLUSIVE REMEDY UNDER THE LIMITED WARRANTY PROVISION OF SECTION 7 ABOVE WILL BE, AT ILLUMINA’S OPTION, EITHER (i) RETURN OF THE PRICE PAID FOR THE SOFTWARE, OR (ii) REPAIR OR REPLACEMENT OF THE PORTIONS OF THE SOFTWARE THAT DO NOT COMPLY WITH ILLUMINA’S LIMITED WARRANTY. THIS LIMITED WARRANTY IS VOID AND ILLUMINA WILL HAVE NO LIABILITY AT ALL IF FAILURE OF THE SOFTWARE TO COMPLY WITH ILLUMINA LIMITED WARRANTY HAS RESULTED FROM: (w) FAILURE TO USE THE SOFTWARE IN ACCORDANCE WITH ILLUMINA’S THEN CURRENT USER MANUAL OR THIS AGREEMENT; (x) ACCIDENT, ABUSE, OR MISAPPLICATION; (y) PRODUCTS OR EQUIPMENT NOT SPECIFIED BY ILLUMINA AS BEING COMPATIBLE WITH THE SOFTWARE; OR (z) IF LICENSEE HAS NOT NOTIFIED ILLUMINA IN WRITING OF THE DEFECT WITHIN THE ABOVE WARRANTY PERIOD. + +(b) TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL ILLUMINA BE LIABLE UNDER ANY THEORY OF CONTRACT, TORT, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY PERSONAL INJURY OR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, EVEN IF ILLUMINA HAS BEEN ADVISED OF THE POSSIBILITY THEREOF INCLUDING, WITHOUT LIMITATION, LOST PROFITS, LOST DATA, INTERRUPTION OF BUSINESS, LOST BUSINESS REVENUE, OTHER ECONOMIC LOSS, OR ANY LOSS OF RECORDED DATA ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN SECTION 7 AND 8(a) ABOVE OR AS OTHERWISE PERMITTED BY LAW, IN NO EVENT WILL ILLUMINA’S TOTAL LIABILITY TO LICENSEE FOR ALL DAMAGES (OTHER THAN AS MAY BE REQUIRED BY APPLICABLE LAW IN CASES INVOLVING PERSONAL INJURY) EXCEED THE AMOUNT OF $500 USD. THE FOREGOING LIMITATIONS WILL APPLY EVEN IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. + +Survival. The limitations of liability and ownership rights of Illumina contained herein and Licensee’s obligations following termination of this Agreement WILL survive the termination of this Agreement for any reason. +Research Use Only. The Software is labeled with a For Research Use Only or similar labeling statement and the performance characteristics of the Software have not been established and the Software is not for use in diagnostic procedures. Licensee acknowledges and agrees that (i) the Software has not been approved, cleared, or licensed by the United States Food and Drug Administration or any other regulatory entity whether foreign or domestic for any specific intended use, whether research, commercial, diagnostic, or otherwise, and (ii) Licensee must ensure it has any regulatory approvals that are necessary for Licensee’s intended uses of the Software. Licensee will comply with all applicable laws and regulations when using and maintaining the Software. +General. Licensee may not sublicense, assign, share, pledge, rent or transfer any of its rights under this Agreement in relation to the Software or any portion thereof including documentation. Illumina reserves the right to change this Agreement at any time. When Illumina makes any changes, Illumina will provide the updated Agreement, or a link to it, on Illumina’s website (www.illumina.com) and such updated Agreement WILL become effective immediately. Licensee’s continued access to or use of the Software represents Licensee’s agreement to any revised Agreement. If one or more provisions of this Agreement are found to be invalid or unenforceable, this Agreement WILL not be rendered inoperative but the remaining provisions WILL continue in full force and effect. This Agreement constitutes the entire agreement between the parties with respect to the subject matter of this Agreement and merges all prior communications except that a “hard-copy” form of licensing agreement relating to the Software previously agreed to in writing by Illumina and Licensee WILL supersede and govern in the event of any conflicting provisions. +Governing Law. This Agreement WILL be governed by and construed in accordance with the laws of the state of California, USA, without regard to its conflicts of laws principles, and independent of where a suit or action hereunder may be filed. +U.S. Government End Users. If Licensee is a branch agency or instrumentality of the United States Government, the following provision applies. The Software is a “commercial item” as that term is defined at 48 C.F.R. 2.101, consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202 (as applicable). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4, all United States Government end users acquire the Software with only those rights set forth herein. +Contact. Any questions regarding legal rights, duties, obligations, or restrictions associated with the software hereunder should be directed to Illumina, Inc., 5200 Illumina Way, San Diego, CA 92122, Attention: Legal Department, Phone: (858) 202-4500, Fax: (858) 202-4599, web site: www.illumina.com . +Third Party Components. The Software may include third party software (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Licensed Software does not alter any rights or obligations Licensee may have under those open source or free software licenses. The licenses that govern the terms and conditions of use of the Third Party Programs included in the Licensed Software are provided in the READ ME provided with the Software. The READ ME also contains copyright statements for the various open source software components (or portions thereof) that are distributed with the Licensed Software. +END OF END-USER SOFTWARE LICENSE AGREEMENT. diff --git a/modules/bclconvert/README.md b/modules/bclconvert/README.md new file mode 100644 index 00000000..4f8538d0 --- /dev/null +++ b/modules/bclconvert/README.md @@ -0,0 +1,17 @@ +# Updating the docker container and making a new module release + +bcl-convert is a commercial tool from Illumina. The container provided for the bcl-convert nf-core module is not provided nor supported by Illumina. Updating the bcl-convert versions in the container and pushing the update to Dockerhub needs to be done manually. + +1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): download the rpm of the desired bcl-convert version with `curl` or `wget`. +2. Unpack the RPM package using `rpm2cpio bcl-convert-*.rpm | cpio -i --make-directories`. Place the executable located in `/usr/bin/bcl-convert` in the same folder where the Dockerfile lies. +3. Create and test the container: + + ```bash + docker build . -t nfcore/bclconvert: + ``` + +4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. + + ```bash + docker push nfcore/bclconvert: + ``` diff --git a/modules/bclconvert/main.nf b/modules/bclconvert/main.nf new file mode 100644 index 00000000..e6925b50 --- /dev/null +++ b/modules/bclconvert/main.nf @@ -0,0 +1,81 @@ +process BCLCONVERT { + tag '$samplesheet' + label 'process_high' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "nfcore/bclconvert:3.9.3" + + input: + path samplesheet + path run_dir + + output: + path "*.fastq.gz" ,emit: fastq + path "Reports/*.{csv,xml,bin}" ,emit: reports + path "Logs/*.{log,txt}" ,emit: logs + path "InterOp/*.bin" ,emit: interop + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + + """ + bcl-convert \ + $args \\ + --output-directory . \\ + --bcl-input-directory ${run_dir} \\ + --sample-sheet ${samplesheet} \\ + --bcl-num-parallel-tiles ${task.cpus} + + mkdir InterOp + cp ${run_dir}/InterOp/*.bin InterOp/ + mv Reports/*.bin InterOp/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ + + stub: + """ + echo "sample1_S1_L001_R1_001" > sample1_S1_L001_R1_001.fastq.gz + echo "sample1_S1_L001_R2_001" > sample1_S1_L001_R2_001.fastq.gz + echo "sample1_S1_L002_R1_001" > sample1_S1_L002_R1_001.fastq.gz + echo "sample1_S1_L002_R2_001" > sample1_S1_L002_R2_001.fastq.gz + echo "sample2_S2_L001_R1_001" > sample2_S2_L001_R1_001.fastq.gz + echo "sample2_S2_L001_R2_001" > sample2_S2_L001_R2_001.fastq.gz + echo "sample2_S2_L002_R1_001" > sample2_S2_L002_R1_001.fastq.gz + echo "sample2_S2_L002_R2_001" > sample2_S2_L002_R2_001.fastq.gz + + mkdir Reports + echo "Adapter_Metrics" > Reports/Adapter_Metrics.csv + echo "Demultiplex_Stats" > Reports/Demultiplex_Stats.csv + echo "fastq_list" > Reports/fastq_list.csv + echo "Index_Hopping_Counts" > Reports/Index_Hopping_Counts.csv + echo "IndexMetricsOut" > Reports/IndexMetricsOut.bin + echo "Quality_Metrics" > Reports/Quality_Metrics.csv + echo "RunInfo" > Reports/RunInfo.xml + echo "SampleSheet" > Reports/SampleSheet.csv + echo "Top_Unknown_Barcodes" > Reports/Top_Unknown_Barcodes.csv + + mkdir Logs + echo "Errors" > Logs/Errors.log + echo "FastqComplete" > Logs/FastqComplete.txt + echo "Info" > Logs/Info.log + echo "Warnings" > Logs/Warnings.log + + mkdir InterOp/ + echo "InterOp" > InterOp/InterOp.bin + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ +} diff --git a/modules/bclconvert/meta.yml b/modules/bclconvert/meta.yml new file mode 100644 index 00000000..5c59a978 --- /dev/null +++ b/modules/bclconvert/meta.yml @@ -0,0 +1,45 @@ +name: "bclconvert" +description: Demultiplex Illumina BCL files +keywords: + - demultiplex + - illumina + - fastq +tools: + - "bclconvert": + description: "Demultiplex Illumina BCL files" + homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html" + documentation: "https://support-docs.illumina.com/SW/BCL_Convert/Content/SW/FrontPages/BCL_Convert.htm" + licence: "ILLUMINA" + +input: + - samplesheet: + type: file + description: "Input samplesheet" + pattern: "*.{csv}" + - run_dir: + type: directory + description: "Input run directory containing RunInfo.xml and BCL data" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Demultiplexed FASTQ files + pattern: "*.{fastq.gz}" + - reports: + type: file + description: Demultiplexing Reports + pattern: "Reports/*.{csv,xml}" + - logs: + type: file + description: Log files + pattern: "Logs/*.{log,txt}" + - interop: + type: file + description: Interop files + pattern: "Interop/*.{bin}" +authors: + - "@matthdsm" diff --git a/modules/bedtools/bamtobed/meta.yml b/modules/bedtools/bamtobed/meta.yml index e8c67047..5a4ff73a 100644 --- a/modules/bedtools/bamtobed/meta.yml +++ b/modules/bedtools/bamtobed/meta.yml @@ -1,38 +1,38 @@ name: bedtools_bamtobed description: Converts a bam file to a bed12 file. keywords: - - bam - - bed + - bam + - bed tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Input BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Bed file containing genomic intervals. - pattern: "*.{bed}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed file containing genomic intervals. + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" - - "@drpatelh" + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/bedtools/complement/meta.yml b/modules/bedtools/complement/meta.yml index 2ad8749c..708a2161 100644 --- a/modules/bedtools/complement/meta.yml +++ b/modules/bedtools/complement/meta.yml @@ -1,43 +1,43 @@ name: bedtools_complement description: Returns all intervals in a genome that are not covered by at least one interval in the input BED/GFF/VCF file. keywords: - - bed - - complement + - bed + - complement tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Input BED file - pattern: "*.{bed}" - - sizes: - type: file - description: File which defines the chromosome lengths for a given genome - pattern: "*.{sizes}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Input BED file + pattern: "*.{bed}" + - sizes: + type: file + description: File which defines the chromosome lengths for a given genome + pattern: "*.{sizes}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Bed file with all genomic intervals that are not covered by at least one record from the input file. - pattern: "*.{bed}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed file with all genomic intervals that are not covered by at least one record from the input file. + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" diff --git a/modules/bedtools/genomecov/meta.yml b/modules/bedtools/genomecov/meta.yml index 0713e95b..83bfab98 100644 --- a/modules/bedtools/genomecov/meta.yml +++ b/modules/bedtools/genomecov/meta.yml @@ -1,51 +1,51 @@ name: bedtools_genomecov description: Computes histograms (default), per-base reports (-d) and BEDGRAPH (-bg) summaries of feature coverage (e.g., aligned sequences) for a given genome. keywords: - - bed - - bam - - genomecov + - bed + - bam + - genomecov tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - intervals: - type: file - description: BAM/BED/GFF/VCF - pattern: "*.{bam|bed|gff|vcf}" - - scale: - type: value - description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch - - sizes: - type: file - description: Tab-delimited table of chromosome names in the first column and chromosome sizes in the second column - - extension: - type: string - description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals: + type: file + description: BAM/BED/GFF/VCF + pattern: "*.{bam|bed|gff|vcf}" + - scale: + type: value + description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch + - sizes: + type: file + description: Tab-delimited table of chromosome names in the first column and chromosome sizes in the second column + - extension: + type: string + description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - genomecov: - type: file - description: Computed genome coverage file - pattern: "*.${extension}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - genomecov: + type: file + description: Computed genome coverage file + pattern: "*.${extension}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" - - "@sidorov-si" - - "@chris-cheshire" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" + - "@sidorov-si" + - "@chris-cheshire" diff --git a/modules/bedtools/getfasta/meta.yml b/modules/bedtools/getfasta/meta.yml index 38715c3d..11335100 100644 --- a/modules/bedtools/getfasta/meta.yml +++ b/modules/bedtools/getfasta/meta.yml @@ -1,34 +1,34 @@ name: bedtools_getfasta description: extract sequences in a FASTA file based on intervals defined in a feature file. keywords: - - bed - - fasta - - getfasta + - bed + - fasta + - getfasta tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html + licence: ["MIT"] input: - - bed: - type: file - description: Bed feature file - pattern: "*.{bed}" - - fasta: - type: file - description: Input fasta file - pattern: "*.{fa,fasta}" + - bed: + type: file + description: Bed feature file + pattern: "*.{bed}" + - fasta: + type: file + description: Input fasta file + pattern: "*.{fa,fasta}" output: - - fasta: - type: file - description: Output fasta file with extracted sequences - pattern: "*.{fa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - fasta: + type: file + description: Output fasta file with extracted sequences + pattern: "*.{fa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bedtools/intersect/meta.yml b/modules/bedtools/intersect/meta.yml index 3bcb6ece..6e21e928 100644 --- a/modules/bedtools/intersect/meta.yml +++ b/modules/bedtools/intersect/meta.yml @@ -1,47 +1,47 @@ name: bedtools_intersect description: Allows one to screen for overlaps between two sets of genomic features. keywords: - - bed - - intersect + - bed + - intersect tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - intervals1: - type: file - description: BAM/BED/GFF/VCF - pattern: "*.{bam|bed|gff|vcf}" - - intervals2: - type: file - description: BAM/BED/GFF/VCF - pattern: "*.{bam|bed|gff|vcf}" - - extension: - type: value - description: Extension of the output file. It is set by the user and corresponds to the file format which depends on arguments (e. g., ".bed", ".bam", ".txt", etc.). + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals1: + type: file + description: BAM/BED/GFF/VCF + pattern: "*.{bam|bed|gff|vcf}" + - intervals2: + type: file + description: BAM/BED/GFF/VCF + pattern: "*.{bam|bed|gff|vcf}" + - extension: + type: value + description: Extension of the output file. It is set by the user and corresponds to the file format which depends on arguments (e. g., ".bed", ".bam", ".txt", etc.). output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - intersect: - type: file - description: File containing the description of overlaps found between the two features - pattern: "*.${extension}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intersect: + type: file + description: File containing the description of overlaps found between the two features + pattern: "*.${extension}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" - - "@sidorov-si" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" + - "@sidorov-si" diff --git a/modules/bedtools/makewindows/meta.yml b/modules/bedtools/makewindows/meta.yml index a536d75f..9de31f43 100644 --- a/modules/bedtools/makewindows/meta.yml +++ b/modules/bedtools/makewindows/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://bedtools.readthedocs.io/en/latest/content/tools/makewindows.html tool_dev_url: None doi: "10.1093/bioinformatics/btq033" - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/bedtools/maskfasta/meta.yml b/modules/bedtools/maskfasta/meta.yml index 0b7aa3ed..cc33df3e 100644 --- a/modules/bedtools/maskfasta/meta.yml +++ b/modules/bedtools/maskfasta/meta.yml @@ -1,44 +1,44 @@ name: bedtools_maskfasta description: masks sequences in a FASTA file based on intervals defined in a feature file. keywords: - - bed - - fasta - - maskfasta + - bed + - fasta + - maskfasta tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Bed feature file - pattern: "*.{bed}" - - fasta: - type: file - description: Input fasta file - pattern: "*.{fa,fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed feature file + pattern: "*.{bed}" + - fasta: + type: file + description: Input fasta file + pattern: "*.{fa,fasta}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Output masked fasta file - pattern: "*.{fa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Output masked fasta file + pattern: "*.{fa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bedtools/merge/meta.yml b/modules/bedtools/merge/meta.yml index 40a42b7b..76743679 100644 --- a/modules/bedtools/merge/meta.yml +++ b/modules/bedtools/merge/meta.yml @@ -1,39 +1,39 @@ name: bedtools_merge description: combines overlapping or “book-ended” features in an interval file into a single feature which spans all of the combined features. keywords: - - bed - - merge + - bed + - merge tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/merge.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/merge.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Input BED file - pattern: "*.{bed}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Input BED file + pattern: "*.{bed}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Overlapped bed file with combined features - pattern: "*.{bed}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Overlapped bed file with combined features + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" diff --git a/modules/bedtools/slop/meta.yml b/modules/bedtools/slop/meta.yml index a4713936..4835b71b 100644 --- a/modules/bedtools/slop/meta.yml +++ b/modules/bedtools/slop/meta.yml @@ -1,39 +1,39 @@ name: bedtools_slop description: Adds a specified number of bases in each direction (unique values may be specified for either -l or -r) keywords: - - bed - - slopBed + - bed + - slopBed tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/slop.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/slop.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Input BED file - pattern: "*.{bed}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Input BED file + pattern: "*.{bed}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Slopped BED file - pattern: "*.{bed}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Slopped BED file + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" diff --git a/modules/bedtools/sort/meta.yml b/modules/bedtools/sort/meta.yml index c7b1b098..369e51ff 100644 --- a/modules/bedtools/sort/meta.yml +++ b/modules/bedtools/sort/meta.yml @@ -1,46 +1,46 @@ name: bedtools_sort description: Sorts a feature file by chromosome and other criteria. keywords: - - bed - - sort + - bed + - sort tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/sort.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/sort.html + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - intervals: - type: file - description: BED/BEDGRAPH - pattern: "*.{bed|bedGraph}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals: + type: file + description: BED/BEDGRAPH + pattern: "*.{bed|bedGraph}" - - extension: - type: string - description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. + - extension: + type: string + description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - - sorted: - type: file - description: Sorted output file - pattern: "*.${extension}" + - sorted: + type: file + description: Sorted output file + pattern: "*.${extension}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" - - "@chris-cheshire" + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" + - "@chris-cheshire" diff --git a/modules/bedtools/subtract/meta.yml b/modules/bedtools/subtract/meta.yml index b9245a55..19978f74 100644 --- a/modules/bedtools/subtract/meta.yml +++ b/modules/bedtools/subtract/meta.yml @@ -1,16 +1,16 @@ name: bedtools_subtract description: Finds overlaps between two sets of regions (A and B), removes the overlaps from A and reports the remaining portion of A. keywords: - - bed - - gff - - vcf - - subtract + - bed + - gff + - vcf + - subtract tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/subtract.html - licence: ['MIT'] + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/subtract.html + licence: ["MIT"] input: - meta: diff --git a/modules/biobambam/bammarkduplicates2/main.nf b/modules/biobambam/bammarkduplicates2/main.nf new file mode 100644 index 00000000..dd0e55b6 --- /dev/null +++ b/modules/biobambam/bammarkduplicates2/main.nf @@ -0,0 +1,36 @@ +process BIOBAMBAM_BAMMARKDUPLICATES2 { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1'}" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.metrics.txt"), emit: metrics + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bammarkduplicates2 \\ + $args \\ + I=$bam \\ + O=${prefix}.bam \\ + M=${prefix}.metrics.txt \\ + tmpfile=$prefix \\ + markthreads=$task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bammarkduplicates2: \$(echo \$(bammarkduplicates2 --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/biobambam/bammarkduplicates2/meta.yml b/modules/biobambam/bammarkduplicates2/meta.yml new file mode 100644 index 00000000..52e2eb75 --- /dev/null +++ b/modules/biobambam/bammarkduplicates2/meta.yml @@ -0,0 +1,44 @@ +name: biobambam_bammarkduplicates2 +description: Locate and tag duplicate reads in a BAM file +keywords: + - markduplicates + - bam + - cram +tools: + - biobambam: + description: | + biobambam is a set of tools for early stage alignment file processing. + homepage: https://gitlab.com/german.tischler/biobambam2 + documentation: https://gitlab.com/german.tischler/biobambam2/-/blob/master/README.md + doi: 10.1186/1751-0473-9-13 + licence: ["GPL v3"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file with duplicate reads marked/removed + pattern: "*.{bam}" + - metrics: + type: file + description: Duplicate metrics file generated by biobambam + pattern: "*.{metrics.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@muffato" diff --git a/modules/biobambam/bamsormadup/main.nf b/modules/biobambam/bamsormadup/main.nf new file mode 100644 index 00000000..b9e28e43 --- /dev/null +++ b/modules/biobambam/bamsormadup/main.nf @@ -0,0 +1,46 @@ +process BIOBAMBAM_BAMSORMADUP { + tag "$meta.id" + label "process_medium" + + conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1'}" + + input: + tuple val(meta), path(bams) + path(fasta) + + output: + tuple val(meta), path("*.{bam,cram}") ,emit: bam + tuple val(meta), path("*.bam.bai") ,optional:true, emit: bam_index + tuple val(meta), path("*.metrics.txt") ,emit: metrics + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = args.contains("outputformat=cram") ? "cram" : "bam" + def input_string = bams.join(" I=") + + if (args.contains("outputformat=cram") && reference == null) error "Reference required for CRAM output." + + """ + bamcat \\ + I=${input_string} \\ + level=0 \\ + | bamsormadup \\ + $args \\ + M=${prefix}.metrics.txt \\ + tmpfile=$prefix \\ + threads=$task.cpus \\ + > ${prefix}.${suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamcat: \$(echo \$(bamsormadup --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' ) + bamsormadup: \$(echo \$(bamsormadup --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/biobambam/bamsormadup/meta.yml b/modules/biobambam/bamsormadup/meta.yml new file mode 100644 index 00000000..39acf3b3 --- /dev/null +++ b/modules/biobambam/bamsormadup/meta.yml @@ -0,0 +1,52 @@ +name: biobambam_bamsormadup +description: Parallel sorting and duplicate marking +keywords: + - markduplicates + - sort + - bam + - cram +tools: + - biobambam: + description: | + biobambam is a set of tools for early stage alignment file processing. + homepage: https://gitlab.com/german.tischler/biobambam2 + documentation: https://gitlab.com/german.tischler/biobambam2/-/blob/master/README.md + doi: 10.1186/1751-0473-9-13 + licence: ["GPL v3"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bams: + type: file + description: List containing 1 or more bam files + - fasta: + type: file + description: Reference genome in FASTA format (optional) + pattern: "*.{fa,fasta}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file with duplicate reads marked/removed + pattern: "*.{bam,cram}" + - bam_index: + type: file + description: BAM index file + pattern: "*.{bai}" + - metrics: + type: file + description: Duplicate metrics file generated by biobambam + pattern: "*.{metrics.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/modules/biscuit/align/main.nf b/modules/biscuit/align/main.nf new file mode 100644 index 00000000..18e178ff --- /dev/null +++ b/modules/biscuit/align/main.nf @@ -0,0 +1,44 @@ +process BISCUIT_ALIGN { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit align \\ + $args \\ + -@ $biscuit_cpus \\ + \$INDEX \\ + $reads \\ + | samtools sort $args2 --threads $samtools_cpus -o ${prefix}.bam - + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/align/meta.yml b/modules/biscuit/align/meta.yml new file mode 100644 index 00000000..77af5e4d --- /dev/null +++ b/modules/biscuit/align/meta.yml @@ -0,0 +1,52 @@ +name: biscuit_align +description: Aligns single- or paired-end reads from bisulfite-converted libraries to a reference genome using Biscuit. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/biscuitblaster/main.nf b/modules/biscuit/biscuitblaster/main.nf new file mode 100644 index 00000000..700bc5e0 --- /dev/null +++ b/modules/biscuit/biscuitblaster/main.nf @@ -0,0 +1,52 @@ +process BISCUIT_BLASTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samblaster=0.1.26 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit align \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $reads | \\ + samblaster \\ + $args2 | \\ + samtools sort \\ + -@ $samtools_cpus \\ + $args3 \\ + --write-index \\ + -o ${prefix}.bam##idx##${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/biscuitblaster/meta.yml b/modules/biscuit/biscuitblaster/meta.yml new file mode 100644 index 00000000..eb22dd0f --- /dev/null +++ b/modules/biscuit/biscuitblaster/meta.yml @@ -0,0 +1,78 @@ +name: biscuit_blaster + +description: A fast, compact one-liner to produce duplicate-marked, sorted, and indexed BAM files using Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/biscuitblaster/ + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + - samblaster: + description: | + samblaster is a fast and flexible program for marking duplicates in read-id grouped paired-end SAM files. + It can also optionally output discordant read pairs and/or split read mappings to separate SAM files, + and/or unmapped/clipped reads to a separate FASTQ file. + By default, samblaster reads SAM input from stdin and writes SAM to stdout. + homepage: None + documentation: https://github.com/GregoryFaust/samblaster + tool_dev_url: https://github.com/GregoryFaust/samblaster + doi: "10.1093/bioinformatics/btu314" + licence: ["MIT"] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - bai: + type: file + description: Output BAM index + pattern: "*.{bai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/bsconv/main.nf b/modules/biscuit/bsconv/main.nf new file mode 100644 index 00000000..8c5ee91f --- /dev/null +++ b/modules/biscuit/bsconv/main.nf @@ -0,0 +1,39 @@ +process BISCUIT_BSCONV { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + tuple val(meta), path(bam), path(bai) + path(index) + + output: + tuple val(meta), path("*.bam"), emit: bsconv_bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit bsconv \\ + $args \\ + \$INDEX \\ + $bam \\ + ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/bsconv/meta.yml b/modules/biscuit/bsconv/meta.yml new file mode 100644 index 00000000..fa05ee47 --- /dev/null +++ b/modules/biscuit/bsconv/meta.yml @@ -0,0 +1,55 @@ +name: biscuit_bsconv +description: Summarize and/or filter reads based on bisulfite conversion rate +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam + - filter + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-bsconv + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file contained mapped reads + - bai: + type: file + description: BAM file index + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bsconv_bam: + type: file + description: Output BAM file containing filtered read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/epiread/main.nf b/modules/biscuit/epiread/main.nf new file mode 100644 index 00000000..bc8c6d9f --- /dev/null +++ b/modules/biscuit/epiread/main.nf @@ -0,0 +1,57 @@ +process BISCUIT_EPIREAD { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(bam), path(bai), path(snp_bed) + path(index) + + output: + tuple val(meta), path("*.bed.gz"), emit: epiread_bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) + def samtools_cpus = task.cpus-biscuit_cpus + // As of 2/25/22, epiread does not support reading a gzipped SNP BED file. + // This is a bit hacky but allows the user to supply a gzipped OR uncompressed bed file + def unzip_snp_bed = snp_bed && (snp_bed.toString() =~ /\.gz$/) ? "bgzip -d ${snp_bed}" : "" + def unzipped_snp_bed = snp_bed ? snp_bed.toString() - ~/\.gz$/: "" + // SNP BED input is optional + def options_snp_bed = snp_bed ? "-B ${unzipped_snp_bed}" : "" + if ("$options_snp_bed" == "${prefix}.bed.gz") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + $unzip_snp_bed + + biscuit epiread \\ + -@ $biscuit_cpus \\ + $args \\ + $options_snp_bed \\ + \$INDEX \\ + $bam | \\ + LC_ALL=C sort -k1,1 -k2,2n | \\ + bgzip \\ + -@ $samtools_cpus \\ + $args2 \\ + -c > ${prefix}.bed.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/epiread/meta.yml b/modules/biscuit/epiread/meta.yml new file mode 100644 index 00000000..357b83df --- /dev/null +++ b/modules/biscuit/epiread/meta.yml @@ -0,0 +1,58 @@ +name: biscuit_epiread +description: | + Summarizes read-level methylation (and optionally SNV) information from a + Biscuit BAM file in a standard-compliant BED format. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/epiread_format/ + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Biscuit BAM file + - bai: + type: file + description: BAM index + - snp_bed: + type: file + description: BED file containing SNP information (optional) + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - epiread_bed: + type: file + description: Gzipped BED file with methylation (and optionally SNV) information + pattern: "*.{epiread.bed.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/index/main.nf b/modules/biscuit/index/main.nf new file mode 100644 index 00000000..9aa04330 --- /dev/null +++ b/modules/biscuit/index/main.nf @@ -0,0 +1,33 @@ +process BISCUIT_INDEX { + tag "$fasta" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + path fasta, stageAs: "BiscuitIndex/*" + + output: + path "BiscuitIndex/*.fa*", emit: index, includeInputs: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + biscuit \\ + index \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/index/meta.yml b/modules/biscuit/index/meta.yml new file mode 100644 index 00000000..96134f65 --- /dev/null +++ b/modules/biscuit/index/meta.yml @@ -0,0 +1,38 @@ +name: biscuit_index +description: Indexes a reference genome for use with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - reference + - fasta + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - fasta: + type: file + description: Input genome fasta file + +output: + - index: + type: dir + description: Biscuit genome index directory + pattern: "BiscuitIndex" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/mergecg/main.nf b/modules/biscuit/mergecg/main.nf new file mode 100644 index 00000000..6cafdb36 --- /dev/null +++ b/modules/biscuit/mergecg/main.nf @@ -0,0 +1,43 @@ +process BISCUIT_MERGECG { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(bed) + path index + + output: + tuple val(meta), path("*.bed.gz"), emit: mergecg_bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit mergecg \\ + $args \\ + \$INDEX \\ + $bed | \\ + LC_ALL=C sort -k1,1 -k2,2n | \\ + bgzip \\ + $args2 \\ + -c > ${prefix}.bed.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/mergecg/meta.yml b/modules/biscuit/mergecg/meta.yml new file mode 100644 index 00000000..25f6b9e2 --- /dev/null +++ b/modules/biscuit/mergecg/meta.yml @@ -0,0 +1,51 @@ +name: biscuit_mergecg +description: Merges methylation information for opposite-strand C's in a CpG context +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bed +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: | + Biscuit BED file (output of biscuit vcf2bed) + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - mergecg_bed: + type: file + description: Gzipped BED file with merged methylation information + pattern: "*.bed.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/pileup/main.nf b/modules/biscuit/pileup/main.nf new file mode 100644 index 00000000..dcddc418 --- /dev/null +++ b/modules/biscuit/pileup/main.nf @@ -0,0 +1,45 @@ +process BISCUIT_PILEUP { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(normal_bams), path(normal_bais), path(tumor_bam), path(tumor_bai) + path index + + output: + tuple val(meta), path("*.vcf.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) + def bgzip_cpus = task.cpus-biscuit_cpus + if ( tumor_bam != [] && normal_bams.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: Tumor BAM provided with more than one normal BAM" + if ( tumor_bam.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: more than one tumor BAM provided" + input = ( tumor_bam==[] ) ? "${normal_bams}" : "-S -T ${tumor_bam} -I ${normal_bams}" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit pileup \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $input \\ + | bgzip -@ $bgzip_cpus $args2 > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/pileup/meta.yml b/modules/biscuit/pileup/meta.yml new file mode 100644 index 00000000..87c3891a --- /dev/null +++ b/modules/biscuit/pileup/meta.yml @@ -0,0 +1,70 @@ +name: biscuit_pileup +description: Computes cytosine methylation and callable SNV mutations, optionally in reference to a germline BAM to call somatic variants +keywords: + - bisulfite + - DNA methylation + - pileup + - variant calling + - WGBS + - scWGBS + - bam + - vcf +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/pileup.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - normal_bams: + type: file(s) + description: | + BAM files to be analyzed. If no tumor_bam file is provided, any number of "normal" BAMs may be provided + ("normal" here is just a semantic issue, these BAMs could be from tumor or any other kind of tissue). If a + tumor BAM file is provided, exactly one normal (germline) BAM must be provided. + pattern: "*.{bam}" + - normal_bais: + type: file(s) + description: BAM index file or files corresponding to the provided normal_bams + pattern: "*.{bai}" + - tumor_bam: + type: file(s) + description: | + Optional. If a tumor BAM file is provided, pileup will run in "somatic" mode and will annotate variants with + their somatic state (present in tumor only, present in normal only, present in both, etc). Note that if a + tumor BAM file is provided, exactly one normal BAM must be provided. + pattern: "*.{bam}" + - tumor_bai: + type: file(s) + description: Optional. BAM index file corresponding to provided tumor_bam + pattern: "*.{bai}" + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +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" + - vcf: + type: file + description: vcf file with methylation information + pattern: "*.{vcf.gz}" + +authors: + - "@njspix" diff --git a/modules/biscuit/qc/main.nf b/modules/biscuit/qc/main.nf new file mode 100644 index 00000000..dea6473b --- /dev/null +++ b/modules/biscuit/qc/main.nf @@ -0,0 +1,40 @@ +process BISCUIT_QC { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + tuple val(meta), path(bam) + path(index) + + output: + tuple val(meta), path("*.txt"), emit: biscuit_qc_reports + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def se = meta.single_end ? "-s" : "" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'` + + biscuit qc \\ + $args \\ + $se \\ + \$INDEX \\ + $bam \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/qc/meta.yml b/modules/biscuit/qc/meta.yml new file mode 100644 index 00000000..a3e65a90 --- /dev/null +++ b/modules/biscuit/qc/meta.yml @@ -0,0 +1,51 @@ +name: biscuit_qc +description: Perform basic quality control on a BAM file generated with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - BAM + - quality control + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file produced using Biscuit + +output: + - biscuit_qc_reports: + type: file + description: | + Summary files containing the following information: + - CpG retention by position in read + - CpH retention by position in read + - Read duplication statistics + - Insert size distribution + - Distribution of mapping qualities + - Proportion of reads mapping to each strand + - Read-averaged cytosine conversion rate for CpA, CpC, CpG, and CpT + pattern: "*.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/biscuit/vcf2bed/main.nf b/modules/biscuit/vcf2bed/main.nf new file mode 100644 index 00000000..7bbcc826 --- /dev/null +++ b/modules/biscuit/vcf2bed/main.nf @@ -0,0 +1,39 @@ +process BISCUIT_VCF2BED { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(vcf) + + output: + tuple val(meta), path("*.bed.gz"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + biscuit vcf2bed \\ + $args \\ + $vcf | \\ + LC_ALL=C sort -k1,1 -k2,2n | \\ + bgzip \\ + $args2 \\ + -c > ${prefix}.bed.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$(echo \$(biscuit version 2>&1) | sed 's/^.*BISCUIT Version: //; s/Using.*\$//') + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/biscuit/vcf2bed/meta.yml b/modules/biscuit/vcf2bed/meta.yml new file mode 100644 index 00000000..c34d5a4d --- /dev/null +++ b/modules/biscuit/vcf2bed/meta.yml @@ -0,0 +1,48 @@ +name: biscuit_vcf2bed +description: | + Summarizes methylation or SNV information from a Biscuit VCF in a + standard-compliant BED file. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - vcf +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Biscuit vcf file (output of biscuit pileup) + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Gzipped BED file with methylation or SNV information + pattern: "*.{bed.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/bismark/align/meta.yml b/modules/bismark/align/meta.yml index 79948e1c..f780c959 100644 --- a/modules/bismark/align/meta.yml +++ b/modules/bismark/align/meta.yml @@ -1,59 +1,59 @@ name: bismark_align description: Performs alignment of BS-Seq reads using bismark keywords: - - bismark - - 3-letter genome - - map - - methylation - - 5mC - - methylseq - - bisulphite - - bam + - bismark + - 3-letter genome + - map + - methylation + - 5mC + - methylseq + - bisulphite + - bam tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: dir - description: Bismark genome index directory - pattern: "BismarkIndex" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Bismark genome index directory + pattern: "BismarkIndex" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - unmapped: - type: file - description: Output FastQ file(s) containing unmapped reads - pattern: "*.{fq.gz}" - - report: - type: file - description: Bismark alignment reports - pattern: "*{report.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - unmapped: + type: file + description: Output FastQ file(s) containing unmapped reads + pattern: "*.{fq.gz}" + - report: + type: file + description: Bismark alignment reports + pattern: "*{report.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bismark/deduplicate/meta.yml b/modules/bismark/deduplicate/meta.yml index 9e28cd22..2b89e520 100644 --- a/modules/bismark/deduplicate/meta.yml +++ b/modules/bismark/deduplicate/meta.yml @@ -1,52 +1,52 @@ name: bismark_deduplicate description: | - Removes alignments to the same position in the genome - from the Bismark mapping output. + Removes alignments to the same position in the genome + from the Bismark mapping output. keywords: - - bismark - - 3-letter genome - - map - - methylation - - 5mC - - methylseq - - bisulphite - - bam + - bismark + - 3-letter genome + - map + - methylation + - 5mC + - methylseq + - bisulphite + - bam tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file containing read alignments - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file containing read alignments + pattern: "*.{bam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Deduplicated output BAM file containing read alignments - pattern: "*.{deduplicated.bam}" - - report: - type: file - description: Bismark deduplication reports - pattern: "*.{deduplication_report.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Deduplicated output BAM file containing read alignments + pattern: "*.{deduplicated.bam}" + - report: + type: file + description: Bismark deduplication reports + pattern: "*.{deduplication_report.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bismark/genomepreparation/meta.yml b/modules/bismark/genomepreparation/meta.yml index 2a17f1fb..b30ff651 100644 --- a/modules/bismark/genomepreparation/meta.yml +++ b/modules/bismark/genomepreparation/meta.yml @@ -1,37 +1,37 @@ name: bismark_genomepreparation description: | - Converts a specified reference genome into two different bisulfite - converted versions and indexes them for alignments. + Converts a specified reference genome into two different bisulfite + converted versions and indexes them for alignments. keywords: - - bismark - - 3-letter genome - - index - - methylation - - 5mC - - methylseq - - bisulphite - - fasta + - bismark + - 3-letter genome + - index + - methylation + - 5mC + - methylseq + - bisulphite + - fasta tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: dir - description: Bismark genome index directory - pattern: "BismarkIndex" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: dir + description: Bismark genome index directory + pattern: "BismarkIndex" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bismark/methylationextractor/meta.yml b/modules/bismark/methylationextractor/meta.yml index 602fc06d..407cefca 100644 --- a/modules/bismark/methylationextractor/meta.yml +++ b/modules/bismark/methylationextractor/meta.yml @@ -1,67 +1,67 @@ name: bismark_methylationextractor description: Extracts methylation information for individual cytosines from alignments. keywords: - - bismark - - consensus - - map - - methylation - - 5mC - - methylseq - - bisulphite - - bam - - bedGraph + - bismark + - consensus + - map + - methylation + - 5mC + - methylseq + - bisulphite + - bam + - bedGraph tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file containing read alignments - pattern: "*.{bam}" - - index: - type: dir - description: Bismark genome index directory - pattern: "BismarkIndex" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file containing read alignments + pattern: "*.{bam}" + - index: + type: dir + description: Bismark genome index directory + pattern: "BismarkIndex" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bedgraph: - type: file - description: Bismark output file containing coverage and methylation metrics - pattern: "*.{bedGraph.gz}" - - methylation_calls: - type: file - description: Bismark output file containing strand-specific methylation calls - pattern: "*.{txt.gz}" - - coverage: - type: file - description: Bismark output file containing coverage metrics - pattern: "*.{cov.gz}" - - report: - type: file - description: Bismark splitting reports - pattern: "*_{splitting_report.txt}" - - mbias: - type: file - description: Text file containing methylation bias information - pattern: "*.{M-bias.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bedgraph: + type: file + description: Bismark output file containing coverage and methylation metrics + pattern: "*.{bedGraph.gz}" + - methylation_calls: + type: file + description: Bismark output file containing strand-specific methylation calls + pattern: "*.{txt.gz}" + - coverage: + type: file + description: Bismark output file containing coverage metrics + pattern: "*.{cov.gz}" + - report: + type: file + description: Bismark splitting reports + pattern: "*_{splitting_report.txt}" + - mbias: + type: file + description: Text file containing methylation bias information + pattern: "*.{M-bias.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bismark/report/meta.yml b/modules/bismark/report/meta.yml index e849e109..002aeb34 100644 --- a/modules/bismark/report/meta.yml +++ b/modules/bismark/report/meta.yml @@ -1,60 +1,60 @@ name: bismark_report description: Collects bismark alignment reports keywords: - - bismark - - qc - - methylation - - 5mC - - methylseq - - bisulphite - - report + - bismark + - qc + - methylation + - 5mC + - methylseq + - bisulphite + - report tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - align_report: - type: file - description: Bismark alignment reports - pattern: "*{report.txt}" - - splitting_report: - type: file - description: Bismark splitting reports - pattern: "*{splitting_report.txt}" - - dedup_report: - type: file - description: Bismark deduplication reports - pattern: "*.{deduplication_report.txt}" - - mbias: - type: file - description: Text file containing methylation bias information - pattern: "*.{txt}" - - fasta: - type: file - description: Input genome fasta file + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - align_report: + type: file + description: Bismark alignment reports + pattern: "*{report.txt}" + - splitting_report: + type: file + description: Bismark splitting reports + pattern: "*{splitting_report.txt}" + - dedup_report: + type: file + description: Bismark deduplication reports + pattern: "*.{deduplication_report.txt}" + - mbias: + type: file + description: Text file containing methylation bias information + pattern: "*.{txt}" + - fasta: + type: file + description: Input genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - report: - type: file - description: Bismark reports - pattern: "*.{html,txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: Bismark reports + pattern: "*.{html,txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bismark/summary/meta.yml b/modules/bismark/summary/meta.yml index 0494bb8e..5c8e8b6a 100644 --- a/modules/bismark/summary/meta.yml +++ b/modules/bismark/summary/meta.yml @@ -1,54 +1,54 @@ name: bismark_summary description: | - Uses Bismark report files of several samples in a run folder - to generate a graphical summary HTML report. + Uses Bismark report files of several samples in a run folder + to generate a graphical summary HTML report. keywords: - - bismark - - qc - - methylation - - 5mC - - methylseq - - bisulphite - - report - - summary + - bismark + - qc + - methylation + - 5mC + - methylseq + - bisulphite + - report + - summary tools: - - bismark: - description: | - Bismark is a tool to map bisulfite treated sequencing reads - and perform methylation calling in a quick and easy-to-use fashion. - homepage: https://github.com/FelixKrueger/Bismark - documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs - doi: 10.1093/bioinformatics/btr167 - licence: ['GPL-3.0-or-later'] + - bismark: + description: | + Bismark is a tool to map bisulfite treated sequencing reads + and perform methylation calling in a quick and easy-to-use fashion. + homepage: https://github.com/FelixKrueger/Bismark + documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs + doi: 10.1093/bioinformatics/btr167 + licence: ["GPL-3.0-or-later"] input: - - bam: - type: file - description: Bismark alignment - pattern: "*.{bam}" - - align_report: - type: file - description: Bismark alignment reports - pattern: "*{report.txt}" - - dedup_report: - type: file - description: Bismark deduplication reports - pattern: "*.{deduplication_report.txt}" - - splitting_report: - type: file - description: Bismark splitting reports - pattern: "*{splitting_report.txt}" - - mbias: - type: file - description: Text file containing methylation bias information - pattern: "*.{txt}" + - bam: + type: file + description: Bismark alignment + pattern: "*.{bam}" + - align_report: + type: file + description: Bismark alignment reports + pattern: "*{report.txt}" + - dedup_report: + type: file + description: Bismark deduplication reports + pattern: "*.{deduplication_report.txt}" + - splitting_report: + type: file + description: Bismark splitting reports + pattern: "*{splitting_report.txt}" + - mbias: + type: file + description: Text file containing methylation bias information + pattern: "*.{txt}" output: - - summary: - type: file - description: Bismark summary - pattern: "*.{html,txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - summary: + type: file + description: Bismark summary + pattern: "*.{html,txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/blast/blastn/meta.yml b/modules/blast/blastn/meta.yml index 39acb663..2742278d 100644 --- a/modules/blast/blastn/meta.yml +++ b/modules/blast/blastn/meta.yml @@ -1,41 +1,41 @@ name: blast_blastn description: Queries a BLAST DNA database keywords: - - fasta - - blast - - blastn - - DNA sequence + - fasta + - blast + - blastn + - DNA sequence tools: - - blast: - description: | - BLAST finds regions of similarity between biological sequences. - homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi - documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs - doi: 10.1016/S0022-2836(05)80360-2 - licence: ['US-Government-Work'] + - blast: + description: | + BLAST finds regions of similarity between biological sequences. + homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi + documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs + doi: 10.1016/S0022-2836(05)80360-2 + licence: ["US-Government-Work"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input fasta file containing queries sequences - pattern: "*.{fa,fasta}" - - db: - type: directory - description: Directory containing blast database - pattern: "*" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input fasta file containing queries sequences + pattern: "*.{fa,fasta}" + - db: + type: directory + description: Directory containing blast database + pattern: "*" output: - - txt: - type: file - description: File containing blastn hits - pattern: "*.{blastn.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - txt: + type: file + description: File containing blastn hits + pattern: "*.{blastn.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/blast/makeblastdb/meta.yml b/modules/blast/makeblastdb/meta.yml index c9d18cba..83c4b292 100644 --- a/modules/blast/makeblastdb/meta.yml +++ b/modules/blast/makeblastdb/meta.yml @@ -1,31 +1,31 @@ name: blast_makeblastdb description: Builds a BLAST database keywords: - - fasta - - blast - - database + - fasta + - blast + - database tools: - - blast: - description: | - BLAST finds regions of similarity between biological sequences. - homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi - documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs - doi: 10.1016/S0022-2836(05)80360-2 - licence: ['US-Government-Work'] + - blast: + description: | + BLAST finds regions of similarity between biological sequences. + homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi + documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs + doi: 10.1016/S0022-2836(05)80360-2 + licence: ["US-Government-Work"] input: - - fasta: - type: file - description: Input fasta file - pattern: "*.{fa,fasta}" + - fasta: + type: file + description: Input fasta file + pattern: "*.{fa,fasta}" output: - - db: - type: directory - description: Output directory containing blast database files - pattern: "*" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - db: + type: directory + description: Output directory containing blast database files + pattern: "*" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bowtie/align/main.nf b/modules/bowtie/align/main.nf index ba82b67d..d2cba0e4 100644 --- a/modules/bowtie/align/main.nf +++ b/modules/bowtie/align/main.nf @@ -2,10 +2,10 @@ process BOWTIE_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::bowtie=1.3.0 bioconda::samtools=1.11' : null) + conda (params.enable_conda ? 'bioconda::bowtie=1.3.0 bioconda::samtools=1.15.1' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:9e14e16c284d6860574cf5b624bbc44c793cb024-0' : - 'quay.io/biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:9e14e16c284d6860574cf5b624bbc44c793cb024-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:676c5bcfe34af6097728fea60fb7ea83f94a4a5f-0' : + 'quay.io/biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:676c5bcfe34af6097728fea60fb7ea83f94a4a5f-0' }" input: tuple val(meta), path(reads) diff --git a/modules/bowtie/align/meta.yml b/modules/bowtie/align/meta.yml index 07d480be..f5145b5a 100644 --- a/modules/bowtie/align/meta.yml +++ b/modules/bowtie/align/meta.yml @@ -1,46 +1,46 @@ name: bowtie_align description: Align reads to a reference genome using bowtie keywords: - - align - - fasta - - genome - - reference + - align + - fasta + - genome + - reference tools: - - bowtie: - description: | - bowtie is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bowtie-bio.sourceforge.net/index.shtml - documentation: http://bowtie-bio.sourceforge.net/manual.shtml - arxiv: arXiv:1303.3997 - licence: ['Artistic-2.0'] + - bowtie: + description: | + bowtie is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bowtie-bio.sourceforge.net/index.shtml + documentation: http://bowtie-bio.sourceforge.net/manual.shtml + arxiv: arXiv:1303.3997 + licence: ["Artistic-2.0"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: file - description: Bowtie genome index files - pattern: "*.ebwt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: file + description: Bowtie genome index files + pattern: "*.ebwt" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - fastq: - type: file - description: Unaligned FastQ files - pattern: "*.fastq.gz" + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" authors: - - "@kevinmenden" + - "@kevinmenden" diff --git a/modules/bowtie/build/meta.yml b/modules/bowtie/build/meta.yml index 016adcfe..0c41bbac 100644 --- a/modules/bowtie/build/meta.yml +++ b/modules/bowtie/build/meta.yml @@ -1,32 +1,32 @@ name: bowtie_build description: Create bowtie index for reference genome keywords: - - index - - fasta - - genome - - reference + - index + - fasta + - genome + - reference tools: - - bowtie: - description: | - bowtie is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bowtie-bio.sourceforge.net/index.shtml - documentation: http://bowtie-bio.sourceforge.net/manual.shtml - arxiv: arXiv:1303.3997 - licence: ['Artistic-2.0'] + - bowtie: + description: | + bowtie is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bowtie-bio.sourceforge.net/index.shtml + documentation: http://bowtie-bio.sourceforge.net/manual.shtml + arxiv: arXiv:1303.3997 + licence: ["Artistic-2.0"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: file - description: Bowtie genome index files - pattern: "*.ebwt" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: file + description: Bowtie genome index files + pattern: "*.ebwt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@kevinmenden" - - "@drpatelh" + - "@kevinmenden" + - "@drpatelh" diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 7e8a9659..c74e376f 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -1,77 +1,71 @@ process BOWTIE2_ALIGN { tag "$meta.id" - label 'process_high' + label "process_high" - conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.14 conda-forge::pigz=2.6' : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' : - 'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' }" + conda (params.enable_conda ? "bioconda::bowtie2=2.4.4 bioconda::samtools=1.15.1 conda-forge::pigz=2.6" : null) + container "${ workflow.containerEngine == "singularity" && !task.ext.singularity_pull_docker_container ? + "https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0" : + "quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0" }" input: tuple val(meta), path(reads) path index val save_unaligned + val sort_bam output: - tuple val(meta), path('*.bam') , emit: bam - tuple val(meta), path('*.log') , emit: log - tuple val(meta), path('*fastq.gz'), emit: fastq, optional:true + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.log") , emit: log + tuple val(meta), path("*fastq.gz"), emit: fastq, optional:true path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' + def args = task.ext.args ?: "" + def args2 = task.ext.args2 ?: "" def prefix = task.ext.prefix ?: "${meta.id}" + + def unaligned = "" + def reads_args = "" if (meta.single_end) { - def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' - """ - INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` - bowtie2 \\ - -x \$INDEX \\ - -U $reads \\ - --threads $task.cpus \\ - $unaligned \\ - $args \\ - 2> ${prefix}.bowtie2.log \\ - | samtools view -@ $task.cpus $args2 -bhS -o ${prefix}.bam - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ + unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : "" + reads_args = "-U ${reads}" } else { - def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' - """ - INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` - bowtie2 \\ - -x \$INDEX \\ - -1 ${reads[0]} \\ - -2 ${reads[1]} \\ - --threads $task.cpus \\ - $unaligned \\ - $args \\ - 2> ${prefix}.bowtie2.log \\ - | samtools view -@ $task.cpus $args2 -bhS -o ${prefix}.bam - - - if [ -f ${prefix}.unmapped.fastq.1.gz ]; then - mv ${prefix}.unmapped.fastq.1.gz ${prefix}.unmapped_1.fastq.gz - fi - if [ -f ${prefix}.unmapped.fastq.2.gz ]; then - mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ + unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : "" + reads_args = "-1 ${reads[0]} -2 ${reads[1]}" } + + def samtools_command = sort_bam ? 'sort' : 'view' + + """ + INDEX=`find -L ./ -name "*.rev.1.bt2" | sed "s/.rev.1.bt2//"` + [ -z "\$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed "s/.rev.1.bt2l//"` + [ -z "\$INDEX" ] && echo "Bowtie2 index files not found" 1>&2 && exit 1 + + bowtie2 \\ + -x \$INDEX \\ + $reads_args \\ + --threads $task.cpus \\ + $unaligned \\ + $args \\ + 2> ${prefix}.bowtie2.log \\ + | samtools $samtools_command $args2 --threads $task.cpus -o ${prefix}.bam - + + if [ -f ${prefix}.unmapped.fastq.1.gz ]; then + mv ${prefix}.unmapped.fastq.1.gz ${prefix}.unmapped_1.fastq.gz + fi + + if [ -f ${prefix}.unmapped.fastq.2.gz ]; then + mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ } diff --git a/modules/bowtie2/align/meta.yml b/modules/bowtie2/align/meta.yml index 77c9e397..c99fa4e3 100644 --- a/modules/bowtie2/align/meta.yml +++ b/modules/bowtie2/align/meta.yml @@ -1,51 +1,60 @@ name: bowtie2_align description: Align reads to a reference genome using bowtie2 keywords: - - align - - fasta - - genome - - reference + - align + - fasta + - genome + - reference tools: - - bowtie2: - description: | - Bowtie 2 is an ultrafast and memory-efficient tool for aligning - sequencing reads to long reference sequences. - homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml - documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml - doi: 10.1038/nmeth.1923 - licence: ['GPL-3.0-or-later'] + - bowtie2: + description: | + Bowtie 2 is an ultrafast and memory-efficient tool for aligning + sequencing reads to long reference sequences. + homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml + documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml + doi: 10.1038/nmeth.1923 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: file - description: Bowtie2 genome index files - pattern: "*.ebwt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: file + description: Bowtie2 genome index files + pattern: "*.ebwt" + - save_unaligned: + type: boolean + description: | + Save reads that do not map to the reference (true) or discard them (false) + (default: false) + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - fastq: - type: file - description: Unaligned FastQ files - pattern: "*.fastq.gz" - - log: - type: file - description: Aligment log - pattern: "*.log" + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" + - log: + type: file + description: Aligment log + pattern: "*.log" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bowtie2/build/meta.yml b/modules/bowtie2/build/meta.yml index ecc54e9b..2da9a217 100644 --- a/modules/bowtie2/build/meta.yml +++ b/modules/bowtie2/build/meta.yml @@ -1,33 +1,33 @@ name: bowtie2_build description: Builds bowtie index for reference genome keywords: - - build - - index - - fasta - - genome - - reference + - build + - index + - fasta + - genome + - reference tools: - - bowtie2: - description: | - Bowtie 2 is an ultrafast and memory-efficient tool for aligning - sequencing reads to long reference sequences. - homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml - documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml - doi: 10.1038/nmeth.1923 - licence: ['GPL-3.0-or-later'] + - bowtie2: + description: | + Bowtie 2 is an ultrafast and memory-efficient tool for aligning + sequencing reads to long reference sequences. + homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml + documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml + doi: 10.1038/nmeth.1923 + licence: ["GPL-3.0-or-later"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: file - description: Bowtie2 genome index files - pattern: "*.bt2" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: file + description: Bowtie2 genome index files + pattern: "*.bt2" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/bracken/bracken/main.nf b/modules/bracken/bracken/main.nf new file mode 100644 index 00000000..2027fd23 --- /dev/null +++ b/modules/bracken/bracken/main.nf @@ -0,0 +1,41 @@ +process BRACKEN_BRACKEN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::bracken=2.6.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bracken:2.6.2--py39hc16433a_0': + 'quay.io/biocontainers/bracken:2.6.2--py39hc16433a_0' }" + + input: + tuple val(meta), path(kraken_report) + path database + + output: + tuple val(meta), path(bracken_report), emit: reports + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def threshold = meta.threshold ?: 10 + def taxonomic_level = meta.taxonomic_level ?: 'S' + def read_length = meta.read_length ?: 150 + def args = task.ext.args ?: "-l ${taxonomic_level} -t ${threshold} -r ${read_length}" + def prefix = task.ext.prefix ?: "${meta.id}" + def bracken_version = '2.6.2' + bracken_report = "${prefix}_${taxonomic_level}.tsv" + """ + bracken \\ + ${args} \\ + -d '${database}' \\ + -i '${kraken_report}' \\ + -o '${bracken_report}' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bracken: ${bracken_version} + END_VERSIONS + """ +} diff --git a/modules/bracken/bracken/meta.yml b/modules/bracken/bracken/meta.yml new file mode 100644 index 00000000..19311618 --- /dev/null +++ b/modules/bracken/bracken/meta.yml @@ -0,0 +1,45 @@ +name: bracken_bracken +description: Re-estimate taxonomic abundance of metagenomic samples analyzed by kraken. +keywords: + - sort +tools: + - bracken: + description: Bracken (Bayesian Reestimation of Abundance with KrakEN) is a highly accurate statistical method that computes the abundance of species in DNA sequences from a metagenomics sample. + homepage: https://ccb.jhu.edu/software/bracken/ + documentation: https://ccb.jhu.edu/software/bracken/index.shtml?t=manual + tool_dev_url: https://github.com/jenniferlu717/Bracken + doi: "10.7717/peerj-cs.104" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - kraken_report: + type: file + description: TSV file with six columns coming from kraken2 output + pattern: "*.{tsv}" + - database: + type: file + description: Directory containing the kraken2/Bracken files for analysis + 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" + - reports: + type: file + description: TSV output report of the re-estimated abundances + pattern: "*.{tsv}" + +authors: + - "@Midnighter" diff --git a/modules/busco/main.nf b/modules/busco/main.nf new file mode 100644 index 00000000..f0713862 --- /dev/null +++ b/modules/busco/main.nf @@ -0,0 +1,84 @@ +process BUSCO { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::busco=5.3.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/busco:5.3.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path('tmp_input/*') + each lineage // Required: lineage to check against, "auto" enables --auto-lineage instead + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file + + output: + tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt, optional: true + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json, optional: true + tuple val(meta), path("*-busco") , emit: busco_dir + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" + def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" + def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' + """ + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u + fi + + # If the augustus config directory is not writable, then copy to writeable area + if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then + # Create writable tmp directory for augustus + AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) + cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR + export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR + echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" + fi + + # Ensure the input is uncompressed + INPUT_SEQS=input_seqs + mkdir "\$INPUT_SEQS" + cd "\$INPUT_SEQS" + for FASTA in ../tmp_input/*; do + if [ "\${FASTA##*.}" == 'gz' ]; then + gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) + else + ln -s "\$FASTA" . + fi + done + cd .. + + busco \\ + --cpu $task.cpus \\ + --in "\$INPUT_SEQS" \\ + --out ${prefix}-busco \\ + $busco_lineage \\ + $busco_lineage_dir \\ + $busco_config \\ + $args + + # clean up + rm -rf "\$INPUT_SEQS" + + # Move files to avoid staging/publishing issues + mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt + mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) + END_VERSIONS + """ +} diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml new file mode 100644 index 00000000..ef8c5245 --- /dev/null +++ b/modules/busco/meta.yml @@ -0,0 +1,69 @@ +name: busco +description: Benchmarking Universal Single Copy Orthologs +keywords: + - quality control + - genome + - transcriptome + - proteome +tools: + - busco: + description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. + homepage: https://busco.ezlab.org/ + documentation: https://busco.ezlab.org/busco_userguide.html + tool_dev_url: https://gitlab.com/ezlab/busco + doi: "10.1007/978-1-4939-9173-0_14" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleic or amino acid sequence file in FASTA format. + pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" + - lineage: + type: value + description: The BUSCO lineage to use, or "auto" to automatically select lineage + - busco_lineages_path: + type: directory + description: Path to local BUSCO lineages directory. + - config_file: + type: file + description: Path to BUSCO config file. + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - batch_summary: + type: file + description: Summary of all sequence files analyzed + pattern: "*-busco.batch_summary.txt" + - short_summaries_txt: + type: file + description: Short Busco summary in plain text format + pattern: "short_summary.*.txt" + - short_summaries_json: + type: file + description: Short Busco summary in JSON format + pattern: "short_summary.*.json" + - busco_dir: + type: directory + description: BUSCO lineage specific output + pattern: "*-busco" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@priyanka-surana" + - "@charles-plessy" + - "@mahesh-panchal" + - "@muffato" + - "@jvhagey" diff --git a/modules/bwa/aln/meta.yml b/modules/bwa/aln/meta.yml index d2424a5f..8ebaf3da 100644 --- a/modules/bwa/aln/meta.yml +++ b/modules/bwa/aln/meta.yml @@ -10,30 +10,30 @@ keywords: - map - fastq tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: http://bio-bwa.sourceforge.net/ - doi: "10.1093/bioinformatics/btp324" - licence: ['GPL-3.0-or-later'] + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ["GPL-3.0-or-later"] input: - - meta: + - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" output: - meta: diff --git a/modules/bwa/index/meta.yml b/modules/bwa/index/meta.yml index 11d62df3..2bbd81d9 100644 --- a/modules/bwa/index/meta.yml +++ b/modules/bwa/index/meta.yml @@ -1,32 +1,32 @@ name: bwa_index description: Create BWA index for reference genome keywords: - - index - - fasta - - genome - - reference + - index + - fasta + - genome + - reference tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html - arxiv: arXiv:1303.3997 - licence: ['GPL-3.0-or-later'] + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://www.htslib.org/doc/samtools.html + arxiv: arXiv:1303.3997 + licence: ["GPL-3.0-or-later"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: file - description: BWA genome index files - pattern: "*.{amb,ann,bwt,pac,sa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: file + description: BWA genome index files + pattern: "*.{amb,ann,bwt,pac,sa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@maxulysse" + - "@drpatelh" + - "@maxulysse" diff --git a/modules/bwa/mem/main.nf b/modules/bwa/mem/main.nf index 9a91c77f..f55af944 100644 --- a/modules/bwa/mem/main.nf +++ b/modules/bwa/mem/main.nf @@ -2,10 +2,10 @@ process BWA_MEM { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null) + conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' : - 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' : + 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }" input: tuple val(meta), path(reads) @@ -23,14 +23,12 @@ process BWA_MEM { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def read_group = meta.read_group ? "-R ${meta.read_group}" : "" def samtools_command = sort_bam ? 'sort' : 'view' """ INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` bwa mem \\ $args \\ - $read_group \\ -t $task.cpus \\ \$INDEX \\ $reads \\ diff --git a/modules/bwa/mem/meta.yml b/modules/bwa/mem/meta.yml index c7c28f19..f84c5227 100644 --- a/modules/bwa/mem/meta.yml +++ b/modules/bwa/mem/meta.yml @@ -1,50 +1,50 @@ name: bwa_mem description: Performs fastq alignment to a fasta reference using BWA keywords: - - mem - - bwa - - alignment - - map - - fastq - - bam - - sam + - mem + - bwa + - alignment + - map + - fastq + - bam + - sam tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html - arxiv: arXiv:1303.3997 - licence: ['GPL-3.0-or-later'] + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://www.htslib.org/doc/samtools.html + arxiv: arXiv:1303.3997 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@jeremy1805" + - "@drpatelh" + - "@jeremy1805" diff --git a/modules/bwa/sampe/main.nf b/modules/bwa/sampe/main.nf index e781679e..cfe9529d 100644 --- a/modules/bwa/sampe/main.nf +++ b/modules/bwa/sampe/main.nf @@ -2,10 +2,10 @@ process BWA_SAMPE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null) + conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' : - 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' : + 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }" input: tuple val(meta), path(reads), path(sai) diff --git a/modules/bwa/sampe/meta.yml b/modules/bwa/sampe/meta.yml index 7b530a03..5920dc32 100644 --- a/modules/bwa/sampe/meta.yml +++ b/modules/bwa/sampe/meta.yml @@ -11,14 +11,14 @@ keywords: - sam - bam tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: http://bio-bwa.sourceforge.net/ - doi: "10.1093/bioinformatics/btp324" - licence: ['GPL-3.0-or-later'] + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ["GPL-3.0-or-later"] input: - meta: @@ -35,9 +35,9 @@ input: description: SAI file specified alongside meta and reads in input channel. pattern: "*.sai" - index: - type: directory - description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX - pattern: "bwa/" + type: directory + description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX + pattern: "bwa/" output: - meta: diff --git a/modules/bwa/samse/main.nf b/modules/bwa/samse/main.nf index ac04c739..fed412f2 100644 --- a/modules/bwa/samse/main.nf +++ b/modules/bwa/samse/main.nf @@ -2,10 +2,10 @@ process BWA_SAMSE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null) + conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' : - 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' : + 'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }" input: tuple val(meta), path(reads), path(sai) diff --git a/modules/bwa/samse/meta.yml b/modules/bwa/samse/meta.yml index 9a9ecb39..9524a4c8 100644 --- a/modules/bwa/samse/meta.yml +++ b/modules/bwa/samse/meta.yml @@ -12,14 +12,14 @@ keywords: - bam tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: http://bio-bwa.sourceforge.net/ - doi: "10.1093/bioinformatics/btp324" - licence: ['GPL-3.0-or-later'] + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ["GPL-3.0-or-later"] input: - meta: @@ -36,9 +36,9 @@ input: description: SAI file specified alongside meta and reads in input channel. pattern: "*.sai" - index: - type: directory - description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX - pattern: "bwa/" + type: directory + description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX + pattern: "bwa/" output: - meta: diff --git a/modules/bwamem2/index/main.nf b/modules/bwamem2/index/main.nf index 0e9cc2f8..900f27d4 100644 --- a/modules/bwamem2/index/main.nf +++ b/modules/bwamem2/index/main.nf @@ -31,4 +31,19 @@ process BWAMEM2_INDEX { bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') END_VERSIONS """ + + stub: + """ + mkdir bwamem2 + touch bwamem2/${fasta}.0123 + touch bwamem2/${fasta}.ann + touch bwamem2/${fasta}.pac + touch bwamem2/${fasta}.amb + touch bwamem2/${fasta}.bwt.2bit.64 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') + END_VERSIONS + """ } diff --git a/modules/bwamem2/index/meta.yml b/modules/bwamem2/index/meta.yml index e0f6014c..1b52448d 100644 --- a/modules/bwamem2/index/meta.yml +++ b/modules/bwamem2/index/meta.yml @@ -1,30 +1,30 @@ name: bwamem2_index description: Create BWA-mem2 index for reference genome keywords: - - index - - fasta - - genome - - reference + - index + - fasta + - genome + - reference tools: - - bwa: - description: | - BWA-mem2 is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: https://github.com/bwa-mem2/bwa-mem2 - documentation: https://github.com/bwa-mem2/bwa-mem2#usage - licence: ['MIT'] + - bwa: + description: | + BWA-mem2 is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: https://github.com/bwa-mem2/bwa-mem2 + documentation: https://github.com/bwa-mem2/bwa-mem2#usage + licence: ["MIT"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: file - description: BWA genome index files - pattern: "*.{0132,amb,ann,bwt.2bit.64,pac}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: file + description: BWA genome index files + pattern: "*.{0132,amb,ann,bwt.2bit.64,pac}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/bwamem2/mem/main.nf b/modules/bwamem2/mem/main.nf index 56f595ec..978c4019 100644 --- a/modules/bwamem2/mem/main.nf +++ b/modules/bwamem2/mem/main.nf @@ -2,10 +2,10 @@ process BWAMEM2_MEM { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1 bioconda::samtools=1.12" : null) + conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:cf603b12db30ec91daa04ba45a8ee0f35bbcd1e2-0' : - 'quay.io/biocontainers/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:cf603b12db30ec91daa04ba45a8ee0f35bbcd1e2-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:38aed4501da19db366dc7c8d52d31d94e760cfaf-0' : + 'quay.io/biocontainers/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:38aed4501da19db366dc7c8d52d31d94e760cfaf-0' }" input: tuple val(meta), path(reads) @@ -23,7 +23,6 @@ process BWAMEM2_MEM { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def read_group = meta.read_group ? "-R ${meta.read_group}" : "" def samtools_command = sort_bam ? 'sort' : 'view' """ INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` @@ -31,7 +30,6 @@ process BWAMEM2_MEM { bwa-mem2 \\ mem \\ $args \\ - $read_group \\ -t $task.cpus \\ \$INDEX \\ $reads \\ @@ -43,4 +41,15 @@ process BWAMEM2_MEM { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/bwamem2/mem/meta.yml b/modules/bwamem2/mem/meta.yml index 71e83759..25c97f91 100644 --- a/modules/bwamem2/mem/meta.yml +++ b/modules/bwamem2/mem/meta.yml @@ -1,49 +1,49 @@ name: bwamem2_mem description: Performs fastq alignment to a fasta reference using BWA keywords: - - mem - - bwa - - alignment - - map - - fastq - - bam - - sam + - mem + - bwa + - alignment + - map + - fastq + - bam + - sam tools: - - bwa: - description: | - BWA-mem2 is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: https://github.com/bwa-mem2/bwa-mem2 - documentation: http://www.htslib.org/doc/samtools.html - arxiv: arXiv:1303.3997 - licence: ['MIT'] + - bwa: + description: | + BWA-mem2 is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: https://github.com/bwa-mem2/bwa-mem2 + documentation: http://www.htslib.org/doc/samtools.html + arxiv: arXiv:1303.3997 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/bwameth/align/meta.yml b/modules/bwameth/align/meta.yml index 1cd66237..1db8210e 100644 --- a/modules/bwameth/align/meta.yml +++ b/modules/bwameth/align/meta.yml @@ -1,52 +1,52 @@ name: bwameth_align description: Performs alignment of BS-Seq reads using bwameth keywords: - - bwameth - - alignment - - 3-letter genome - - map - - methylation - - 5mC - - methylseq - - bisulphite - - fastq - - bam + - bwameth + - alignment + - 3-letter genome + - map + - methylation + - 5mC + - methylseq + - bisulphite + - fastq + - bam tools: - - bwameth: - description: | - Fast and accurate alignment of BS-Seq reads - using bwa-mem and a 3-letter genome. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 - licence: ['MIT'] + - bwameth: + description: | + Fast and accurate alignment of BS-Seq reads + using bwa-mem and a 3-letter genome. + homepage: https://github.com/brentp/bwa-meth + documentation: https://github.com/brentp/bwa-meth + arxiv: arXiv:1401.1129 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: dir - description: Directory containing bwameth genome index + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Directory containing bwameth genome index output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/bwameth/index/meta.yml b/modules/bwameth/index/meta.yml index 352dfd0f..8c116b6e 100644 --- a/modules/bwameth/index/meta.yml +++ b/modules/bwameth/index/meta.yml @@ -1,33 +1,33 @@ name: bwameth_index description: Performs indexing of c2t converted reference genome keywords: - - bwameth - - 3-letter genome - - index - - methylseq - - bisulphite - - fasta + - bwameth + - 3-letter genome + - index + - methylseq + - bisulphite + - fasta tools: - - bwameth: - description: | - Fast and accurate alignment of BS-Seq reads - using bwa-mem and a 3-letter genome. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 - licence: ['MIT'] + - bwameth: + description: | + Fast and accurate alignment of BS-Seq reads + using bwa-mem and a 3-letter genome. + homepage: https://github.com/brentp/bwa-meth + documentation: https://github.com/brentp/bwa-meth + arxiv: arXiv:1401.1129 + licence: ["MIT"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - index: - type: dir - description: Directory containing bwameth genome index - pattern: "index" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - index: + type: dir + description: Directory containing bwameth genome index + pattern: "index" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/cat/cat/main.nf b/modules/cat/cat/main.nf index 4ee44599..40e53f3e 100644 --- a/modules/cat/cat/main.nf +++ b/modules/cat/cat/main.nf @@ -1,4 +1,5 @@ process CAT_CAT { + tag "$meta.id" label 'process_low' conda (params.enable_conda ? "conda-forge::pigz=2.3.4" : null) @@ -7,12 +8,11 @@ process CAT_CAT { 'quay.io/biocontainers/pigz:2.3.4' }" input: - path files_in - val file_out + tuple val(meta), path(files_in) output: - path "${file_out}*" , emit: file_out - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}"), emit: file_out + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -29,16 +29,30 @@ process CAT_CAT { // | gzipped | ungzipped | zcat | | // | ungzipped | gzipped | cat | pigz | - def in_zip = file_list[0].endsWith('.gz') - def out_zip = file_out.endsWith('.gz') - def command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' - def command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' + // Use input file ending as default + prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}" + out_zip = prefix.endsWith('.gz') + in_zip = file_list[0].endsWith('.gz') + command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' + command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' """ $command1 \\ $args \\ ${file_list.join(' ')} \\ $command2 \\ - > $file_out + > ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ + + stub: + def file_list = files_in.collect { it.toString() } + prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}" + """ + touch $prefix cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/cat/cat/meta.yml b/modules/cat/cat/meta.yml index b3f370ee..5eeff5a6 100644 --- a/modules/cat/cat/meta.yml +++ b/modules/cat/cat/meta.yml @@ -10,15 +10,17 @@ tools: homepage: None documentation: https://man7.org/linux/man-pages/man1/cat.1.html tool_dev_url: None - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - files_in: type: file description: List of compressed / uncompressed files pattern: "*" - - file_out: - type: value - description: Full name of output file with or without .gz extension output: - versions: @@ -32,3 +34,4 @@ output: authors: - "@erikrikarddaniel" + - "@FriederikeHanssen" diff --git a/modules/cat/fastq/main.nf b/modules/cat/fastq/main.nf index bf0877c3..b6854895 100644 --- a/modules/cat/fastq/main.nf +++ b/modules/cat/fastq/main.nf @@ -4,8 +4,8 @@ process CAT_FASTQ { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/cat/fastq/meta.yml b/modules/cat/fastq/meta.yml index 1992fa34..c836598e 100644 --- a/modules/cat/fastq/meta.yml +++ b/modules/cat/fastq/meta.yml @@ -1,39 +1,39 @@ name: cat_fastq description: Concatenates fastq files keywords: - - fastq - - concatenate + - fastq + - concatenate tools: - - cat: - description: | - The cat utility reads files sequentially, writing them to the standard output. - documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html - licence: ['GPL-3.0-or-later'] + - cat: + description: | + The cat utility reads files sequentially, writing them to the standard output. + documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: list - description: | - List of input FastQ files to be concatenated. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: list + description: | + List of input FastQ files to be concatenated. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Merged fastq file - pattern: "*.{merged.fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Merged fastq file + pattern: "*.{merged.fastq.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/cellranger/README.md b/modules/cellranger/README.md index d31735cb..312fd218 100644 --- a/modules/cellranger/README.md +++ b/modules/cellranger/README.md @@ -2,23 +2,22 @@ Cell Ranger is a commercial tool from 10X Genomics. The container provided for the cellranger nf-core module is not provided nor supported by 10x Genomics. Updating the Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually. -1. Navigate to the appropriate download page. - - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. +1. Navigate to the appropriate download page. - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. 2. Edit the Dockerfile. Update the Cell Ranger versions in this line: - ```bash - ENV CELLRANGER_VER= - ``` + ```bash + ENV CELLRANGER_VER= + ``` 3. Create and test the container: - ```bash - docker build . -t nfcore/cellranger: - ``` + ```bash + docker build . -t nfcore/cellranger: + ``` 4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. - ```bash - docker push nfcore/cellranger: - ``` + ```bash + docker push nfcore/cellranger: + ``` diff --git a/modules/cellranger/count/meta.yml b/modules/cellranger/count/meta.yml index e4647c98..c7c65751 100644 --- a/modules/cellranger/count/meta.yml +++ b/modules/cellranger/count/meta.yml @@ -1,40 +1,40 @@ name: cellranger_count description: Module to use Cell Ranger's pipelines analyze sequencing data produced from Chromium Single Cell Gene Expression. keywords: - - align - - count - - reference + - align + - count + - reference tools: - - cellranger: - description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. - homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger - documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - doi: "" - licence: 10x Genomics EULA + - cellranger: + description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. + homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + doi: "" + licence: 10x Genomics EULA input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - reference: - type: folder - description: Folder containing all the reference indices needed by Cell Ranger + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - reference: + type: folder + description: Folder containing all the reference indices needed by Cell Ranger output: - - outs: - type: file - description: Files containing the outputs of Cell Ranger - pattern: "sample-${meta.gem}/outs/*" - - versions: - type: file - description: File containing software version - pattern: "versions.yml" + - outs: + type: file + description: Files containing the outputs of Cell Ranger + pattern: "sample-${meta.gem}/outs/*" + - versions: + type: file + description: File containing software version + pattern: "versions.yml" authors: - "@ggabernet" - "@Emiller88" diff --git a/modules/cellranger/mkfastq/README.md b/modules/cellranger/mkfastq/README.md index 07c3919b..e281ded3 100644 --- a/modules/cellranger/mkfastq/README.md +++ b/modules/cellranger/mkfastq/README.md @@ -2,25 +2,23 @@ Bcl2fastq2 and Cell Ranger are commercial tools from Illumina and 10X Genomics, respectively. The container provided for the cellranger nf-core module is not provided nor supported by either Illumina or 10x Genomics. Updating the bcl2fastq2 or Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually. -1. Navigate to the appropriate download pages. - - [bcl2fastq2](https://emea.support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software.html): download the linux rpm installer of the desired bcl2fastq2 version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. - - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. +1. Navigate to the appropriate download pages. - [bcl2fastq2](https://emea.support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software.html): download the linux rpm installer of the desired bcl2fastq2 version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. 2. Edit the Dockerfile. Update the bcl2fastq2 and Cell Ranger versions in this line: - ```bash - ENV BCL2FASTQ2_VER= \ - CELLRANGER_VER= - ``` + ```bash + ENV BCL2FASTQ2_VER= \ + CELLRANGER_VER= + ``` 3. Create and test the container: - ```bash - docker build . -t nfcore/cellrangermkfastq: - ``` + ```bash + docker build . -t nfcore/cellrangermkfastq: + ``` 4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. - ```bash - docker push nfcore/cellrangermkfastq: - ``` + ```bash + docker push nfcore/cellrangermkfastq: + ``` diff --git a/modules/cellranger/mkfastq/meta.yml b/modules/cellranger/mkfastq/meta.yml index e288fb8c..1aff3064 100644 --- a/modules/cellranger/mkfastq/meta.yml +++ b/modules/cellranger/mkfastq/meta.yml @@ -7,31 +7,31 @@ keywords: - illumina - bcl2fastq tools: - - cellranger: - description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. - homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger - documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - doi: "" - licence: 10x Genomics EULA + - cellranger: + description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. + homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + doi: "" + licence: 10x Genomics EULA input: - - bcl: - type: file - description: Base call files - pattern: "*.bcl.bgzf" - - csv: - type: file - description: Sample sheet - pattern: "*.csv" + - bcl: + type: file + description: Base call files + pattern: "*.bcl.bgzf" + - csv: + type: file + description: Sample sheet + pattern: "*.csv" output: - - fastq: - type: file - description: Unaligned FastQ files - pattern: "*.fastq.gz" - - versions: - type: file - description: File containing software version - pattern: "versions.yml" + - fastq: + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" + - versions: + type: file + description: File containing software version + pattern: "versions.yml" authors: - "@ggabernet" - "@Emiller88" diff --git a/modules/cellranger/mkgtf/meta.yml b/modules/cellranger/mkgtf/meta.yml index c160072f..2136ef4e 100644 --- a/modules/cellranger/mkgtf/meta.yml +++ b/modules/cellranger/mkgtf/meta.yml @@ -1,31 +1,31 @@ name: cellranger_mkgtf description: Module to build a filtered gtf needed by the 10x Genomics Cell Ranger tool. Uses the cellranger mkgtf command. keywords: - - reference - - mkref - - index + - reference + - mkref + - index tools: - - cellranger: - description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. - homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger - documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - doi: "" - licence: 10x Genomics EULA + - cellranger: + description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. + homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + doi: "" + licence: 10x Genomics EULA input: - - gtf: - type: file - description: - pattern: "*.gtf" + - gtf: + type: file + description: + pattern: "*.gtf" output: - - gtf: - type: folder - description: gtf transcriptome file - pattern: "*.filtered.gtf" - - versions: - type: file - description: File containing software version - pattern: "versions.yml" + - gtf: + type: folder + description: gtf transcriptome file + pattern: "*.filtered.gtf" + - versions: + type: file + description: File containing software version + pattern: "versions.yml" authors: - "@ggabernet" - "@Emiller88" diff --git a/modules/cellranger/mkref/meta.yml b/modules/cellranger/mkref/meta.yml index 06bf5b93..171f6d08 100644 --- a/modules/cellranger/mkref/meta.yml +++ b/modules/cellranger/mkref/meta.yml @@ -1,37 +1,37 @@ name: cellranger_mkref description: Module to build the reference needed by the 10x Genomics Cell Ranger tool. Uses the cellranger mkref command. keywords: - - reference - - mkref - - index + - reference + - mkref + - index tools: - - cellranger: - description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. - homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger - documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov - doi: "" - licence: 10x Genomics EULA + - cellranger: + description: Cell Ranger by 10x Genomics is a set of analysis pipelines that process Chromium single-cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis, and more. + homepage: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + tool_dev_url: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_ov + doi: "" + licence: 10x Genomics EULA input: - - fasta: - type: file - description: fasta genome file - pattern: "*.{fasta,fa}" - - gtf: - type: file - description: gtf transcriptome file - pattern: "*.gtf" - - reference_name: - type: val - description: name to give the reference folder - pattern: str + - fasta: + type: file + description: fasta genome file + pattern: "*.{fasta,fa}" + - gtf: + type: file + description: gtf transcriptome file + pattern: "*.gtf" + - reference_name: + type: val + description: name to give the reference folder + pattern: str output: - - reference: - type: folder - description: Folder containing all the reference indices needed by Cell Ranger - - versions: - type: file - description: File containing software version - pattern: "versions.yml" + - reference: + type: folder + description: Folder containing all the reference indices needed by Cell Ranger + - versions: + type: file + description: File containing software version + pattern: "versions.yml" authors: - "@ggabernet" diff --git a/modules/centrifuge/centrifuge/main.nf b/modules/centrifuge/centrifuge/main.nf new file mode 100644 index 00000000..3d23fc96 --- /dev/null +++ b/modules/centrifuge/centrifuge/main.nf @@ -0,0 +1,61 @@ +process CENTRIFUGE_CENTRIFUGE { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6' : + 'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }" + + input: + tuple val(meta), path(reads) + path db + val save_unaligned + val save_aligned + val sam_format + + output: + tuple val(meta), path('*report.txt') , emit: report + tuple val(meta), path('*results.txt') , emit: results + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.mapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_mapped + tuple val(meta), path('*.unmapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_unmapped + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}" + def unaligned = '' + def aligned = '' + if (meta.single_end) { + unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' + aligned = save_aligned ? "--al-gz ${prefix}.mapped.fastq.gz" : '' + } else { + unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' + aligned = save_aligned ? "--al-conc-gz ${prefix}.mapped.fastq.gz" : '' + } + def sam_output = sam_format ? "--out-fmt 'sam'" : '' + """ + ## we add "-no-name ._" to ensure silly Mac OSX metafiles files aren't included + db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'` + centrifuge \\ + -x \$db_name \\ + -p $task.cpus \\ + $paired \\ + --report-file ${prefix}.report.txt \\ + -S ${prefix}.results.txt \\ + $unaligned \\ + $aligned \\ + $sam_output \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //') + END_VERSIONS + """ +} diff --git a/modules/centrifuge/centrifuge/meta.yml b/modules/centrifuge/centrifuge/meta.yml new file mode 100644 index 00000000..a252c00c --- /dev/null +++ b/modules/centrifuge/centrifuge/meta.yml @@ -0,0 +1,66 @@ +name: centrifuge_centrifuge +description: Classifies metagenomic sequence data +keywords: + - classify + - metagenomics + - fastq + - db +tools: + - centrifuge: + description: Centrifuge is a classifier for metagenomic sequences. + homepage: https://ccb.jhu.edu/software/centrifuge/ + documentation: https://ccb.jhu.edu/software/centrifuge/manual.shtml + doi: 10.1101/gr.210641.116 + licence: ["GPL v3"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - db: + type: directory + description: Path to directory containing centrifuge database files + - save_unaligned: + type: value + description: If true unmapped fastq files are saved + - save_aligned: + type: value + description: If true mapped fastq files are saved +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - report: + type: file + description: | + File containing a classification summary + pattern: "*.{report.txt}" + - results: + type: file + description: | + File containing classification results + pattern: "*.{results.txt}" + - fastq_unmapped: + type: file + description: Unmapped fastq files + pattern: "*.unmapped.fastq.gz" + - fastq_mapped: + type: file + description: Mapped fastq files + pattern: "*.mapped.fastq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@sofstam" + - "@jfy133" + - "@sateeshperi" diff --git a/modules/centrifuge/kreport/main.nf b/modules/centrifuge/kreport/main.nf new file mode 100644 index 00000000..124cbdba --- /dev/null +++ b/modules/centrifuge/kreport/main.nf @@ -0,0 +1,33 @@ +process CENTRIFUGE_KREPORT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6': + 'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }" + + input: + tuple val(meta), path(results) + path db + + output: + tuple val(meta), path('*.txt') , emit: kreport + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'` + centrifuge-kreport -x \$db_name ${results} > ${prefix}.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //') + END_VERSIONS + """ +} diff --git a/modules/centrifuge/kreport/meta.yml b/modules/centrifuge/kreport/meta.yml new file mode 100644 index 00000000..fbcae24f --- /dev/null +++ b/modules/centrifuge/kreport/meta.yml @@ -0,0 +1,41 @@ +name: "centrifuge_kreport" +description: Creates Kraken-style reports from centrifuge out files +keywords: + - metagenomics +tools: + - centrifuge: + description: Centrifuge is a classifier for metagenomic sequences. + homepage: https://ccb.jhu.edu/software/centrifuge/ + documentation: https://ccb.jhu.edu/software/centrifuge/manual.shtml + doi: 10.1101/gr.210641.116 + licence: ["GPL v3"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: file + description: File containing the centrifuge classification results + pattern: "*.{txt}" + +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" + - kreport: + type: file + description: | + File containing kraken-style report from centrifuge + out files. + pattern: "*.{txt}" +authors: + - "@sofstam" + - "@jfy133" diff --git a/modules/checkm/lineagewf/meta.yml b/modules/checkm/lineagewf/meta.yml index 29c6096e..bcdb472f 100644 --- a/modules/checkm/lineagewf/meta.yml +++ b/modules/checkm/lineagewf/meta.yml @@ -19,7 +19,7 @@ tools: documentation: https://github.com/Ecogenomics/CheckM/wiki tool_dev_url: https://github.com/Ecogenomics/CheckM doi: "10.1101/gr.186072.114" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/chromap/chromap/main.nf b/modules/chromap/chromap/main.nf index cdbf6049..137f0340 100644 --- a/modules/chromap/chromap/main.nf +++ b/modules/chromap/chromap/main.nf @@ -2,10 +2,10 @@ process CHROMAP_CHROMAP { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::chromap=0.1.5 bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::chromap=0.2.1 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' : - 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:963e4fe6a85c548a4018585660aed79780a175d3-0' : + 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:963e4fe6a85c548a4018585660aed79780a175d3-0' }" input: tuple val(meta), path(reads) diff --git a/modules/chromap/chromap/meta.yml b/modules/chromap/chromap/meta.yml index 57936c67..a86fddc9 100644 --- a/modules/chromap/chromap/meta.yml +++ b/modules/chromap/chromap/meta.yml @@ -1,19 +1,19 @@ name: chromap_chromap description: | - Performs preprocessing and alignment of chromatin fastq files to - fasta reference files using chromap. + Performs preprocessing and alignment of chromatin fastq files to + fasta reference files using chromap. keywords: - - chromap - - alignment - - map - - fastq - - bam - - sam - - hi-c - - atac-seq - - chip-seq - - trimming - - duplicate removal + - chromap + - alignment + - map + - fastq + - bam + - sam + - hi-c + - atac-seq + - chip-seq + - trimming + - duplicate removal tools: - chromap: description: Fast alignment and preprocessing of chromatin profiles @@ -21,7 +21,7 @@ tools: documentation: https://github.com/haowenz/chromap tool_dev_url: https://github.com/haowenz/chromap doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: type: map diff --git a/modules/chromap/index/main.nf b/modules/chromap/index/main.nf index 52deaf06..ee370695 100644 --- a/modules/chromap/index/main.nf +++ b/modules/chromap/index/main.nf @@ -1,12 +1,11 @@ process CHROMAP_INDEX { - tag '$fasta' + tag "$fasta" label 'process_medium' - conda (params.enable_conda ? "bioconda::chromap=0.1.5" : null) + conda (params.enable_conda ? "bioconda::chromap=0.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/chromap:0.1.5--h9a82719_0' : - 'quay.io/biocontainers/chromap:0.1.5--h9a82719_0' }" - + 'https://depot.galaxyproject.org/singularity/chromap:0.2.1--hd03093a_0' : + 'quay.io/biocontainers/chromap:0.2.1--hd03093a_0' }" input: path fasta diff --git a/modules/chromap/index/meta.yml b/modules/chromap/index/meta.yml index a6a18fe9..6659221f 100644 --- a/modules/chromap/index/meta.yml +++ b/modules/chromap/index/meta.yml @@ -1,10 +1,10 @@ name: chromap_index description: Indexes a fasta reference genome ready for chromatin profiling. keywords: - - index - - fasta - - genome - - reference + - index + - fasta + - genome + - reference tools: - chromap: description: Fast alignment and preprocessing of chromatin profiles @@ -12,7 +12,7 @@ tools: documentation: https://github.com/haowenz/chromap tool_dev_url: https://github.com/haowenz/chromap doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - fasta: diff --git a/modules/clonalframeml/meta.yml b/modules/clonalframeml/meta.yml index 874a04be..af5cf91b 100644 --- a/modules/clonalframeml/meta.yml +++ b/modules/clonalframeml/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/xavierdidelot/clonalframeml/wiki tool_dev_url: https://github.com/xavierdidelot/ClonalFrameML doi: "10.1371/journal.pcbi.1004041" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/cmseq/polymut/meta.yml b/modules/cmseq/polymut/meta.yml index 49e6b519..56a65cd9 100644 --- a/modules/cmseq/polymut/meta.yml +++ b/modules/cmseq/polymut/meta.yml @@ -17,7 +17,7 @@ tools: homepage: https://github.com/SegataLab/cmseq documentation: https://github.com/SegataLab/cmseq tool_dev_url: https://github.com/SegataLab/cmseq - licence: ['MIT License'] + licence: ["MIT License"] input: - meta: diff --git a/modules/cnvkit/batch/meta.yml b/modules/cnvkit/batch/meta.yml index 0d263041..474c55f2 100644 --- a/modules/cnvkit/batch/meta.yml +++ b/modules/cnvkit/batch/meta.yml @@ -10,7 +10,7 @@ tools: CNVkit is a Python library and command-line software toolkit to infer and visualize copy number from high-throughput DNA sequencing data. It is designed for use with hybrid capture, including both whole-exome and custom target panels, and short-read sequencing platforms such as Illumina and Ion Torrent. homepage: https://cnvkit.readthedocs.io/en/stable/index.html documentation: https://cnvkit.readthedocs.io/en/stable/index.html - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] params: - outdir: type: string @@ -85,9 +85,9 @@ output: description: File containing software versions pattern: "versions.yml" authors: - - "@kaurravneet4123" - - "@KevinMenden" - - "@MaxUlysse" - - "@drpatelh" - - "@fbdtemme" - - "@lassefolkersen" + - "@kaurravneet4123" + - "@KevinMenden" + - "@MaxUlysse" + - "@drpatelh" + - "@fbdtemme" + - "@lassefolkersen" diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf new file mode 100644 index 00000000..69c9d40e --- /dev/null +++ b/modules/cnvpytor/callcnvs/main.nf @@ -0,0 +1,43 @@ +process CNVPYTOR_CALLCNVS { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor) + val bin_sizes + + output: + tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def bins = bin_sizes ?: '1000' + """ + cnvpytor \\ + -root $pytor \\ + -call $bin_sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + """ + touch ${pytor.baseName}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/callcnvs/meta.yml b/modules/cnvpytor/callcnvs/meta.yml new file mode 100644 index 00000000..6ba46b6f --- /dev/null +++ b/modules/cnvpytor/callcnvs/meta.yml @@ -0,0 +1,42 @@ +name: cnvpytor_callcnvs +description: command line tool for calling CNVs in whole genome sequencing data + - CNV calling +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - pytor: + type: file + description: pytor file containing partitions of read depth histograms using mean-shift method + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor files containing cnv calls + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf new file mode 100644 index 00000000..fd2ebe14 --- /dev/null +++ b/modules/cnvpytor/histogram/main.nf @@ -0,0 +1,44 @@ +process CNVPYTOR_HISTOGRAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor) + val bin_sizes + + + output: + tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def bins = bin_sizes ?: '1000' + """ + cnvpytor \\ + -root $pytor \\ + -his $bins + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + """ + touch ${pytor.baseName}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml new file mode 100644 index 00000000..ecd48b9a --- /dev/null +++ b/modules/cnvpytor/histogram/meta.yml @@ -0,0 +1,46 @@ +name: cnvpytor_histogram +description: calculates read depth histograms +keywords: + - cnv calling + - histogram +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor file containing read depth data + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor file containing read depth histograms binned based on given bin size(s) + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf new file mode 100644 index 00000000..6f9abae9 --- /dev/null +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -0,0 +1,49 @@ +process CNVPYTOR_IMPORTREADDEPTH { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(input_file), path(index) + path fasta + path fai + + output: + tuple val(meta), path("*.pytor") , emit: pytor + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "-T ${fasta}" : '' + """ + cnvpytor \\ + -root ${prefix}.pytor \\ + -rd $input_file \\ + $args \\ + $reference + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/importreaddepth/meta.yml b/modules/cnvpytor/importreaddepth/meta.yml new file mode 100644 index 00000000..8b58887e --- /dev/null +++ b/modules/cnvpytor/importreaddepth/meta.yml @@ -0,0 +1,55 @@ +name: cnvpytor_importreaddepth +description: command line tool for CNV/CNA analysis. This step imports the read depth data into a root pytor file. +keywords: + - read depth + - cnv calling +tools: + - cnvpytor -rd: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - input_file: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram}" + - index: + type: file + description: bam file index + pattern: "*.{bai,crai}" + - fasta: + type: file + description: specifies reference genome file (only for cram file without reference genome) + pattern: "*.{fasta,fasta.gz,fa,fa.gz}" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: read depth root file in which read depth data binned to 100 base pair bins will be stored. + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf new file mode 100644 index 00000000..6d7a9c6b --- /dev/null +++ b/modules/cnvpytor/partition/main.nf @@ -0,0 +1,43 @@ +process CNVPYTOR_PARTITION { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor) + val bin_sizes + + output: + tuple val(meta), path("${pytor.baseName}.pytor"), emit: pytor + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def bins = bin_sizes ?: '1000' + """ + cnvpytor \\ + -root $pytor \\ + -partition $bins + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + """ + touch ${pytor.baseName}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml new file mode 100644 index 00000000..17b5e199 --- /dev/null +++ b/modules/cnvpytor/partition/meta.yml @@ -0,0 +1,46 @@ +name: cnvpytor_partition +description: partitioning read depth histograms +keywords: + - cnv calling + - partition histograms +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor file containing read depth data + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - partitions: + type: file + description: pytor file containing partitions of read depth histograms using mean-shift method + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..1bb61a38 --- /dev/null +++ b/modules/cnvpytor/view/main.nf @@ -0,0 +1,60 @@ +process CNVPYTOR_VIEW { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor_files) + val bin_sizes + val output_format + + output: + tuple val(meta), path("*.vcf"), emit: vcf , optional: true + tuple val(meta), path("*.tsv"), emit: tsv , optional: true + tuple val(meta), path("*.xls"), emit: xls , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def output_suffix = output_format ?: 'vcf' + def bins = bin_sizes ?: '1000' + def input = pytor_files.join(" ") + def prefix = task.ext.prefix ?: "${meta.id}" + """ + + python3 < versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + def output_suffix = output_format ?: 'vcf' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${output_suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml new file mode 100644 index 00000000..e4e68fad --- /dev/null +++ b/modules/cnvpytor/view/meta.yml @@ -0,0 +1,56 @@ +name: cnvpytor_view +description: view function to generate vcfs +keywords: + - cnv calling +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor_files: + type: file + description: pytor file containing cnv calls. To merge calls from multiple samples use a list of files. + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + - output_format: + type: string + description: output format of the cnv calls. Valid entries are "tsv", "vcf", and "xls" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - tsv: + type: file + description: tsv file containing cnv calls + pattern: "*.{tsv}" + - vcf: + type: file + description: vcf file containing cnv calls + pattern: "*.{vcf}" + - xls: + type: file + description: xls file containing cnv calls + pattern: "*.{xls}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" + - "@ramprasadn" diff --git a/modules/controlfreec/assesssignificance/main.nf b/modules/controlfreec/assesssignificance/main.nf new file mode 100644 index 00000000..4bdb00b3 --- /dev/null +++ b/modules/controlfreec/assesssignificance/main.nf @@ -0,0 +1,44 @@ +process CONTROLFREEC_ASSESSSIGNIFICANCE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::control-freec=11.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1': + 'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(cnvs), path(ratio) + + output: + tuple val(meta), path("*.p.value.txt"), emit: p_value_txt + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + cat \$(which assess_significance.R) | R --slave --args ${cnvs} ${ratio} + + mv *.p.value.txt ${prefix}.p.value.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.p.value.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/controlfreec/assesssignificance/meta.yml b/modules/controlfreec/assesssignificance/meta.yml new file mode 100644 index 00000000..0451cca3 --- /dev/null +++ b/modules/controlfreec/assesssignificance/meta.yml @@ -0,0 +1,50 @@ +name: controlfreec_assesssignificance +description: Add both Wilcoxon test and Kolmogorov-Smirnov test p-values to each CNV output of FREEC +keywords: + - cna + - cnv + - somatic + - single + - tumor-only +tools: + - controlfreec/assesssignificance: + description: Copy number and genotype annotation from whole genome and whole exome sequencing data. + homepage: http://boevalab.inf.ethz.ch/FREEC + documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html + tool_dev_url: https://github.com/BoevaLab/FREEC/ + doi: "10.1093/bioinformatics/btq635" + licence: ["GPL >=2"] + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - cnvs: + type: file + description: _CNVs file generated by FREEC + pattern: "*._CNVs" + - ratio: + type: file + description: ratio file generated by FREEC + pattern: "*.ratio.txt" + +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" + - p_value_txt: + type: file + description: CNV file containing p_values for each call + pattern: "*.p.value.txt" + +authors: + - "@FriederikeHanssen" diff --git a/modules/controlfreec/freec/main.nf b/modules/controlfreec/freec/main.nf new file mode 100644 index 00000000..857ffdee --- /dev/null +++ b/modules/controlfreec/freec/main.nf @@ -0,0 +1,176 @@ +process CONTROLFREEC_FREEC { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::control-freec=11.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1': + 'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(mpileup_normal), path(mpileup_tumor), path(cpn_normal), path(cpn_tumor), path(minipileup_normal), path(minipileup_tumor) + path fasta + path fai + path snp_position + path known_snps + path known_snps_tbi + path chr_directory + path mappability + path target_bed + path gccontent_profile + + output: + tuple val(meta), path("*_ratio.BedGraph") , emit: bedgraph, optional: true + tuple val(meta), path("*_control.cpn") , emit: control_cpn, optional: true + tuple val(meta), path("*_sample.cpn") , emit: sample_cpn + tuple val(meta), path("GC_profile.*.cpn") , emit: gcprofile_cpn, optional:true + tuple val(meta), path("*_BAF.txt") , emit: BAF + tuple val(meta), path("*_CNVs") , emit: CNV + tuple val(meta), path("*_info.txt") , emit: info + tuple val(meta), path("*_ratio.txt") , emit: ratio + tuple val(meta), path("config.txt") , emit: config + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + //"General" configurations + def bedgraphoutput = task.ext.args?["general"]?["bedgraphoutput"] ? "BedGraphOutput = ${task.ext.args["general"]["bedgraphoutput"]}" : "" + def chr_files = chr_directory ? "chrFiles =\${PWD}/${chr_directory}" : "" + def chr_length = fai ? "chrLenFile = \${PWD}/${fai}" : "" + def breakpointthreshold = task.ext.args?["general"]?["breakpointthreshold"] ? "breakPointThreshold = ${task.ext.args["general"]["breakpointthreshold"]}" : "" + def breakpointtype = task.ext.args?["general"]?["breakpointtype"] ? "breakPointType = ${task.ext.args["general"]["breakpointtype"]}" : "" + def coefficientofvariation = task.ext.args?["general"]?["coefficientofvariation"] ? "coefficientOfVariation = ${task.ext.args["general"]["coefficientofvariation"]}" : "" + def contamination = task.ext.args?["general"]?["contamination"] ? "contamination = ${task.ext.args["general"]["contamination"]}" : "" + def contaminationadjustment = task.ext.args?["general"]?["contaminationadjustment"] ? "contaminationAdjustment = ${task.ext.args["general"]["contaminationadjustment"]}" : "" + def degree = task.ext.args?["general"]?["degree"] ? "degree = ${task.ext.args["general"]["degree"]}" : "" + def forcegccontentnormalization = task.ext.args?["general"]?["forcegccontentnormalization"] ? "forceGCcontentNormalization = ${task.ext.args["general"]["forcegccontentnormalization"]}" : "" + def gccontentprofile = gccontent_profile ? "GCcontentProfile = ${gccontent_profile}" : "" + def mappability = mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : "" + def intercept = task.ext.args?["general"]?["intercept"] ? "intercept = ${task.ext.args["general"]["intercept"]}" : "" + def mincnalength = task.ext.args?["general"]?["mincnalength"] ? "minCNAlength = ${task.ext.args["general"]["mincnalength"]}" : "" + def minmappabilityperwindow = task.ext.args?["general"]?["minmappabilityperwindow"] ? "minMappabilityPerWindow = ${task.ext.args["general"]["minmappabilityperwindow"]}" : "" + def minexpectedgc = task.ext.args?["general"]?["minexpectedgc"] ? "minExpectedGC = ${task.ext.args["general"]["minexpectedgc"]}" : "" + def maxexpectedgc = task.ext.args?["general"]?["maxexpectedgc"] ? "maxExpectedGC = ${task.ext.args["general"]["maxexpectedgc"]}" : "" + def minimalsubclonepresence = task.ext.args?["general"]?["minimalsubclonepresence"] ? "minimalSubclonePresence = ${task.ext.args["general"]["minimalsubclonepresence"]}" : "" + def noisydata = task.ext.args?["general"]?["noisydata"] ? "noisyData = ${task.ext.args["general"]["noisydata"]}" : "" + def output = task.ext.prefix ? "outputDir = \${PWD}/${task.ext.prefix}" : "" + def ploidy = task.ext.args?["general"]?["ploidy"] ? "ploidy = ${task.ext.args["general"]["ploidy"]}" : "" + def printNA = task.ext.args?["general"]?["printNA"] ? "printNA = ${task.ext.args["general"]["printNA"]}" : "" + def readcountthreshold = task.ext.args?["general"]?["readcountthreshold"] ? "readCountThreshold = ${task.ext.args["general"]["readcountthreshold"]}" : "" + def sex = task.ext.args?["general"]?["sex"] ? "sex = ${task.ext.args["general"]["sex"]}" : "" + def step = task.ext.args?["general"]?["step"] ? "step = ${task.ext.args["general"]["step"]}" : "" + def telocentromeric = task.ext.args?["general"]?["telocentromeric"] ? "telocentromeric = ${task.ext.args["general"]["telocentromeric"]} " : "" + def uniquematch = task.ext.args?["general"]?["uniquematch"] ? "uniqueMatch = ${task.ext.args["general"]["uniquematch"]}" : "" + def window = task.ext.args?["general"]?["window"] ? "window = ${task.ext.args["general"]["window"]}" : "" + + //"Control" configurations + def matefile_normal = mpileup_normal ? "mateFile = \${PWD}/${mpileup_normal}" : "" + def matecopynumberfile_normal = cpn_normal ? "mateCopyNumberFile = \${PWD}/${cpn_normal}" : "" + def minipileup_normal = minipileup_normal ? "miniPileup = \${PWD}/${minipileup_normal}" : "" + def inputformat_normal = task.ext.args?["control"]?["inputformat"] ? "inputFormat = ${task.ext.args["control"]["inputformat"]}" : "" + def mateorientation_normal = task.ext.args?["control"]?["mateorientation"] ? "mateOrientation = ${task.ext.args["control"]["mateorientation"]}" : "" + + //"Sample" configuration + def matefile_tumor = mpileup_tumor ? "mateFile = \${PWD}/${mpileup_tumor}" : "" + def matecopynumberfile_tumor = cpn_tumor ? "mateCopyNumberFile = \${PWD}/${cpn_tumor}" : "" + def minipileup_tumor = minipileup_tumor ? "miniPileup = \${PWD}/${minipileup_tumor}" : "" + def inputformat_tumor = task.ext.args?["sample"]?["inputformat"] ? "inputFormat = ${task.ext.args["sample"]["inputformat"]}" : "" + def mateorientation_tumor = task.ext.args?["sample"]?["mateorientation"] ? "mateOrientation = ${task.ext.args["sample"]["mateorientation"]}" : "" + + //"BAF" configuration + def makepileup = snp_position ? "makePileup = \${PWD}/${snp_position}" : "" + def fastafile = fasta ? "fastaFile = \${PWD}/${fasta}" : "" + def minimalcoverageperposition = task.ext.args?["BAF"]?["minimalcoverageperposition"] ? "minimalCoveragePerPosition = ${task.ext.args["BAF"]["minimalcoverageperposition"]}" : "" + def minimalqualityperposition = task.ext.args?["BAF"]?["minimalqualityperposition"] ? "minimalQualityPerPosition = ${task.ext.args["BAF"]["minimalqualityperposition"]}" : "" + def shiftinquality = task.ext.args?["BAF"]?["shiftinquality"] ? "shiftInQuality = ${task.ext.args["BAF"]["shiftinquality"]}" : "" + def snpfile = known_snps ? "SNPfile = \$PWD/${known_snps}" : "" + + //"Target" configuration + def target_bed = target_bed ? "captureRegions = ${target_bed}" : "" + """ + touch config.txt + + echo "[general]" >> config.txt + echo ${bedgraphoutput} >> config.txt + echo ${breakpointthreshold} >> config.txt + echo ${breakpointtype} >> config.txt + echo ${chr_files} >> config.txt + echo ${chr_length} >> config.txt + echo ${coefficientofvariation} >> config.txt + echo ${contamination} >> config.txt + echo ${contaminationadjustment} >> config.txt + echo ${degree} >> config.txt + echo ${forcegccontentnormalization} >> config.txt + echo ${gccontentprofile} >> config.txt + echo ${mappability} >> config.txt + echo ${intercept} >> config.txt + echo ${mincnalength} >> config.txt + echo ${minmappabilityperwindow} >> config.txt + echo ${minexpectedgc} >> config.txt + echo ${maxexpectedgc} >> config.txt + echo ${minimalsubclonepresence} >> config.txt + echo "maxThreads = ${task.cpus}" >> config.txt + echo ${noisydata} >> config.txt + echo ${output} >> config.txt + echo ${ploidy} >> config.txt + echo ${printNA} >> config.txt + echo ${readcountthreshold} >> config.txt + echo ${sex} >> config.txt + echo ${step} >> config.txt + echo ${telocentromeric} >> config.txt + echo ${uniquematch} >> config.txt + echo ${window} >> config.txt + + echo "[control]" >> config.txt + echo ${matefile_normal} >> config.txt + echo ${matecopynumberfile_normal} >> config.txt + echo ${minipileup_normal} >> config.txt + echo ${inputformat_normal} >> config.txt + echo ${mateorientation_normal} >> config.txt + + echo "[sample]" >> config.txt + echo ${matefile_tumor} >> config.txt + echo ${matecopynumberfile_tumor} >> config.txt + echo ${minipileup_tumor} >> config.txt + echo ${inputformat_tumor} >> config.txt + echo ${mateorientation_tumor} >> config.txt + + echo "[BAF]" >> config.txt + echo ${makepileup} >> config.txt + echo ${fastafile} >> config.txt + echo ${minimalcoverageperposition} >> config.txt + echo ${minimalqualityperposition} >> config.txt + echo ${shiftinquality} >> config.txt + echo ${snpfile} >> config.txt + + echo "[target]" >> config.txt + echo ${target_bed} >> config.txt + + freec -conf config.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_ratio.BedGraph + touch ${prefix}_sample.cpn + touch GC_profile.${prefix}.cpn + touch ${prefix}_BAF.txt + touch ${prefix}_CNVs + touch ${prefix}_info.txt + touch ${prefix}_ratio.txt + touch config.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/controlfreec/freec/meta.yml b/modules/controlfreec/freec/meta.yml new file mode 100644 index 00000000..a9a7375e --- /dev/null +++ b/modules/controlfreec/freec/meta.yml @@ -0,0 +1,182 @@ +name: controlfreec_freec +description: Copy number and genotype annotation from whole genome and whole exome sequencing data +keywords: + - cna + - cnv + - somatic + - single + - tumor-only +tools: + - controlfreec/freec: + description: Copy number and genotype annotation from whole genome and whole exome sequencing data. + homepage: http://boevalab.inf.ethz.ch/FREEC + documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html + tool_dev_url: https://github.com/BoevaLab/FREEC/ + doi: "10.1093/bioinformatics/btq635" + licence: ["GPL >=2"] + +input: + - args: + type: map + description: | + Groovy Map containing tool parameters. MUST follow the structure/keywords below and be provided via modules.config. + Parameters marked as (optional) can be removed from the map, if they are not set. All values must be surrounded by quotes, meta map parameters can be set with, i.e. `sex = meta.sex`: + For default values, please check the documentation above. + + ``` + { + [ + "general" :[ + "bedgraphoutput": (optional), + "breakpointthreshold": (optional), + "breakpointtype": (optional), + "coefficientofvariation": (optional), + "contamination": (optional), + "contaminationadjustment": (optional), + "degree": (optional), + "forcegccontentnormalization": (optional), + "gccontentprofile": (optional), + "intercept": (optional), + "mincnalength": (optional), + "minmappabilityperwindow": (optional), + "minexpectedgc": (optional), + "maxexpectedgc": (optional), + "minimalsubclonepresence": (optional), + "noisydata": (optional), + "ploidy": (optional), + "printNA": (optional), + "readcountthreshold": (optional), + "sex": (optional), + "step": (optional), + "telocentromeric": (optional), + "uniquematch": (optional), + "window": (optional) + ], + "control":[ + "inputformat": (required), + "mateorientation": (optional), + ], + "sample":[ + "inputformat": (required), + "mateorientation": (optional), + ], + "BAF":[ + "minimalcoverageperposition": (optional), + "minimalqualityperposition": (optional), + "shiftinquality": (optional) + ] + ] + } + ``` + + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - mateFile_normal: + type: file + description: File with mapped reads + pattern: "*.{sam,bam,pileup(.gz),bowtie(.gz),eland(.gz),arachne(.gz),psl(.gz),bed(.gz)}" + - mateFile_tumor: + type: file + description: File with mapped reads + pattern: "*.{sam,bam,pileup(.gz),bowtie(.gz),eland(.gz),arachne(.gz),psl(.gz),bed(.gz)}" + - cpn_normal: + type: file + description: Raw copy number profiles (optional) + pattern: "*.cpn" + - cpn_tumor: + type: file + description: Raw copy number profiles (optional) + pattern: "*.cpn" + - minipileup_normal: + type: file + description: miniPileup file from previous run (optional) + pattern: "*.pileup" + - minipileup_tumor: + type: file + description: miniPileup file from previous run (optional) + pattern: "*.pileup" + - fasta: + type: file + description: Reference file (optional; required if args 'makePileup' is set) + pattern: "*.{fasta,fna,fa}" + - fai: + type: file + description: Fasta index + pattern: "*.fai" + - snp_position: + type: file + description: + pattern: "*.{}" + - known_snps: + type: file + description: File with known SNPs + pattern: "*.{vcf,vcf.gz}" + - known_snps_tbi: + type: file + description: Index of known_snps + pattern: "*.tbi" + - chr_directory: + type: file + description: Path to directory with chromosome fasta files (optional, required if gccontentprofile is not provided) + pattern: "*/" + - mappability: + type: file + description: Contains information of mappable positions (optional) + pattern: "*.gem" + - target_bed: + type: file + description: Sorted bed file containing capture regions (optional) + pattern: "*.bed" + +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" + - bedgraph: + type: file + description: Bedgraph format for the UCSC genome browser + pattern: ".bedgraph" + - control_cpn: + type: file + description: files with raw copy number profiles + pattern: "*_control.cpn" + - sample_cpn: + type: file + description: files with raw copy number profiles + pattern: "*_sample.cpn" + - gcprofile_cpn: + type: file + description: file with GC-content profile. + pattern: "GC_profile.*.cpn" + - BAF: + type: file + description: file B-allele frequencies for each possibly heterozygous SNP position + pattern: "*_BAF.txt" + - CNV: + type: file + description: file with coordinates of predicted copy number alterations. + pattern: "*_CNVs" + - info: + type: file + description: parsable file with information about FREEC run + pattern: "*_info.txt" + - ratio: + type: file + description: file with ratios and predicted copy number alterations for each window + pattern: "*_ratio.txt" + - config: + type: file + description: Config file used to run Control-FREEC + pattern: "config.txt" + +authors: + - "@FriederikeHanssen" diff --git a/modules/controlfreec/freec2bed/main.nf b/modules/controlfreec/freec2bed/main.nf new file mode 100644 index 00000000..aefc200e --- /dev/null +++ b/modules/controlfreec/freec2bed/main.nf @@ -0,0 +1,42 @@ +process CONTROLFREEC_FREEC2BED { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::control-freec=11.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1': + 'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(ratio) + + output: + tuple val(meta), path("*.bed"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + freec2bed.pl -f ${ratio} ${args} > ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/controlfreec/freec2bed/meta.yml b/modules/controlfreec/freec2bed/meta.yml new file mode 100644 index 00000000..47fff8ab --- /dev/null +++ b/modules/controlfreec/freec2bed/meta.yml @@ -0,0 +1,45 @@ +name: controlfreec_freec2bed +description: Plot Freec output +keywords: + - cna + - cnv + - somatic + - single + - tumor-only +tools: + - controlfreec: + description: Copy number and genotype annotation from whole genome and whole exome sequencing data. + homepage: http://boevalab.inf.ethz.ch/FREEC + documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html + tool_dev_url: https://github.com/BoevaLab/FREEC/ + doi: "10.1093/bioinformatics/btq635" + licence: ["GPL >=2"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ratio: + type: file + description: ratio file generated by FREEC + pattern: "*.ratio.txt" + +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" + - bed: + type: file + description: Bed file + pattern: "*.bed" + +authors: + - "@FriederikeHanssen" diff --git a/modules/controlfreec/freec2circos/main.nf b/modules/controlfreec/freec2circos/main.nf new file mode 100644 index 00000000..8f9be300 --- /dev/null +++ b/modules/controlfreec/freec2circos/main.nf @@ -0,0 +1,42 @@ +process CONTROLFREEC_FREEC2CIRCOS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::control-freec=11.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1': + 'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(ratio) + + output: + tuple val(meta), path("*.circos.txt"), emit: circos + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + freec2circos.pl -f ${ratio} ${args} > ${prefix}.circos.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.circos.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/controlfreec/freec2circos/meta.yml b/modules/controlfreec/freec2circos/meta.yml new file mode 100644 index 00000000..ff845a82 --- /dev/null +++ b/modules/controlfreec/freec2circos/meta.yml @@ -0,0 +1,45 @@ +name: controlfreec_freec2circos +description: Format Freec output to circos input format +keywords: + - cna + - cnv + - somatic + - single + - tumor-only +tools: + - controlfreec: + description: Copy number and genotype annotation from whole genome and whole exome sequencing data. + homepage: http://boevalab.inf.ethz.ch/FREEC + documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html + tool_dev_url: https://github.com/BoevaLab/FREEC/ + doi: "10.1093/bioinformatics/btq635" + licence: ["GPL >=2"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ratio: + type: file + description: ratio file generated by FREEC + pattern: "*.ratio.txt" + +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" + - circos: + type: file + description: Txt file + pattern: "*.circos.txt" + +authors: + - "@FriederikeHanssen" diff --git a/modules/controlfreec/makegraph/main.nf b/modules/controlfreec/makegraph/main.nf new file mode 100644 index 00000000..a8954d72 --- /dev/null +++ b/modules/controlfreec/makegraph/main.nf @@ -0,0 +1,52 @@ +process CONTROLFREEC_MAKEGRAPH { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::control-freec=11.6" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1': + 'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(ratio), path(baf) + + output: + tuple val(meta), path("*_BAF.png") , emit: png_baf + tuple val(meta), path("*_ratio.log2.png"), emit: png_ratio_log2 + tuple val(meta), path("*_ratio.png") , emit: png_ratio + + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def baf = baf ?: "" + """ + cat \$(which makeGraph.R) | R --slave --args ${args} ${ratio} ${baf} + + mv *_BAF.txt.png ${prefix}_BAF.png + mv *_ratio.txt.log2.png ${prefix}_ratio.log2.png + mv *_ratio.txt.png ${prefix}_ratio.png + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_BAF.png + touch ${prefix}_ratio.log2.png + touch ${prefix}_ratio.png + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/controlfreec/makegraph/meta.yml b/modules/controlfreec/makegraph/meta.yml new file mode 100644 index 00000000..a207ec8c --- /dev/null +++ b/modules/controlfreec/makegraph/meta.yml @@ -0,0 +1,58 @@ +name: controlfreec_makegraph +description: Plot Freec output +keywords: + - cna + - cnv + - somatic + - single + - tumor-only +tools: + - controlfreec: + description: Copy number and genotype annotation from whole genome and whole exome sequencing data. + homepage: http://boevalab.inf.ethz.ch/FREEC + documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html + tool_dev_url: https://github.com/BoevaLab/FREEC/ + doi: "10.1093/bioinformatics/btq635" + licence: ["GPL >=2"] + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ratio: + type: file + description: ratio file generated by FREEC + pattern: "*.ratio.txt" + - baf: + type: file + description: .BAF file generated by FREEC + pattern: "*.BAF" + +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" + - png_baf: + type: file + description: Image of BAF plot + pattern: "*_BAF.png" + - png_ratio_log2: + type: file + description: Image of ratio log2 plot + pattern: "*_ratio.log2.png" + - png_ratio: + type: file + description: Image of ratio plot + pattern: "*_ratio.png" + +authors: + - "@FriederikeHanssen" diff --git a/modules/cooler/cload/meta.yml b/modules/cooler/cload/meta.yml index 8ac75911..ddb0443b 100644 --- a/modules/cooler/cload/meta.yml +++ b/modules/cooler/cload/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://cooler.readthedocs.io/en/latest/index.html tool_dev_url: https://github.com/open2c/cooler doi: "10.1093/bioinformatics/btz540" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: diff --git a/modules/cooler/digest/meta.yml b/modules/cooler/digest/meta.yml index 6ce95ad7..56e2c08c 100644 --- a/modules/cooler/digest/meta.yml +++ b/modules/cooler/digest/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://cooler.readthedocs.io/en/latest/index.html tool_dev_url: https://github.com/open2c/cooler doi: "10.1093/bioinformatics/btz540" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - fasta: diff --git a/modules/cooler/dump/meta.yml b/modules/cooler/dump/meta.yml index a9d1afd5..fc12cdf3 100644 --- a/modules/cooler/dump/meta.yml +++ b/modules/cooler/dump/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://cooler.readthedocs.io/en/latest/index.html tool_dev_url: https://github.com/open2c/cooler doi: "10.1093/bioinformatics/btz540" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - meta: diff --git a/modules/cooler/merge/meta.yml b/modules/cooler/merge/meta.yml index f5c0a733..2688dc96 100644 --- a/modules/cooler/merge/meta.yml +++ b/modules/cooler/merge/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://cooler.readthedocs.io/en/latest/index.html tool_dev_url: https://github.com/open2c/cooler doi: "10.1093/bioinformatics/btz540" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: diff --git a/modules/cooler/zoomify/meta.yml b/modules/cooler/zoomify/meta.yml index 74bdbf44..d9e12b05 100644 --- a/modules/cooler/zoomify/meta.yml +++ b/modules/cooler/zoomify/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://cooler.readthedocs.io/en/latest/index.html tool_dev_url: https://github.com/open2c/cooler doi: "10.1093/bioinformatics/btz540" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: diff --git a/modules/csvtk/concat/meta.yml b/modules/csvtk/concat/meta.yml index 6c7f9f10..2d2f856d 100644 --- a/modules/csvtk/concat/meta.yml +++ b/modules/csvtk/concat/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://bioinf.shenwei.me/csvtk tool_dev_url: https://github.com/shenwei356/csvtk doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/csvtk/split/meta.yml b/modules/csvtk/split/meta.yml index 45b71d14..64373633 100644 --- a/modules/csvtk/split/meta.yml +++ b/modules/csvtk/split/meta.yml @@ -6,14 +6,13 @@ keywords: - tsv tools: - csvtk: - description: - CSVTK is a cross-platform, efficient and practical CSV/TSV toolkit - that allows rapid data investigation and manipulation. + description: CSVTK is a cross-platform, efficient and practical CSV/TSV toolkit + that allows rapid data investigation and manipulation. homepage: https://bioinf.shenwei.me/csvtk/ documentation: https://bioinf.shenwei.me/csvtk/ tool_dev_url: https://github.com/shenwei356/csvtk doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/custom/dumpsoftwareversions/meta.yml b/modules/custom/dumpsoftwareversions/meta.yml index 5b5b8a60..60b546a0 100644 --- a/modules/custom/dumpsoftwareversions/meta.yml +++ b/modules/custom/dumpsoftwareversions/meta.yml @@ -8,7 +8,7 @@ tools: description: Custom module used to dump software versions within the nf-core pipeline template homepage: https://github.com/nf-core/tools documentation: https://github.com/nf-core/tools - licence: ['MIT'] + licence: ["MIT"] input: - versions: type: file diff --git a/modules/custom/getchromsizes/main.nf b/modules/custom/getchromsizes/main.nf index 39da7d34..0eabf3a4 100644 --- a/modules/custom/getchromsizes/main.nf +++ b/modules/custom/getchromsizes/main.nf @@ -2,10 +2,10 @@ process CUSTOM_GETCHROMSIZES { tag "$fasta" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: path fasta diff --git a/modules/custom/getchromsizes/meta.yml b/modules/custom/getchromsizes/meta.yml index eb1db4bb..ee6c2571 100644 --- a/modules/custom/getchromsizes/meta.yml +++ b/modules/custom/getchromsizes/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://www.htslib.org/doc/samtools.html tool_dev_url: https://github.com/samtools/samtools doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + licence: ["MIT"] input: - fasta: @@ -33,7 +33,6 @@ output: description: File containing software version pattern: "versions.yml" - authors: - "@tamara-hodgetts" - "@chris-cheshire" diff --git a/modules/custom/sratoolsncbisettings/main.nf b/modules/custom/sratoolsncbisettings/main.nf new file mode 100644 index 00000000..21bf3005 --- /dev/null +++ b/modules/custom/sratoolsncbisettings/main.nf @@ -0,0 +1,20 @@ +process CUSTOM_SRATOOLSNCBISETTINGS { + tag 'ncbi-settings' + label 'process_low' + + conda (params.enable_conda ? 'bioconda::sra-tools=2.11.0' : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5321ha49a11a_3' : + 'quay.io/biocontainers/sra-tools:2.11.0--pl5321ha49a11a_3' }" + + output: + path('*.mkfg') , emit: ncbi_settings + path 'versions.yml', emit: versions + + when: + task.ext.when == null || task.ext.when + + shell: + config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" + template 'detect_ncbi_settings.sh' +} diff --git a/modules/custom/sratoolsncbisettings/meta.yml b/modules/custom/sratoolsncbisettings/meta.yml new file mode 100644 index 00000000..01e98856 --- /dev/null +++ b/modules/custom/sratoolsncbisettings/meta.yml @@ -0,0 +1,28 @@ +name: "sratoolsncbisettings" +description: Test for the presence of suitable NCBI settings or create them on the fly. +keywords: + - NCBI + - settings + - sra-tools + - prefetch + - fasterq-dump +tools: + - "sratools": + description: "SRA Toolkit and SDK from NCBI" + homepage: https://github.com/ncbi/sra-tools + documentation: https://github.com/ncbi/sra-tools/wiki + tool_dev_url: https://github.com/ncbi/sra-tools + licence: "['Public Domain']" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - ncbi_settings: + type: file + description: An NCBI user settings file. + pattern: "*.mkfg" + +authors: + - "@Midnighter" diff --git a/modules/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh b/modules/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh new file mode 100644 index 00000000..cfe3a324 --- /dev/null +++ b/modules/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +set -u + + +# Get the expected NCBI settings path and define the environment variable +# `NCBI_SETTINGS`. +eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" + +# If the user settings do not exist yet, create a file suitable for `prefetch` +# and `fasterq-dump`. If an existing settings file does not contain the required +# values, error out with a helpful message. +if [[ ! -f "${NCBI_SETTINGS}" ]]; then + printf '!{config}' > 'user-settings.mkfg' +else + prefetch --help &> /dev/null + if [[ $? = 78 ]]; then + echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ + "missing the required entries for /LIBS/GUID and"\ + "/libs/cloud/report_instance_identity."\ + "Feel free to add the following to your settings file:" >&2 + echo "$(printf '!{config}')" >&2 + exit 1 + fi + fasterq-dump --help &> /dev/null + if [[ $? = 78 ]]; then + echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ + "missing the required entries for /LIBS/GUID and"\ + "/libs/cloud/report_instance_identity."\ + "Feel free to add the following to your settings file:" >&2 + echo "$(printf '!{config}')" >&2 + exit 1 + fi + if [[ "${NCBI_SETTINGS}" != *.mkfg ]]; then + echo "The detected settings '${NCBI_SETTINGS}' do not have the required"\ + "file extension '.mkfg'." >&2 + exit 1 + fi + cp "${NCBI_SETTINGS}" ./ +fi + +cat <<-END_VERSIONS > versions.yml +"!{task.process}": + sratools: $(vdb-config --version 2>&1 | grep -Eo '[0-9.]+') +END_VERSIONS diff --git a/modules/cutadapt/meta.yml b/modules/cutadapt/meta.yml index b4e6f6e7..bcfe291c 100644 --- a/modules/cutadapt/meta.yml +++ b/modules/cutadapt/meta.yml @@ -11,7 +11,7 @@ tools: Cutadapt finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads. documentation: https://cutadapt.readthedocs.io/en/stable/index.html doi: DOI:10.14806/ej.17.1.200 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/damageprofiler/meta.yml b/modules/damageprofiler/meta.yml index 19ba908f..b41aeb8d 100644 --- a/modules/damageprofiler/meta.yml +++ b/modules/damageprofiler/meta.yml @@ -18,7 +18,7 @@ tools: documentation: https://damageprofiler.readthedocs.io/ tool_dev_url: https://github.com/Integrative-Transcriptomics/DamageProfiler doi: "10.1093/bioinformatics/btab190" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/dastool/dastool/main.nf b/modules/dastool/dastool/main.nf index 53dfea19..a7d9c6f6 100644 --- a/modules/dastool/dastool/main.nf +++ b/modules/dastool/dastool/main.nf @@ -2,27 +2,28 @@ process DASTOOL_DASTOOL { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::das_tool=1.1.3" : null) + conda (params.enable_conda ? "bioconda::das_tool=1.1.4" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/das_tool:1.1.3--r41hdfd78af_0' : - 'quay.io/biocontainers/das_tool:1.1.3--r41hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/das_tool:1.1.4--r41hdfd78af_1' : + 'quay.io/biocontainers/das_tool:1.1.4--r41hdfd78af_1' }" input: tuple val(meta), path(contigs), path(bins) path(proteins) path(db_directory) - val(search_engine) output: tuple val(meta), path("*.log") , emit: log - tuple val(meta), path("*_summary.txt") , emit: summary - tuple val(meta), path("*_DASTool_scaffolds2bin.txt") , emit: scaffolds2bin + tuple val(meta), path("*_summary.tsv") , optional: true, emit: summary + tuple val(meta), path("*_DASTool_contig2bin.tsv") , optional: true, emit: contig2bin tuple val(meta), path("*.eval") , optional: true, emit: eval tuple val(meta), path("*_DASTool_bins/*.fa") , optional: true, emit: bins tuple val(meta), path("*.pdf") , optional: true, emit: pdfs - tuple val(meta), path("*.proteins.faa") , optional: true, emit: fasta_proteins + tuple val(meta), path("*.candidates.faa") , optional: true, emit: fasta_proteins + tuple val(meta), path("*.faa") , optional: true, emit: candidates_faa tuple val(meta), path("*.archaea.scg") , optional: true, emit: fasta_archaea_scg tuple val(meta), path("*.bacteria.scg") , optional: true, emit: fasta_bacteria_scg + tuple val(meta), path("*.b6") , optional: true, emit: b6 tuple val(meta), path("*.seqlength") , optional: true, emit: seqlength path "versions.yml" , emit: versions @@ -33,17 +34,12 @@ process DASTOOL_DASTOOL { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def bin_list = bins instanceof List ? bins.join(",") : "$bins" - def engine = search_engine ? "--search_engine $search_engine" : "--search_engine diamond" def db_dir = db_directory ? "--db_directory $db_directory" : "" def clean_contigs = contigs.toString() - ".gz" def decompress_contigs = contigs.toString() == clean_contigs ? "" : "gunzip -q -f $contigs" - def decompress_proteins = proteins ? "gunzip -f $proteins" : "" def clean_proteins = proteins ? proteins.toString() - ".gz" : "" - def proteins_pred = proteins ? "--proteins $clean_proteins" : "" - - if (! search_engine) { - log.info('[DAS_Tool] Default search engine (USEARCH) is proprietary software and not available in bioconda. Using DIAMOND as alternative.') - } + def decompress_proteins = proteins ? "gunzip -f $proteins" : "" + def proteins_pred = proteins ? "-p $clean_proteins" : "" """ $decompress_proteins @@ -53,15 +49,14 @@ process DASTOOL_DASTOOL { $args \\ $proteins_pred \\ $db_dir \\ - $engine \\ -t $task.cpus \\ - --bins $bin_list \\ + -i $bin_list \\ -c $clean_contigs \\ -o $prefix cat <<-END_VERSIONS > versions.yml "${task.process}": - dastool: \$( DAS_Tool --version 2>&1 | grep "DAS Tool" | sed 's/DAS Tool version //' ) + dastool: \$( DAS_Tool --version 2>&1 | grep "DAS Tool" | sed 's/DAS Tool //' ) END_VERSIONS """ } diff --git a/modules/dastool/dastool/meta.yml b/modules/dastool/dastool/meta.yml index 12d31e9f..0889ca47 100644 --- a/modules/dastool/dastool/meta.yml +++ b/modules/dastool/dastool/meta.yml @@ -20,7 +20,7 @@ tools: documentation: https://github.com/cmks/DAS_Tool tool_dev_url: https://github.com/cmks/DAS_Tool doi: "10.1038/s41564-018-0171-1" - licence: ['BSD'] + licence: ["BSD"] input: - meta: @@ -34,8 +34,8 @@ input: pattern: "*.{fa.gz,fas.gz,fasta.gz}" - bins: type: file - description: "Scaffolds2bin tabular file generated with dastool/scaffolds2bin" - pattern: "*.scaffolds2bin.tsv" + description: "FastaToContig2Bin tabular file generated with dastool/fastatocontig2bin" + pattern: "*.tsv" - proteins: type: file description: Predicted proteins in prodigal fasta format (>scaffoldID_geneNo) @@ -43,10 +43,6 @@ input: - db_directory: type: file description: (optional) Directory of single copy gene database. - - search_engine: - type: val - description: Engine used for single copy gene identification. USEARCH is not supported due to it being proprietary [blast/diamond] - output: - meta: @@ -66,14 +62,17 @@ output: type: file description: Summary of output bins including quality and completeness estimates pattern: "*summary.txt" - - scaffolds2bin: + - contig2bin: type: file description: Scaffolds to bin file of output bins - pattern: "*.scaffolds2bin.txt" + pattern: "*.contig2bin.txt" - eval: type: file description: Quality and completeness estimates of input bin sets pattern: "*.eval" + - bins: + description: Final refined bins in fasta format + pattern: "*.fa" - pdfs: type: file description: Plots showing the amount of high quality bins and score distribution of bins per method @@ -84,12 +83,16 @@ output: pattern: "*.proteins.faa" - fasta_archaea_scg: type: file - description: Results of archaeal single-copy-gene prediction + description: Results of archaeal single-copy-gene prediction pattern: "*.archaea.scg" - fasta_bacteria_scg: type: file description: Results of bacterial single-copy-gene prediction pattern: "*.bacteria.scg" + - b6: + type: file + description: Results in b6 format + pattern: "*.b6" - seqlength: type: file description: Summary of contig lengths diff --git a/modules/dastool/fastatocontig2bin/main.nf b/modules/dastool/fastatocontig2bin/main.nf new file mode 100644 index 00000000..8bb13380 --- /dev/null +++ b/modules/dastool/fastatocontig2bin/main.nf @@ -0,0 +1,41 @@ +process DASTOOL_FASTATOCONTIG2BIN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::das_tool=1.1.4" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/das_tool:1.1.4--r41hdfd78af_1' : + 'quay.io/biocontainers/das_tool:1.1.4--r41hdfd78af_1' }" + + input: + tuple val(meta), path(fasta) + val(extension) + + output: + tuple val(meta), path("*.tsv"), emit: fastatocontig2bin + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def file_extension = extension ? extension : "fasta" + def clean_fasta = fasta.toString() - ".gz" + def decompress_fasta = fasta.toString() == clean_fasta ? "" : "gunzip -q -f $fasta" + """ + $decompress_fasta + + Fasta_to_Contig2Bin.sh \\ + $args \\ + -i . \\ + -e $file_extension \\ + > ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + dastool: \$( DAS_Tool --version 2>&1 | grep "DAS Tool" | sed 's/DAS Tool //' ) + END_VERSIONS + """ +} diff --git a/modules/dastool/fastatocontig2bin/meta.yml b/modules/dastool/fastatocontig2bin/meta.yml new file mode 100644 index 00000000..1176ae96 --- /dev/null +++ b/modules/dastool/fastatocontig2bin/meta.yml @@ -0,0 +1,56 @@ +name: dastool_fastatocontig2bin +description: Helper script to convert a set of bins in fasta format to tabular scaffolds2bin format +keywords: + - binning + - das tool + - table + - de novo + - bins + - contigs + - assembly + - das_tool +tools: + - dastool: + description: | + DAS Tool is an automated method that integrates the results + of a flexible number of binning algorithms to calculate an optimized, non-redundant + set of bins from a single assembly. + + homepage: https://github.com/cmks/DAS_Tool + documentation: https://github.com/cmks/DAS_Tool + tool_dev_url: https://github.com/cmks/DAS_Tool + doi: "10.1038/s41564-018-0171-1" + licence: ["BSD"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Fasta of list of fasta files recommended to be gathered via with .collect() of bins + pattern: "*.{fa,fa.gz,fas,fas.gz,fna,fna.gz,fasta,fasta.gz}" + - extension: + type: val + description: Fasta file extension (fa | fas | fasta | ...), without .gz suffix, if gzipped 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" + - fastatocontig2bin: + type: file + description: tabular contig2bin file for DAS tool input + pattern: "*.tsv" + +authors: + - "@maxibor" + - "@jfy133" diff --git a/modules/dastool/scaffolds2bin/main.nf b/modules/dastool/scaffolds2bin/main.nf index 6e9fcdc2..365872fd 100644 --- a/modules/dastool/scaffolds2bin/main.nf +++ b/modules/dastool/scaffolds2bin/main.nf @@ -22,9 +22,10 @@ process DASTOOL_SCAFFOLDS2BIN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def file_extension = extension ? extension : "fasta" - + def clean_fasta = fasta.toString() - ".gz" + def decompress_fasta = fasta.toString() == clean_fasta ? "" : "gunzip -q -f $fasta" """ - gunzip -f *.${file_extension}.gz + $decompress_fasta Fasta_to_Scaffolds2Bin.sh \\ $args \\ diff --git a/modules/dastool/scaffolds2bin/meta.yml b/modules/dastool/scaffolds2bin/meta.yml index f41a3cf2..823084b3 100644 --- a/modules/dastool/scaffolds2bin/meta.yml +++ b/modules/dastool/scaffolds2bin/meta.yml @@ -20,7 +20,7 @@ tools: documentation: https://github.com/cmks/DAS_Tool tool_dev_url: https://github.com/cmks/DAS_Tool doi: "10.1038/s41564-018-0171-1" - licence: ['BSD'] + licence: ["BSD"] input: - meta: @@ -30,14 +30,11 @@ input: e.g. [ id:'test', single_end:false ] - fasta: type: file - description: Fasta of list of fasta files recommended to be gathered via with .collect() of bins - pattern: "*.{fa,fas,fasta}" - - binner: - type: val - description: Name of the binning software (optional) + description: Fasta or list of fasta files recommended to be gathered via with .collect() of bins + pattern: "*.{fa,fa.gz,fas,fas.gz,fna,fna.gz,fasta,fasta.gz}" - extension: type: val - description: Fasta file extension (fa | fas | fasta | ...) + description: Fasta file extension (fa | fas | fasta | ...), but without .gz suffix, even if gzipped input. output: - meta: diff --git a/modules/dedup/meta.yml b/modules/dedup/meta.yml index 0ddd648f..17cf4e26 100644 --- a/modules/dedup/meta.yml +++ b/modules/dedup/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://dedup.readthedocs.io/en/latest/ tool_dev_url: https://github.com/apeltzer/DeDup doi: "10.1186/s13059-016-0918-z" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -54,7 +54,5 @@ output: description: Dedup log information pattern: "*log" - - authors: - "@jfy133" diff --git a/modules/deeparg/downloaddata/main.nf b/modules/deeparg/downloaddata/main.nf index aacdc778..4e007f14 100644 --- a/modules/deeparg/downloaddata/main.nf +++ b/modules/deeparg/downloaddata/main.nf @@ -7,6 +7,12 @@ process DEEPARG_DOWNLOADDATA { container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/deeparg:1.0.2--pyhdfd78af_1' : 'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }" + /* + We have to force singularity to run with -B to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). + Original report: https://github.com/nf-core/funcscan/issues/23 + */ + containerOptions { "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : '' } + input: diff --git a/modules/deeparg/downloaddata/meta.yml b/modules/deeparg/downloaddata/meta.yml index 6cfa192e..b6b1881e 100644 --- a/modules/deeparg/downloaddata/meta.yml +++ b/modules/deeparg/downloaddata/meta.yml @@ -14,10 +14,10 @@ tools: documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ doi: "10.1186/s40168-018-0401-z" - licence: ['MIT'] + licence: ["MIT"] input: - - none: There is no input. This module downloads a pre-built database for use with deepARG. + - none: No input required for download module. output: - versions: diff --git a/modules/deeparg/predict/main.nf b/modules/deeparg/predict/main.nf index 3e478e59..7bb4f935 100644 --- a/modules/deeparg/predict/main.nf +++ b/modules/deeparg/predict/main.nf @@ -6,8 +6,13 @@ process DEEPARG_PREDICT { conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity//deeparg:1.0.2--pyhdfd78af_1' : + 'https://depot.galaxyproject.org/singularity/deeparg:1.0.2--pyhdfd78af_1' : 'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }" + /* + We have to force singularity to run with -B to allow reading of a problematic file with borked read-write permissions in an upstream dependency (theanos). + Original report: https://github.com/nf-core/funcscan/issues/23 + */ + containerOptions { "${workflow.containerEngine}" == 'singularity' ? '-B $(which bash):/usr/local/lib/python2.7/site-packages/Theano-0.8.2-py2.7.egg-info/PKG-INFO' : '' } input: tuple val(meta), path(fasta), val(model) diff --git a/modules/deeparg/predict/meta.yml b/modules/deeparg/predict/meta.yml index 244b9df7..fa50c70e 100644 --- a/modules/deeparg/predict/meta.yml +++ b/modules/deeparg/predict/meta.yml @@ -16,7 +16,7 @@ tools: documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ doi: "10.1186/s40168-018-0401-z" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/deeptools/bamcoverage/main.nf b/modules/deeptools/bamcoverage/main.nf new file mode 100644 index 00000000..926bf0ad --- /dev/null +++ b/modules/deeptools/bamcoverage/main.nf @@ -0,0 +1,37 @@ +process DEEPTOOLS_BAMCOVERAGE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::deeptools=3.5.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0': + 'quay.io/biocontainers/deeptools:3.5.1--py_0' }" + + input: + tuple val(meta), path(input), path(input_index) + + output: + tuple val(meta), path("*.bigWig") , emit: bigwig, optional: true + tuple val(meta), path("*.bedgraph") , emit: bedgraph, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}.bigWig" + + """ + bamCoverage \\ + --bam $input \\ + $args \\ + --numberOfProcessors ${task.cpus} \\ + --outFileName ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deeptools: \$(bamCoverage --version | sed -e "s/bamCoverage //g") + END_VERSIONS + """ +} diff --git a/modules/deeptools/bamcoverage/meta.yml b/modules/deeptools/bamcoverage/meta.yml new file mode 100644 index 00000000..fb92168f --- /dev/null +++ b/modules/deeptools/bamcoverage/meta.yml @@ -0,0 +1,49 @@ +name: deeptools_bamcoverage +description: This tool takes an alignment of reads or fragments as input (BAM file) and generates a coverage track (bigWig or bedGraph) as output. +keywords: + - sort +tools: + - deeptools: + description: A set of user-friendly tools for normalization and visualzation of deep-sequencing data + homepage: https://deeptools.readthedocs.io/en/develop/content/tools/bamCoverage.html + documentation: https://deeptools.readthedocs.io/en/develop/content/tools/bamCoverage.html + tool_dev_url: https://github.com/deeptools/deepTools/ + doi: "https://doi.org/10.1093/nar/gkw257" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" + +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" + - bigWig: + type: file + description: BigWig file + pattern: "*.bigWig" + - bedgraph: + type: file + description: Bedgraph file + pattern: "*.bedgraph" + +authors: + - "@FriederikeHanssen" diff --git a/modules/deeptools/computematrix/meta.yml b/modules/deeptools/computematrix/meta.yml index 584fade1..eaa990dd 100644 --- a/modules/deeptools/computematrix/meta.yml +++ b/modules/deeptools/computematrix/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://deeptools.readthedocs.io/en/develop/index.html tool_dev_url: https://github.com/deeptools/deepTools doi: "10.1093/nar/gku365" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/deeptools/plotfingerprint/meta.yml b/modules/deeptools/plotfingerprint/meta.yml index 3acd1471..07c25748 100644 --- a/modules/deeptools/plotfingerprint/meta.yml +++ b/modules/deeptools/plotfingerprint/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://deeptools.readthedocs.io/en/develop/index.html tool_dev_url: https://github.com/deeptools/deepTools doi: "10.1093/nar/gku365" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/deeptools/plotheatmap/meta.yml b/modules/deeptools/plotheatmap/meta.yml index 34f2865b..ea206fb6 100644 --- a/modules/deeptools/plotheatmap/meta.yml +++ b/modules/deeptools/plotheatmap/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://deeptools.readthedocs.io/en/develop/index.html tool_dev_url: https://github.com/deeptools/deepTools doi: "10.1093/nar/gku365" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/deeptools/plotprofile/meta.yml b/modules/deeptools/plotprofile/meta.yml index 5b61aed4..795fda44 100644 --- a/modules/deeptools/plotprofile/meta.yml +++ b/modules/deeptools/plotprofile/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://deeptools.readthedocs.io/en/develop/index.html tool_dev_url: https://github.com/deeptools/deepTools doi: "10.1093/nar/gku365" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/deepvariant/main.nf b/modules/deepvariant/main.nf index c5e81997..e2a0bee7 100644 --- a/modules/deepvariant/main.nf +++ b/modules/deepvariant/main.nf @@ -17,8 +17,8 @@ process DEEPVARIANT { path(fai) output: - tuple val(meta), path("*.vcf.gz") , emit: vcf - tuple val(meta), path("*g.vcf.gz"), emit: gvcf + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf path "versions.yml" , emit: versions when: @@ -26,7 +26,7 @@ process DEEPVARIANT { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" def regions = intervals ? "--regions ${intervals}" : "" """ @@ -44,4 +44,16 @@ process DEEPVARIANT { deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.g.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ } diff --git a/modules/deepvariant/meta.yml b/modules/deepvariant/meta.yml index d4423d69..b2d480a3 100644 --- a/modules/deepvariant/meta.yml +++ b/modules/deepvariant/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/google/deepvariant tool_dev_url: https://github.com/google/deepvariant doi: "https://doi.org/10.1038/nbt.4235" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: diff --git a/modules/delly/call/meta.yml b/modules/delly/call/meta.yml index 56539188..642e095d 100644 --- a/modules/delly/call/meta.yml +++ b/modules/delly/call/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/dellytools/delly/blob/master/README.md tool_dev_url: None doi: "DOI:10.1093/bioinformatics/bts378" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - meta: diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 955952dc..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -2,20 +2,26 @@ process DIAMOND_BLASTP { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) - path db + path db + val out_ext + val blast_columns output: - tuple val(meta), path('*.txt'), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,6 +29,21 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' + switch ( out_ext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +52,9 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 228c1a22..3aa81e53 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -12,32 +12,71 @@ tools: documentation: https://github.com/bbuchfink/diamond/wiki tool_dev_url: https://github.com/bbuchfink/diamond doi: "doi:10.1038/s41592-021-01101-x" - licence: ['GPL v3.0'] + licence: ["GPL v3.0"] input: - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fasta: - type: file - description: Input fasta file containing query sequences - pattern: "*.{fa,fasta}" + type: file + description: Input fasta file containing query sequences + pattern: "*.{fa,fasta}" - db: - type: directory - description: Directory containing the protein blast database - pattern: "*" + type: directory + description: Directory containing the protein blast database + pattern: "*" + - out_ext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" + - blast_columns: + type: string + description: | + Optional space separated list of DIAMOND tabular BLAST output keywords + used for in conjunction with the 'txt' out_ext option (--outfmt 6). See + DIAMOND documnetation for more information. output: + - blast: + type: file + description: File containing blastp hits + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" - txt: - type: file - description: File containing blastp hits - pattern: "*.{blastp.txt}" + type: file + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3700bd36..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -2,20 +2,26 @@ process DIAMOND_BLASTX { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) - path db + path db + val out_ext + val blast_columns output: - tuple val(meta), path('*.txt'), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,6 +29,21 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' + switch ( out_ext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +52,9 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 4a3ab9b6..2dcd7bc6 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -12,32 +12,65 @@ tools: documentation: https://github.com/bbuchfink/diamond/wiki tool_dev_url: https://github.com/bbuchfink/diamond doi: "doi:10.1038/s41592-021-01101-x" - licence: ['GPL v3.0'] + licence: ["GPL v3.0"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input fasta file containing query sequences - pattern: "*.{fa,fasta}" - - db: - type: directory - description: Directory containing the nucelotide blast database - pattern: "*" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input fasta file containing query sequences + pattern: "*.{fa,fasta}" + - db: + type: directory + description: Directory containing the nucelotide blast database + pattern: "*" + - out_ext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: - - txt: - type: file - description: File containing blastx hits - pattern: "*.{blastx.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - blast: + type: file + description: File containing blastp hits + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" + - txt: + type: file + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/makedb/main.nf b/modules/diamond/makedb/main.nf index e3d62f00..a76a94e5 100644 --- a/modules/diamond/makedb/main.nf +++ b/modules/diamond/makedb/main.nf @@ -2,12 +2,10 @@ process DIAMOND_MAKEDB { tag "$fasta" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? 'bioconda::diamond=2.0.9' : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: path fasta diff --git a/modules/diamond/makedb/meta.yml b/modules/diamond/makedb/meta.yml index e378be7e..5db193ee 100644 --- a/modules/diamond/makedb/meta.yml +++ b/modules/diamond/makedb/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/bbuchfink/diamond/wiki tool_dev_url: https://github.com/bbuchfink/diamond doi: "doi:10.1038/s41592-021-01101-x" - licence: ['GPL v3.0'] + licence: ["GPL v3.0"] input: - fasta: diff --git a/modules/dragmap/align/main.nf b/modules/dragmap/align/main.nf index 9f261cc2..f0d59f05 100644 --- a/modules/dragmap/align/main.nf +++ b/modules/dragmap/align/main.nf @@ -2,10 +2,10 @@ process DRAGMAP_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::dragmap=1.2.1 bioconda::samtools=1.14 conda-forge::pigz=2.3.4" : null) + conda (params.enable_conda ? "bioconda::dragmap=1.2.1 bioconda::samtools=1.15.1 conda-forge::pigz=2.3.4" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:f7aad9060cde739c95685fc5ff6d6f7e3ec629c8-0': - 'quay.io/biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:f7aad9060cde739c95685fc5ff6d6f7e3ec629c8-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:5ebebbc128cd624282eaa37d2c7fe01505a91a69-0': + 'quay.io/biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:5ebebbc128cd624282eaa37d2c7fe01505a91a69-0' }" input: tuple val(meta), path(reads) @@ -24,41 +24,23 @@ process DRAGMAP_ALIGN { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def reads_command = meta.single_end ? "-1 $reads" : "-1 ${reads[0]} -2 ${reads[1]}" def samtools_command = sort_bam ? 'sort' : 'view' - if (meta.single_end) { - """ - dragen-os \\ - -r $hashmap \\ - -1 $reads \\ - --num-threads $task.cpus \\ - $args \\ - 2> ${prefix}.dragmap.log \\ - | samtools $samtools_command -@ $task.cpus $args2 -o ${prefix}.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - dragmap: \$(echo \$(dragen-os --version 2>&1)) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ - } else { - """ - dragen-os \\ - -r $hashmap \\ - -1 ${reads[0]} \\ - -2 ${reads[1]} \\ - --num-threads $task.cpus \\ - $args \\ - 2> ${prefix}.dragmap.log \\ - | samtools $samtools_command -@ $task.cpus $args2 -o ${prefix}.bam - + """ + dragen-os \\ + -r $hashmap \\ + $args \\ + --num-threads $task.cpus \\ + $reads_command \\ + 2> ${prefix}.dragmap.log \\ + | samtools $samtools_command $args2 --threads $task.cpus -o ${prefix}.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - dragmap: \$(echo \$(dragen-os --version 2>&1)) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ - } + cat <<-END_VERSIONS > versions.yml + "${task.process}": + dragmap: \$(echo \$(dragen-os --version 2>&1)) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ } diff --git a/modules/dragmap/align/meta.yml b/modules/dragmap/align/meta.yml index e943ccf8..dcce34fb 100644 --- a/modules/dragmap/align/meta.yml +++ b/modules/dragmap/align/meta.yml @@ -1,42 +1,42 @@ name: dragmap_align description: Performs fastq alignment to a reference using DRAGMAP keywords: - - alignment - - map - - fastq - - bam - - sam + - alignment + - map + - fastq + - bam + - sam tools: - - dragmap: - description: Dragmap is the Dragen mapper/aligner Open Source Software. - homepage: https://github.com/Illumina/dragmap - documentation: https://github.com/Illumina/dragmap - tool_dev_url: https://github.com/Illumina/dragmap#basic-command-line-usage - doi: "" - licence: ['GPL v3'] + - dragmap: + description: Dragmap is the Dragen mapper/aligner Open Source Software. + homepage: https://github.com/Illumina/dragmap + documentation: https://github.com/Illumina/dragmap + tool_dev_url: https://github.com/Illumina/dragmap#basic-command-line-usage + doi: "" + licence: ["GPL v3"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - hashmap: - type: file - description: DRAGMAP hash table - pattern: "Directory containing DRAGMAP hash table *.{cmp,.bin,.txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - hashmap: + type: file + description: DRAGMAP hash table + pattern: "Directory containing DRAGMAP hash table *.{cmp,.bin,.txt}" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Emiller88" diff --git a/modules/dragmap/hashtable/meta.yml b/modules/dragmap/hashtable/meta.yml index 86e58789..f86a5dbb 100644 --- a/modules/dragmap/hashtable/meta.yml +++ b/modules/dragmap/hashtable/meta.yml @@ -1,30 +1,30 @@ name: dragmap_hashtable description: Create DRAGEN hashtable for reference genome keywords: - - index - - fasta - - genome - - reference + - index + - fasta + - genome + - reference tools: - - dragmap: - description: Dragmap is the Dragen mapper/aligner Open Source Software. - homepage: https://github.com/Illumina/dragmap - documentation: https://github.com/Illumina/dragmap - tool_dev_url: https://github.com/Illumina/dragmap#basic-command-line-usage - doi: "" - licence: ['GPL v3'] + - dragmap: + description: Dragmap is the Dragen mapper/aligner Open Source Software. + homepage: https://github.com/Illumina/dragmap + documentation: https://github.com/Illumina/dragmap + tool_dev_url: https://github.com/Illumina/dragmap#basic-command-line-usage + doi: "" + licence: ["GPL v3"] input: - - fasta: - type: file - description: Input genome fasta file + - fasta: + type: file + description: Input genome fasta file output: - - hashmap: - type: file - description: DRAGMAP hash table - pattern: "*.{cmp,.bin,.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - hashmap: + type: file + description: DRAGMAP hash table + pattern: "*.{cmp,.bin,.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Emiller88" diff --git a/modules/dragonflye/main.nf b/modules/dragonflye/main.nf index 14597143..91b009d4 100644 --- a/modules/dragonflye/main.nf +++ b/modules/dragonflye/main.nf @@ -2,10 +2,10 @@ process DRAGONFLYE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::dragonflye=1.0.4" : null) + conda (params.enable_conda ? "bioconda::dragonflye=1.0.11" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dragonflye:1.0.4--hdfd78af_0' : - 'quay.io/biocontainers/dragonflye:1.0.4--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dragonflye:1.0.11--hdfd78af_0' : + 'quay.io/biocontainers/dragonflye:1.0.11--hdfd78af_0' }" input: tuple val(meta), path(reads) @@ -32,6 +32,7 @@ process DRAGONFLYE { --ram $memory \\ --outdir ./ \\ --force + cat <<-END_VERSIONS > versions.yml "${task.process}": dragonflye: \$(dragonflye --version 2>&1 | sed 's/^.*dragonflye //' ) diff --git a/modules/dragonflye/meta.yml b/modules/dragonflye/meta.yml index 773795db..3260a205 100644 --- a/modules/dragonflye/meta.yml +++ b/modules/dragonflye/meta.yml @@ -10,7 +10,7 @@ tools: description: Microbial assembly pipeline for Nanopore reads homepage: https://github.com/rpetit3/dragonflye documentation: https://github.com/rpetit3/dragonflye/blob/main/README.md - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: @@ -19,9 +19,9 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - reads: - type: file - description: Input Nanopore FASTQ file - pattern: "*.fastq.gz" + type: file + description: Input Nanopore FASTQ file + pattern: "*.fastq.gz" output: - meta: type: map diff --git a/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf index 49442f81..03d0e91a 100644 --- a/modules/dshbio/exportsegments/main.nf +++ b/modules/dshbio/exportsegments/main.nf @@ -2,10 +2,10 @@ process DSHBIO_EXPORTSEGMENTS { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" input: tuple val(meta), path(gfa) diff --git a/modules/dshbio/exportsegments/meta.yml b/modules/dshbio/exportsegments/meta.yml index eddb6d09..5dcb1364 100644 --- a/modules/dshbio/exportsegments/meta.yml +++ b/modules/dshbio/exportsegments/meta.yml @@ -1,41 +1,41 @@ name: dshbio_exportsegments description: Export assembly segment sequences in GFA 1.0 format to FASTA format keywords: - - gfa - - assembly - - segment + - gfa + - assembly + - segment tools: - - dshbio: - description: | - Reads, features, variants, assemblies, alignments, genomic range trees, pangenome - graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 - or later. - homepage: https://github.com/heuermh/dishevelled-bio - documentation: https://github.com/heuermh/dishevelled-bio - licence: ['LGPL-3.0-or-later'] + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio + licence: ["LGPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gfa: - type: file - description: Assembly segments in uncompressed or compressed GFA 1.0 format - pattern: "*.{gfa|gfa.bgz|gfa.gz|gfa.zst}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gfa: + type: file + description: Assembly segments in uncompressed or compressed GFA 1.0 format + pattern: "*.{gfa|gfa.bgz|gfa.gz|gfa.zst}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Assembly segment sequences in gzipped FASTA format - pattern: "*.{fa.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Assembly segment sequences in gzipped FASTA format + pattern: "*.{fa.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 7e3da24e..7a0a4d86 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/filterbed/meta.yml b/modules/dshbio/filterbed/meta.yml index 77054be4..4547349e 100644 --- a/modules/dshbio/filterbed/meta.yml +++ b/modules/dshbio/filterbed/meta.yml @@ -1,39 +1,39 @@ name: dshbio_filterbed description: Filter features in gzipped BED format keywords: - - bed + - bed tools: - - dshbio: - description: | - Reads, features, variants, assemblies, alignments, genomic range trees, pangenome - graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 - or later. - homepage: https://github.com/heuermh/dishevelled-bio - documentation: https://github.com/heuermh/dishevelled-bio - licence: ['LGPL-3.0-or-later'] + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio + licence: ["LGPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Features in gzipped BED format - pattern: "*.{bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Features in gzipped BED format + pattern: "*.{bed.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Features in gzipped BED format - pattern: "*.{bed.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Features in gzipped BED format + pattern: "*.{bed.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index 0539bbe0..c6736a49 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" input: tuple val(meta), path(gff3) diff --git a/modules/dshbio/filtergff3/meta.yml b/modules/dshbio/filtergff3/meta.yml index aa1bce43..b7de7939 100644 --- a/modules/dshbio/filtergff3/meta.yml +++ b/modules/dshbio/filtergff3/meta.yml @@ -1,39 +1,39 @@ name: dshbio_filtergff3 description: Filter features in gzipped GFF3 format keywords: - - gff3 + - gff3 tools: - - dshbio: - description: | - Reads, features, variants, assemblies, alignments, genomic range trees, pangenome - graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 - or later. - homepage: https://github.com/heuermh/dishevelled-bio - documentation: https://github.com/heuermh/dishevelled-bio - licence: ['LGPL-3.0-or-later'] + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio + licence: ["LGPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gff3: - type: file - description: Features in gzipped GFF3 format - pattern: "*.{gff3.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gff3: + type: file + description: Features in gzipped GFF3 format + pattern: "*.{gff3.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gff3: - type: file - description: Features in gzipped GFF3 format - pattern: "*.{gff3.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gff3: + type: file + description: Features in gzipped GFF3 format + pattern: "*.{gff3.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index 824c7e4d..9268b5dc 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/splitbed/meta.yml b/modules/dshbio/splitbed/meta.yml index a35ea25f..8e8c473f 100644 --- a/modules/dshbio/splitbed/meta.yml +++ b/modules/dshbio/splitbed/meta.yml @@ -1,39 +1,39 @@ name: dshbio_splitbed description: Split features in gzipped BED format keywords: - - bed + - bed tools: - - dshbio: - description: | - Reads, features, variants, assemblies, alignments, genomic range trees, pangenome - graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 - or later. - homepage: https://github.com/heuermh/dishevelled-bio - documentation: https://github.com/heuermh/dishevelled-bio - licence: ['LGPL-3.0-or-later'] + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio + licence: ["LGPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Features in gzipped BED format to split - pattern: "*.{bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Features in gzipped BED format to split + pattern: "*.{bed.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Features in split gzipped BED formatted files - pattern: "*.{bed.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Features in split gzipped BED formatted files + pattern: "*.{bed.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index 424bc368..db887bd6 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" input: tuple val(meta), path(gff3) diff --git a/modules/dshbio/splitgff3/meta.yml b/modules/dshbio/splitgff3/meta.yml index fdbbe16a..d23f2a15 100644 --- a/modules/dshbio/splitgff3/meta.yml +++ b/modules/dshbio/splitgff3/meta.yml @@ -1,39 +1,39 @@ name: dshbio_splitgff3 description: Split features in gzipped GFF3 format keywords: - - gff3 + - gff3 tools: - - dshbio: - description: | - Reads, features, variants, assemblies, alignments, genomic range trees, pangenome - graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 - or later. - homepage: https://github.com/heuermh/dishevelled-bio - documentation: https://github.com/heuermh/dishevelled-bio - licence: ['LGPL-3.0-or-later'] + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio + licence: ["LGPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gff3: - type: file - description: Features in gzipped GFF3 format to split - pattern: "*.{gff3.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gff3: + type: file + description: Features in gzipped GFF3 format to split + pattern: "*.{gff3.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gff3: - type: file - description: Features in split gzipped GFF3 formatted files - pattern: "*.{gff3.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gff3: + type: file + description: Features in split gzipped GFF3 formatted files + pattern: "*.{gff3.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/ectyper/meta.yml b/modules/ectyper/meta.yml index a6beca29..233290e7 100644 --- a/modules/ectyper/meta.yml +++ b/modules/ectyper/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/phac-nml/ecoli_serotyping tool_dev_url: https://github.com/phac-nml/ecoli_serotyping doi: "" - licence: ['Apache 2'] + licence: ["Apache 2"] input: - meta: diff --git a/modules/elprep/filter/main.nf b/modules/elprep/filter/main.nf new file mode 100644 index 00000000..5ca288bc --- /dev/null +++ b/modules/elprep/filter/main.nf @@ -0,0 +1,89 @@ +process ELPREP_FILTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + val(run_haplotypecaller) + val(run_bqsr) + path(reference_sequences) + path(filter_regions_bed) + path(reference_elfasta) + path(known_sites_elsites) + path(target_regions_bed) + path(intermediate_bqsr_tables) + val(bqsr_tables_only) + val(get_activity_profile) + val(get_assembly_regions) + + + output: + tuple val(meta), path("output/**.{bam,sam}") ,emit: bam + tuple val(meta), path("*.metrics.txt") ,optional: true, emit: metrics + tuple val(meta), path("*.recall") ,optional: true, emit: recall + tuple val(meta), path("*.vcf.gz") ,optional: true, emit: gvcf + tuple val(meta), path("*.table") ,optional: true, emit: table + tuple val(meta), path("*.activity_profile.igv") ,optional: true, emit: activity_profile + tuple val(meta), path("*.assembly_regions.igv") ,optional: true, emit: assembly_regions + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + + // filter args + def reference_sequences_cmd = reference_sequences ? " --replace-reference-sequences ${reference_sequences}" : "" + def filter_regions_cmd = filter_regions_bed ? " --filter-non-overlapping-reads ${filter_regions_bed}" : "" + + // markdup args + def markdup_cmd = args.contains("--mark-duplicates") ? " --mark-optical-duplicates ${prefix}.metrics.txt": "" + + // variant calling args + def haplotyper_cmd = run_haplotypecaller ? " --haplotypecaller ${prefix}.g.vcf.gz": "" + + def fasta_cmd = reference_elfasta ? " --reference ${reference_elfasta}": "" + def known_sites_cmd = known_sites_elsites ? " --known-sites ${known_sites_elsites}": "" + def target_regions_cmd = target_regions_bed ? " --target-regions ${target_regions_bed}": "" + + // bqsr args + def bqsr_cmd = run_bqsr ? " --bqsr ${prefix}.recall": "" + def bqsr_tables_only_cmd = bqsr_tables_only ? " --bqsr-tables-only ${prefix}.table": "" + + def intermediate_bqsr_cmd = intermediate_bqsr_tables ? " --bqsr-apply .": "" + + // misc + def activity_profile_cmd = get_activity_profile ? " --activity-profile ${prefix}.activity_profile.igv": "" + def assembly_regions_cmd = get_assembly_regions ? " --assembly-regions ${prefix}.assembly_regions.igv": "" + + """ + elprep filter ${bam} output/${prefix}.${suffix} \\ + ${reference_sequences_cmd} \\ + ${filter_regions_cmd} \\ + ${markdup_cmd} \\ + ${haplotyper_cmd} \\ + ${fasta_cmd} \\ + ${known_sites_cmd} \\ + ${target_regions_cmd} \\ + ${bqsr_cmd} \\ + ${bqsr_tables_only_cmd} \\ + ${intermediate_bqsr_cmd} \\ + ${activity_profile_cmd} \\ + ${assembly_regions_cmd} \\ + --nr-of-threads ${task.cpus} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/filter/meta.yml b/modules/elprep/filter/meta.yml new file mode 100644 index 00000000..d7d41071 --- /dev/null +++ b/modules/elprep/filter/meta.yml @@ -0,0 +1,106 @@ +name: "elprep_filter" +description: "Filter, sort and markdup sam/bam files, with optional BQSR and variant calling." +keywords: + - sort + - bam + - sam + - filter + - variant calling +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input SAM/BAM file + pattern: "*.{bam,sam}" + - run_haplotypecaller: + type: boolean + description: Run variant calling on the input files. Needed to generate gvcf output. + - run_bqsr: + type: boolean + description: Run BQSR on the input files. Needed to generate recall metrics. + - reference_sequences: + type: file + description: Optional SAM header to replace existing header. + pattern: "*.sam" + - filter_regions_bed: + type: file + description: Optional BED file containing regions to filter. + pattern: "*.bed" + - reference_elfasta: + type: file + description: Elfasta file, required for BQSR and variant calling. + pattern: "*.elfasta" + - known_sites: + type: file + description: Optional elsites file containing known SNPs for BQSR. + pattern: "*.elsites" + - target_regions_bed: + type: file + description: Optional BED file containing target regions for BQSR and variant calling. + pattern: "*.bed" + - intermediate_bqsr_tables: + type: file + description: Optional list of BQSR tables, used when parsing files created by `elprep split` + pattern: "*.table" + - bqsr_tables_only: + type: boolean + description: Write intermediate BQSR tables, used when parsing files created by `elprep split`. + - get_activity_profile: + type: boolean + description: Get the activity profile calculated by the haplotypecaller to the given file in IGV format. + - get_assembly_regions: + type: boolean + description: Get the assembly regions calculated by haplotypecaller to the speficied file in IGV format. +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" + - bam: + type: file + description: Sorted, markdup, optionally BQSR BAM/SAM file + pattern: "*.{bam,sam}" + - metrics: + type: file + description: Optional duplicate metrics file generated by elprep + pattern: "*.{metrics.txt}" + - recall: + type: file + description: Optional recall metrics file generated by elprep + pattern: "*.{recall}" + - gvcf: + type: file + description: Optional GVCF output file + pattern: "*.{vcf.gz}" + - table: + type: file + description: Optional intermediate BQSR table output file + pattern: "*.{table}" + - activity_profile: + type: file + description: Optional activity profile output file + pattern: "*.{activity_profile.igv}" + - assembly_regions: + type: file + description: Optional activity regions output file + pattern: "*.{assembly_regions.igv}" +authors: + - "@matthdsm" diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf new file mode 100644 index 00000000..d5ffc497 --- /dev/null +++ b/modules/elprep/merge/main.nf @@ -0,0 +1,43 @@ +process ELPREP_MERGE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("output/**.{bam,sam}") , emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def single_end = meta.single_end ? " --single-end" : "" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + elprep merge \\ + input/ \\ + output/${prefix}.${suffix} \\ + $args \\ + ${single_end} \\ + --nr-of-threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml new file mode 100644 index 00000000..1f49b1a0 --- /dev/null +++ b/modules/elprep/merge/meta.yml @@ -0,0 +1,44 @@ +name: "elprep_merge" +description: Merge split bam/sam chunks in one file +keywords: + - bam + - sam + - merge +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM chunks to merge + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: Merged BAM/SAM file + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/modules/elprep/split/main.nf b/modules/elprep/split/main.nf new file mode 100644 index 00000000..639944ef --- /dev/null +++ b/modules/elprep/split/main.nf @@ -0,0 +1,45 @@ +process ELPREP_SPLIT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("output/**.{bam,sam}"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def single_end = meta.single_end ? " --single-end": "" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + mkdir ${prefix} + + elprep split \\ + input \\ + output/ \\ + $args \\ + $single_end \\ + --nr-of-threads $task.cpus \\ + --output-prefix $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/split/meta.yml b/modules/elprep/split/meta.yml new file mode 100644 index 00000000..b99562fa --- /dev/null +++ b/modules/elprep/split/meta.yml @@ -0,0 +1,43 @@ +name: "elprep_split" +description: Split bam file into manageable chunks +keywords: + - bam + - split by chromosome +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM files + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: List of split BAM/SAM files + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/modules/emmtyper/meta.yml b/modules/emmtyper/meta.yml index 019a8e4c..a63c40b6 100644 --- a/modules/emmtyper/meta.yml +++ b/modules/emmtyper/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/MDU-PHL/emmtyper tool_dev_url: https://github.com/MDU-PHL/emmtyper doi: "" - licence: ['GNU General Public v3 (GPL v3)'] + licence: ["GNU General Public v3 (GPL v3)"] input: - meta: diff --git a/modules/ensemblvep/Dockerfile b/modules/ensemblvep/Dockerfile index ac1b4691..b4a1c664 100644 --- a/modules/ensemblvep/Dockerfile +++ b/modules/ensemblvep/Dockerfile @@ -8,13 +8,14 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-vep-104.3/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SPECIES=homo_sapiens -ARG VEP_VERSION=99 +ARG VEP_VERSION=104 +ARG VEP_TAG=104.3 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH # Download Genome RUN vep_install \ @@ -27,4 +28,4 @@ RUN vep_install \ --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-vep-104.3 > nf-core-vep-104.3.yml +RUN conda env export --name nf-core-vep-${VEP_TAG} > nf-core-vep-${VEP_TAG}.yml diff --git a/modules/ensemblvep/build.sh b/modules/ensemblvep/build.sh index 5fcb91df..650c8704 100755 --- a/modules/ensemblvep/build.sh +++ b/modules/ensemblvep/build.sh @@ -10,11 +10,12 @@ build_push() { VEP_TAG=$4 docker build \ + . \ -t nfcore/vep:${VEP_TAG}.${GENOME} \ - software/vep/. \ --build-arg GENOME=${GENOME} \ --build-arg SPECIES=${SPECIES} \ - --build-arg VEP_VERSION=${VEP_VERSION} + --build-arg VEP_VERSION=${VEP_VERSION} \ + --build-arg VEP_TAG=${VEP_TAG} docker push nfcore/vep:${VEP_TAG}.${GENOME} } diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index c2bd055f..a5a9b1ab 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -13,6 +13,7 @@ process ENSEMBLVEP { val species val cache_version path cache + path extra_files output: tuple val(meta), path("*.ann.vcf"), emit: vcf diff --git a/modules/ensemblvep/meta.yml b/modules/ensemblvep/meta.yml index 1b819227..418bb970 100644 --- a/modules/ensemblvep/meta.yml +++ b/modules/ensemblvep/meta.yml @@ -1,65 +1,58 @@ name: ENSEMBLVEP description: Ensembl Variant Effect Predictor (VEP) keywords: - - annotation + - annotation tools: - - ensemblvep: - description: | - VEP determines the effect of your variants (SNPs, insertions, deletions, CNVs - or structural variants) on genes, transcripts, and protein sequence, as well as regulatory regions. - homepage: https://www.ensembl.org/info/docs/tools/vep/index.html - documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html - licence: ['Apache-2.0'] -params: - - use_cache: - type: boolean - description: | - Enable the usage of containers with cache - Does not work with conda - - vep_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/vep/tags + - ensemblvep: + description: | + VEP determines the effect of your variants (SNPs, insertions, deletions, CNVs + or structural variants) on genes, transcripts, and protein sequence, as well as regulatory regions. + homepage: https://www.ensembl.org/info/docs/tools/vep/index.html + documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html + licence: ["Apache-2.0"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - vcf to annotate - - genome: - type: value - description: | - which genome to annotate with - - species: - type: value - description: | - which species to annotate with - - cache_version: - type: value - description: | - which version of the cache to annotate with - - cache: - type: file - description: | - path to VEP cache (optional) + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - genome: + type: value + description: | + which genome to annotate with + - species: + type: value + description: | + which species to annotate with + - cache_version: + type: value + description: | + which version of the cache to annotate with + - cache: + type: file + description: | + path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) output: - - vcf: - type: file - description: | - annotated vcf - pattern: "*.ann.vcf" - - report: - type: file - description: VEP report file - pattern: "*.html" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - vcf: + type: file + description: | + annotated vcf + pattern: "*.ann.vcf" + - report: + type: file + description: VEP report file + pattern: "*.html" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/expansionhunter/main.nf b/modules/expansionhunter/main.nf index 4e62b2a6..f60b75b4 100644 --- a/modules/expansionhunter/main.nf +++ b/modules/expansionhunter/main.nf @@ -37,4 +37,15 @@ process EXPANSIONHUNTER { expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | sed 's/^.*ExpansionHunter v//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | sed 's/^.*ExpansionHunter v//') + END_VERSIONS + """ } diff --git a/modules/expansionhunter/meta.yml b/modules/expansionhunter/meta.yml index 17d72bb4..3483c0db 100644 --- a/modules/expansionhunter/meta.yml +++ b/modules/expansionhunter/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/Illumina/ExpansionHunter/blob/master/docs/01_Introduction.md tool_dev_url: None doi: "10.1093/bioinformatics/btz431" - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/faqcs/main.nf b/modules/faqcs/main.nf new file mode 100644 index 00000000..24f81a95 --- /dev/null +++ b/modules/faqcs/main.nf @@ -0,0 +1,104 @@ +process FAQCS { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::faqcs=2.10" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/faqcs%3A2.10--r41h9a82719_2' : + 'quay.io/biocontainers/faqcs:2.10--r41h9a82719_2' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path('*.trimmed.fastq.gz') , emit: reads + tuple val(meta), path('*.stats.txt') , emit: stats + tuple val(meta), path('*.txt') , optional:true, emit: txt + tuple val(meta), path('*_qc_report.pdf') , optional:true, emit: statspdf + tuple val(meta), path('*.log') , emit: log + tuple val(meta), path('*.discard.fastq.gz') , optional:true, emit: reads_fail + tuple val(meta), path('*.trimmed.unpaired.fastq.gz') , optional:true, emit: reads_unpaired + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + // Added soft-links to original fastqs for consistent naming in MultiQC + def prefix = task.ext.prefix ?: "${meta.id}" + if (meta.single_end) { + """ + [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz + FaQCs \\ + -d . \\ + -u ${prefix}.fastq.gz \\ + --prefix ${prefix} \\ + -t $task.cpus \\ + $args \\ + 2> ${prefix}.fastp.log + + + if [[ -f ${prefix}.unpaired.trimmed.fastq ]]; then + mv ${prefix}.unpaired.trimmed.fastq ${prefix}.trimmed.fastq + gzip ${prefix}.trimmed.fastq + fi + if [[ -f ${prefix}.discard.trimmed.fastq ]]; then + mv ${prefix}.discard.trimmed.fastq ${prefix}.trimmed.discard.fastq + gzip ${prefix}.trimmed.discard.fastq + fi + cat <<-END_VERSIONS > versions.yml + "${task.process}": + faqcs: \$(echo \$(FaQCs --version 2>&1) | sed 's/^.*Version: //;' ) + END_VERSIONS + """ + } else { + """ + [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz + [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz + FaQCs \\ + -d . \\ + -1 ${prefix}_1.fastq.gz \\ + -2 ${prefix}_2.fastq.gz \\ + --prefix ${meta.id} \\ + -t $task.cpus \\ + $args \\ + 2> ${prefix}.fastp.log + + # Unpaired + if [[ -f ${prefix}.unpaired.trimmed.fastq ]]; then + # If it is empty remove it + if [[ ! -s ${prefix}.unpaired.trimmed.fastq ]]; then + rm ${prefix}.unpaired.trimmed.fastq + else + mv ${prefix}.unpaired.trimmed.fastq ${prefix}.trimmed.unpaired.fastq + gzip ${prefix}.trimmed.unpaired.fastq + fi + fi + + # R1 + if [[ -f ${prefix}.1.trimmed.fastq ]]; then + mv ${prefix}.1.trimmed.fastq ${prefix}_1.trimmed.fastq + gzip ${prefix}_1.trimmed.fastq + fi + + # R2 + if [[ -f ${prefix}.2.trimmed.fastq ]]; then + mv ${prefix}.2.trimmed.fastq ${prefix}_2.trimmed.fastq + gzip ${prefix}_2.trimmed.fastq + fi + + # Discarded: Created if --discard argument is passed + if [[ -f ${prefix}.discard.trimmed.fastq ]]; then + mv ${prefix}.discard.trimmed.fastq ${prefix}.trimmed.discard.fastq + gzip ${prefix}.trimmed.discard.fastq + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + faqcs: \$(echo \$(FaQCs --version 2>&1) | sed 's/^.*Version: //;' ) + END_VERSIONS + """ + } +} + diff --git a/modules/faqcs/meta.yml b/modules/faqcs/meta.yml new file mode 100644 index 00000000..df3c2308 --- /dev/null +++ b/modules/faqcs/meta.yml @@ -0,0 +1,72 @@ +name: faqcs +description: Perform adapter and quality trimming on sequencing reads with reporting +keywords: + - trimming + - quality control + - fastq + - faqcs +tools: + - faqcs: + description: | + FaQCs combines several features of currently available applications into a single, user-friendly process, and includes additional unique capabilities such as filtering the PhiX control sequences, conversion of FASTQ formats, and multi-threading. The original data and trimmed summaries are reported within a variety of graphics and reports, providing a simple way to do data quality control and assurance. + homepage: https://github.com/LANL-Bioinformatics/FaQCs + documentation: https://github.com/LANL-Bioinformatics/FaQCs + tool_dev_url: https://github.com/LANL-Bioinformatics/FaQCs + doi: "https://doi.org/10.1186/s12859-014-0366-2" + licence: ["GPLv3 License"] + +## TODO nf-core: Add a description of all of the variables used as input +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + +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" + - reads: + type: file + description: The trimmed/modified fastq reads + pattern: "*trimmed.fastq.gz" + - reads_fail: + type: file + description: Reads that failed the preprocessing (Optional with --discard args setting) + pattern: "*discard.fastq.gz" + - reads_unpaired: + type: file + description: Reads without matching mates in paired-end files (Optional) + pattern: "*trimmed.unpaired.fastq.gz" + - stats: + type: file + description: trimming/qc text stats file + pattern: "*.stats.txt" + - txt: + type: file + description: trimming/qc text txt files from --debug option + pattern: "*.txt" + - statspdf: + type: file + description: trimming/qc pdf report file + pattern: "*_qc_report.pdf" + - log: + type: file + description: fastq log file + pattern: "*.log" +authors: + - "@mjcipriano" + - "@sateeshperi" + - "@hseabolt" diff --git a/modules/fargene/meta.yml b/modules/fargene/meta.yml index 35e98008..785b4cc3 100644 --- a/modules/fargene/meta.yml +++ b/modules/fargene/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/fannyhb/fargene tool_dev_url: https://github.com/fannyhb/fargene doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -96,6 +96,5 @@ output: 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}" - authors: - "@louperelo" diff --git a/modules/fastani/meta.yml b/modules/fastani/meta.yml index dc62d485..2a997716 100644 --- a/modules/fastani/meta.yml +++ b/modules/fastani/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://github.com/ParBLiSS/FastANI tool_dev_url: https://github.com/ParBLiSS/FastANI doi: 10.1038/s41467-018-07641-9 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index d8218350..5c9e3b83 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -13,7 +13,7 @@ process FASTP { val save_merged output: - tuple val(meta), path('*.trim.fastq.gz') , emit: reads + tuple val(meta), path('*.trim.fastq.gz') , optional:true, emit: reads tuple val(meta), path('*.json') , emit: json tuple val(meta), path('*.html') , emit: html tuple val(meta), path('*.log') , emit: log diff --git a/modules/fastp/meta.yml b/modules/fastp/meta.yml index a1875faf..3274e41b 100644 --- a/modules/fastp/meta.yml +++ b/modules/fastp/meta.yml @@ -10,7 +10,7 @@ tools: A tool designed to provide fast all-in-one preprocessing for FastQ files. This tool is developed in C++ with multithreading supported to afford high performance. documentation: https://github.com/OpenGene/fastp doi: https://doi.org/10.1093/bioinformatics/bty560 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map @@ -22,6 +22,12 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + - save_trimmed_fail: + type: boolean + description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz` + - save_merged: + type: boolean + description: Specify true to save all merged reads to the a file ending in `*.merged.fastq.gz` output: - meta: diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index ed6b8c50..05730368 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -44,4 +44,16 @@ process FASTQC { END_VERSIONS """ } + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + touch ${prefix}.zip + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + END_VERSIONS + """ } diff --git a/modules/fastqc/meta.yml b/modules/fastqc/meta.yml index b09553a3..4da5bb5a 100644 --- a/modules/fastqc/meta.yml +++ b/modules/fastqc/meta.yml @@ -1,52 +1,52 @@ name: fastqc description: Run FastQC on sequenced reads keywords: - - quality control - - qc - - adapters - - fastq + - quality control + - qc + - adapters + - fastq tools: - - fastqc: - description: | - FastQC gives general quality metrics about your reads. - It provides information about the quality score distribution - across your reads, the per base sequence content (%A/C/G/T). - You get information about adapter contamination and other - overrepresented sequences. - homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ - documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ - licence: ['GPL-2.0-only'] + - fastqc: + description: | + FastQC gives general quality metrics about your reads. + It provides information about the quality score distribution + across your reads, the per base sequence content (%A/C/G/T). + You get information about adapter contamination and other + overrepresented sequences. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ + documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ + licence: ["GPL-2.0-only"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - - zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - html: + type: file + description: FastQC report + pattern: "*_{fastqc.html}" + - zip: + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/fastqscan/meta.yml b/modules/fastqscan/meta.yml index 99538b5a..909a964f 100644 --- a/modules/fastqscan/meta.yml +++ b/modules/fastqscan/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/rpetit3/fastq-scan tool_dev_url: https://github.com/rpetit3/fastq-scan doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/fasttree/meta.yml b/modules/fasttree/meta.yml index 5906675b..c90e8d7c 100644 --- a/modules/fasttree/meta.yml +++ b/modules/fasttree/meta.yml @@ -10,7 +10,7 @@ tools: documentation: http://www.microbesonline.org/fasttree/#Usage tool_dev_url: None doi: "" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - alignment: diff --git a/modules/fgbio/callmolecularconsensusreads/meta.yml b/modules/fgbio/callmolecularconsensusreads/meta.yml index 523f3214..37182512 100644 --- a/modules/fgbio/callmolecularconsensusreads/meta.yml +++ b/modules/fgbio/callmolecularconsensusreads/meta.yml @@ -2,44 +2,44 @@ name: fgbio_callmolecularconsensusreads description: Calls consensus sequences from reads with the same unique molecular tag. keywords: - - UMIs - - consensus sequence - - bam - - sam + - UMIs + - consensus sequence + - bam + - sam tools: - - fgbio: - description: Tools for working with genomic and high throughput sequencing data. - homepage: https://github.com/fulcrumgenomics/fgbio - documentation: http://fulcrumgenomics.github.io/fgbio/ - licence: ['MIT'] + - fgbio: + description: Tools for working with genomic and high throughput sequencing data. + homepage: https://github.com/fulcrumgenomics/fgbio + documentation: http://fulcrumgenomics.github.io/fgbio/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false, collapse:false ] - - bam: - type: file - description: | - The input SAM or BAM file. - pattern: "*.{bam,sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false, collapse:false ] + - bam: + type: file + description: | + The input SAM or BAM file. + pattern: "*.{bam,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: | - Output SAM or BAM file to write consensus reads. - pattern: "*.{bam,sam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + Output SAM or BAM file to write consensus reads. + pattern: "*.{bam,sam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@sruthipsuresh" + - "@sruthipsuresh" diff --git a/modules/fgbio/fastqtobam/meta.yml b/modules/fgbio/fastqtobam/meta.yml index e356d315..3081cafc 100644 --- a/modules/fgbio/fastqtobam/meta.yml +++ b/modules/fgbio/fastqtobam/meta.yml @@ -1,6 +1,6 @@ name: fgbio_fastqtobam description: | - Using the FGBIO tools, converts FASTQ files sequenced with UMIs into BAM files, moving the UMI barcode into the RX field of the BAM file + Using the FGBIO tools, converts FASTQ files sequenced with UMIs into BAM files, moving the UMI barcode into the RX field of the BAM file keywords: - fastqtobam - fgbio @@ -11,7 +11,7 @@ tools: documentation: http://fulcrumgenomics.github.io/fgbio/tools/latest/ tool_dev_url: https://github.com/fulcrumgenomics/fgbio doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - reads: @@ -22,11 +22,11 @@ input: - read_structure: type: string description: | - A read structure should always be provided for each of the fastq files. - If single end, the string will contain only one structure (i.e. "2M11S+T"), if paired-end the string - will contain two structures separated by a blank space (i.e. "2M11S+T 2M11S+T"). - If the read does not contain any UMI, the structure will be +T (i.e. only template of any length). - https://github.com/fulcrumgenomics/fgbio/wiki/Read-Structures + A read structure should always be provided for each of the fastq files. + If single end, the string will contain only one structure (i.e. "2M11S+T"), if paired-end the string + will contain two structures separated by a blank space (i.e. "2M11S+T 2M11S+T"). + If the read does not contain any UMI, the structure will be +T (i.e. only template of any length). + https://github.com/fulcrumgenomics/fgbio/wiki/Read-Structures output: - meta: diff --git a/modules/fgbio/groupreadsbyumi/meta.yml b/modules/fgbio/groupreadsbyumi/meta.yml index 18ce149e..c544040b 100644 --- a/modules/fgbio/groupreadsbyumi/meta.yml +++ b/modules/fgbio/groupreadsbyumi/meta.yml @@ -1,11 +1,11 @@ name: fgbio_groupreadsbyumi description: | - Groups reads together that appear to have come from the same original molecule. - Reads are grouped by template, and then templates are sorted by the 5’ mapping positions - of the reads from the template, used from earliest mapping position to latest. - Reads that have the same end positions are then sub-grouped by UMI sequence. - (!) Note: the MQ tag is required on reads with mapped mates (!) - This can be added using samblaster with the optional argument --addMateTags. + Groups reads together that appear to have come from the same original molecule. + Reads are grouped by template, and then templates are sorted by the 5’ mapping positions + of the reads from the template, used from earliest mapping position to latest. + Reads that have the same end positions are then sub-grouped by UMI sequence. + (!) Note: the MQ tag is required on reads with mapped mates (!) + This can be added using samblaster with the optional argument --addMateTags. keywords: - UMI - groupreads @@ -17,7 +17,7 @@ tools: documentation: http://fulcrumgenomics.github.io/fgbio/tools/latest/ tool_dev_url: https://github.com/fulcrumgenomics/fgbio doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/fgbio/sortbam/meta.yml b/modules/fgbio/sortbam/meta.yml index b8040dab..465b9606 100644 --- a/modules/fgbio/sortbam/meta.yml +++ b/modules/fgbio/sortbam/meta.yml @@ -1,43 +1,43 @@ name: fgbio_sortbam description: Sorts a SAM or BAM file. Several sort orders are available, including coordinate, queryname, random, and randomquery. keywords: - - sort - - bam - - sam + - sort + - bam + - sam tools: - - fgbio: - description: Tools for working with genomic and high throughput sequencing data. - homepage: https://github.com/fulcrumgenomics/fgbio - documentation: http://fulcrumgenomics.github.io/fgbio/ - licence: ['MIT'] + - fgbio: + description: Tools for working with genomic and high throughput sequencing data. + homepage: https://github.com/fulcrumgenomics/fgbio + documentation: http://fulcrumgenomics.github.io/fgbio/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false, collapse:false ] - - bam: - type: file - description: | - The input SAM or BAM file to be sorted. - pattern: "*.{bam,sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false, collapse:false ] + - bam: + type: file + description: | + The input SAM or BAM file to be sorted. + pattern: "*.{bam,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: | - Output SAM or BAM file. - pattern: "*.{bam,sam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + Output SAM or BAM file. + pattern: "*.{bam,sam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@sruthipsuresh" + - "@sruthipsuresh" diff --git a/modules/filtlong/meta.yml b/modules/filtlong/meta.yml index 7616a176..b3626e62 100644 --- a/modules/filtlong/meta.yml +++ b/modules/filtlong/meta.yml @@ -14,7 +14,7 @@ tools: documentation: None tool_dev_url: https://github.com/rrwick/Filtlong doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/flash/meta.yml b/modules/flash/meta.yml index 06807523..e5a783f5 100644 --- a/modules/flash/meta.yml +++ b/modules/flash/meta.yml @@ -11,7 +11,7 @@ tools: homepage: https://ccb.jhu.edu/software/FLASH/ documentation: {} doi: 10.1093/bioinformatics/btr507 - licence: ['GPL v3+'] + licence: ["GPL v3+"] input: - meta: diff --git a/modules/freebayes/main.nf b/modules/freebayes/main.nf index e67e4c72..73b1da96 100644 --- a/modules/freebayes/main.nf +++ b/modules/freebayes/main.nf @@ -8,10 +8,9 @@ process FREEBAYES { 'quay.io/biocontainers/freebayes:1.3.5--py38ha193a2f_3' }" input: - tuple val(meta), path(input_1), path(input_1_index), path(input_2), path(input_2_index) + tuple val(meta), path(input_1), path(input_1_index), path(input_2), path(input_2_index), path(target_bed) path fasta path fasta_fai - path targets path samples path populations path cnv @@ -27,7 +26,7 @@ process FREEBAYES { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input = input_2 ? "${input_1} ${input_2}" : "${input_1}" - def targets_file = targets ? "--target ${targets}" : "" + def targets_file = target_bed ? "--target ${target_bed}" : "" def samples_file = samples ? "--samples ${samples}" : "" def populations_file = populations ? "--populations ${populations}" : "" def cnv_file = cnv ? "--cnv-map ${cnv}" : "" diff --git a/modules/freebayes/meta.yml b/modules/freebayes/meta.yml index abba1daa..cbbd297e 100644 --- a/modules/freebayes/meta.yml +++ b/modules/freebayes/meta.yml @@ -16,7 +16,7 @@ tools: documentation: https://github.com/freebayes/freebayes tool_dev_url: https://github.com/freebayes/freebayes doi: "arXiv:1207.3907" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -31,7 +31,11 @@ input: - input_index: type: file description: BAM/CRAM/SAM index file - pattern: "*.bam.bai" + pattern: "*.{bai,crai}" + - target_bed: + type: file + description: Optional - Limit analysis to targets listed in this BED-format FILE. + pattern: "*.bed" - fasta: type: file description: reference fasta file @@ -40,10 +44,6 @@ input: type: file description: reference fasta file index pattern: "*.{fa,fasta}.fai" - - targets: - type: file - description: Optional - Limit analysis to targets listed in this BED-format FILE. - pattern: "*.bed" - samples: type: file description: Optional - Limit analysis to samples listed (one per line) in the FILE. @@ -55,10 +55,10 @@ input: - cnv: type: file description: | - A copy number map BED file, which has either a sample-level ploidy: - sample_name copy_number - or a region-specific format: - seq_name start end sample_name copy_number + A copy number map BED file, which has either a sample-level ploidy: + sample_name copy_number + or a region-specific format: + seq_name start end sample_name copy_number pattern: "*.bed" output: diff --git a/modules/gamma/main.nf b/modules/gamma/main.nf new file mode 100644 index 00000000..e176ee68 --- /dev/null +++ b/modules/gamma/main.nf @@ -0,0 +1,41 @@ +def VERSION = '2.1' // Version information not provided by tool on CLI + +process GAMMA { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gamma=2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gamma%3A2.1--hdfd78af_0': + 'quay.io/biocontainers/gamma:2.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + path(db) + + output: + tuple val(meta), path("*.gamma") , emit: gamma + tuple val(meta), path("*.psl") , emit: psl + tuple val(meta), path("*.gff") , optional:true , emit: gff + tuple val(meta), path("*.fasta"), optional:true , emit: fasta + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + GAMMA.py \\ + $args \\ + $fasta \\ + $db \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gamma: $VERSION + END_VERSIONS + """ +} diff --git a/modules/gamma/meta.yml b/modules/gamma/meta.yml new file mode 100644 index 00000000..316b685b --- /dev/null +++ b/modules/gamma/meta.yml @@ -0,0 +1,63 @@ +name: "gamma" +description: Gene Allele Mutation Microbial Assessment +keywords: + - gamma + - gene-calling +tools: + - "gamma": + description: "Tool for Gene Allele Mutation Microbial Assessment" + homepage: "https://github.com/rastanton/GAMMA" + documentation: "https://github.com/rastanton/GAMMA" + tool_dev_url: "https://github.com/rastanton/GAMMA" + doi: "10.1093/bioinformatics/btab607" + licence: "['Apache License 2.0']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" + - db: + type: file + description: Database in FASTA format + pattern: "*.{fa,fasta}" + +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" + + - gamma: + type: file + description: GAMMA file with annotated gene matches + pattern: "*.{gamma}" + + - psl: + type: file + description: PSL file with all gene matches found + pattern: "*.{psl}" + + - gff: + type: file + description: GFF file + pattern: "*.{gff}" + + - fasta: + type: file + description: multifasta file of the gene matches + pattern: "*.{fasta}" + +authors: + - "@sateeshperi" + - "@rastanton" diff --git a/modules/gatk4/applybqsr/main.nf b/modules/gatk4/applybqsr/main.nf index 672e93e0..a0e2c45c 100644 --- a/modules/gatk4/applybqsr/main.nf +++ b/modules/gatk4/applybqsr/main.nf @@ -2,10 +2,10 @@ process GATK4_APPLYBQSR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) @@ -14,9 +14,9 @@ process GATK4_APPLYBQSR { path dict output: - tuple val(meta), path("*.bam"), emit: bam, optional: true + tuple val(meta), path("*.bam") , emit: bam, optional: true tuple val(meta), path("*.cram"), emit: cram, optional: true - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -24,8 +24,7 @@ process GATK4_APPLYBQSR { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def interval = intervals ? "-L ${intervals}" : "" - def file_type = input.getExtension() + def interval_command = intervals ? "--intervals $intervals" : "" def avail_mem = 3 if (!task.memory) { @@ -35,12 +34,12 @@ process GATK4_APPLYBQSR { } """ gatk --java-options "-Xmx${avail_mem}g" ApplyBQSR \\ - -R $fasta \\ - -I $input \\ + --input $input \\ + --output ${prefix}.${input.getExtension()} \\ + --reference $fasta \\ --bqsr-recal-file $bqsr_table \\ - $interval \\ + $interval_command \\ --tmp-dir . \\ - -O ${prefix}.${file_type} \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/applybqsr/meta.yml b/modules/gatk4/applybqsr/meta.yml index ad1f82a1..3fc93f10 100644 --- a/modules/gatk4/applybqsr/meta.yml +++ b/modules/gatk4/applybqsr/meta.yml @@ -6,13 +6,13 @@ keywords: tools: - gatk4: description: | - Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools - with a primary focus on variant discovery and genotyping. Its powerful processing engine - and high-performance computing features make it capable of taking on projects of any size. + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -47,7 +47,6 @@ input: description: GATK sequence dictionary pattern: "*.dict" - output: - meta: type: map @@ -62,6 +61,10 @@ output: type: file description: Recalibrated BAM file pattern: "*.{bam}" + - cram: + type: file + description: Recalibrated CRAM file + pattern: "*.{cram}" authors: - "@yocra3" diff --git a/modules/gatk4/applybqsrspark/main.nf b/modules/gatk4/applybqsrspark/main.nf new file mode 100644 index 00000000..9d7891ba --- /dev/null +++ b/modules/gatk4/applybqsrspark/main.nf @@ -0,0 +1,51 @@ +process GATK4_APPLYBQSR_SPARK { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) + path fasta + path fai + path dict + + output: + tuple val(meta), path("*.bam") , emit: bam, optional: true + tuple val(meta), path("*.cram"), emit: cram, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? "--intervals $intervals" : "" + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK ApplyBQSRSpark] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" ApplyBQSRSpark \\ + --input $input \\ + --output ${prefix}.${input.getExtension()} \\ + --reference $fasta \\ + --bqsr-recal-file $bqsr_table \\ + $interval_command \\ + --spark-master local[${task.cpus}] \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/applybqsrspark/meta.yml b/modules/gatk4/applybqsrspark/meta.yml new file mode 100644 index 00000000..070b37ab --- /dev/null +++ b/modules/gatk4/applybqsrspark/meta.yml @@ -0,0 +1,72 @@ +name: gatk4_applybqsr_spark +description: Apply base quality score recalibration (BQSR) to a bam file +keywords: + - bqsr + - bam +tools: + - gatk4: + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" + - bqsr_table: + type: file + description: Recalibration table from gatk4_baserecalibrator + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" + +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" + - bam: + type: file + description: Recalibrated BAM file + pattern: "*.{bam}" + - cram: + type: file + description: Recalibrated CRAM file + pattern: "*.{cram}" + +authors: + - "@yocra3" + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/applyvqsr/main.nf b/modules/gatk4/applyvqsr/main.nf index 006840b3..d3da8332 100644 --- a/modules/gatk4/applyvqsr/main.nf +++ b/modules/gatk4/applyvqsr/main.nf @@ -2,24 +2,21 @@ process GATK4_APPLYVQSR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcf), path(tbi), path(recal), path(recalidx), path(tranches) - path fasta - path fai - path dict - val allelespecific - val truthsensitivity - val mode + tuple val(meta), path(vcf), path(vcf_tbi), path(recal), path(recal_index), path(tranches) + path fasta + path fai + path dict output: - tuple val(meta), path("*.vcf.gz") , emit: vcf - tuple val(meta), path("*.tbi") , emit: tbi - path "versions.yml" , emit: versions + tuple val(meta), path("*.vcf.gz"), emit: vcf + tuple val(meta), path("*.tbi") , emit: tbi + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -27,10 +24,7 @@ process GATK4_APPLYVQSR { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - refCommand = fasta ? "-R ${fasta} " : '' - alleleSpecificCommand = allelespecific ? '-AS' : '' - truthSensitivityCommand = truthsensitivity ? "--truth-sensitivity-filter-level ${truthsensitivity}" : '' - modeCommand = mode ? "--mode ${mode} " : 'SNP' + def reference_command = fasta ? "--reference $fasta" : '' def avail_mem = 3 if (!task.memory) { @@ -40,14 +34,12 @@ process GATK4_APPLYVQSR { } """ gatk --java-options "-Xmx${avail_mem}g" ApplyVQSR \\ - ${refCommand} \\ - -V ${vcf} \\ - -O ${prefix}.vcf.gz \\ - ${alleleSpecificCommand} \\ - ${truthSensitivityCommand} \\ + --variant ${vcf} \\ + --output ${prefix}.vcf.gz \\ + $reference_command \\ --tranches-file $tranches \\ --recal-file $recal \\ - ${modeCommand} \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/applyvqsr/meta.yml b/modules/gatk4/applyvqsr/meta.yml index b757f3e9..a05813d1 100644 --- a/modules/gatk4/applyvqsr/meta.yml +++ b/modules/gatk4/applyvqsr/meta.yml @@ -17,7 +17,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -29,20 +29,20 @@ input: type: file description: VCF file to be recalibrated, this should be the same file as used for the first stage VariantRecalibrator. pattern: "*.vcf" - - tbi: + - vcf_tbi: type: file - description: Tbi index for the input vcf file. + description: tabix index for the input vcf file. pattern: "*.vcf.tbi" - recal: type: file description: Recalibration file produced when the input vcf was run through VariantRecalibrator in stage 1. pattern: "*.recal" - - recalidx: + - recal_index: type: file description: Index file for the recalibration file. pattern: ".recal.idx" - tranches: - type: boolean + type: file description: Tranches file produced when the input vcf was run through VariantRecalibrator in stage 1. pattern: ".tranches" - fasta: @@ -57,18 +57,6 @@ input: type: file description: GATK sequence dictionary pattern: "*.dict" - - allelespecific: - type: boolean - description: Whether or not to run ApplyVQSR in allele specific mode, this should be kept the same as the stage 1 VariantRecalibrator run. - pattern: "{true,false}" - - truthsensitivity: - type: double - description: Value to be used as the truth sensitivity cutoff score. - pattern: "99.0" - - mode: - type: String - description: Specifies which recalibration mode to employ, should be the same as the stage 1 VariantRecalibrator run. (SNP is default, BOTH is intended for testing only) - pattern: "{SNP,INDEL,BOTH}" output: - vcf: diff --git a/modules/gatk4/baserecalibrator/main.nf b/modules/gatk4/baserecalibrator/main.nf index 48c127f0..fb26d3da 100644 --- a/modules/gatk4/baserecalibrator/main.nf +++ b/modules/gatk4/baserecalibrator/main.nf @@ -2,22 +2,22 @@ process GATK4_BASERECALIBRATOR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(intervals) - path fasta - path fai - path dict - path knownSites - path knownSites_tbi + path fasta + path fai + path dict + path known_sites + path known_sites_tbi output: tuple val(meta), path("*.table"), emit: table - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -25,8 +25,8 @@ process GATK4_BASERECALIBRATOR { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def intervalsCommand = intervals ? "-L ${intervals}" : "" - def sitesCommand = knownSites.collect{"--known-sites ${it}"}.join(' ') + def interval_command = intervals ? "--intervals $intervals" : "" + def sites_command = known_sites.collect{"--known-sites $it"}.join(' ') def avail_mem = 3 if (!task.memory) { @@ -34,16 +34,15 @@ process GATK4_BASERECALIBRATOR { } else { avail_mem = task.memory.giga } - """ - gatk --java-options "-Xmx${avail_mem}g" BaseRecalibrator \ - -R $fasta \ - -I $input \ - $sitesCommand \ - $intervalsCommand \ - --tmp-dir . \ - $args \ - -O ${prefix}.table + gatk --java-options "-Xmx${avail_mem}g" BaseRecalibrator \\ + --input $input \\ + --output ${prefix}.table \\ + --reference $fasta \\ + $interval_command \\ + $sites_command \\ + --tmp-dir . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/baserecalibrator/meta.yml b/modules/gatk4/baserecalibrator/meta.yml index 641a50df..08c1ebbf 100644 --- a/modules/gatk4/baserecalibrator/meta.yml +++ b/modules/gatk4/baserecalibrator/meta.yml @@ -5,14 +5,13 @@ keywords: tools: - gatk4: description: | - Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools - with a primary focus on variant discovery and genotyping. Its powerful processing engine - and high-performance computing features make it capable of taking on projects of any size. + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] - + licence: ["Apache-2.0"] input: - meta: @@ -43,9 +42,14 @@ input: type: file description: GATK sequence dictionary pattern: "*.dict" - - knownSites: + - known_sites: type: file - description: Bed file with the genomic regions included in the library (optional) + description: VCF files with known sites for indels / snps (optional) + pattern: "*.vcf.gz" + - known_sites_tbi: + type: file + description: Tabix index of the known_sites (optional) + pattern: "*.vcf.gz.tbi" output: - meta: @@ -65,3 +69,4 @@ output: authors: - "@yocra3" - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/baserecalibratorspark/main.nf b/modules/gatk4/baserecalibratorspark/main.nf new file mode 100644 index 00000000..79988b72 --- /dev/null +++ b/modules/gatk4/baserecalibratorspark/main.nf @@ -0,0 +1,53 @@ +process GATK4_BASERECALIBRATOR_SPARK { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(input), path(input_index), path(intervals) + path fasta + path fai + path dict + path known_sites + path known_sites_tbi + + output: + tuple val(meta), path("*.table"), emit: table + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? "--intervals $intervals" : "" + def sites_command = known_sites.collect{"--known-sites $it"}.join(' ') + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK BaseRecalibratorSpark] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" BaseRecalibratorSpark \\ + --input $input \\ + --output ${prefix}.table \\ + --reference $fasta \\ + $interval_command \\ + $sites_command \\ + --spark-master local[${task.cpus}] \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/baserecalibratorspark/meta.yml b/modules/gatk4/baserecalibratorspark/meta.yml new file mode 100644 index 00000000..581c48ef --- /dev/null +++ b/modules/gatk4/baserecalibratorspark/meta.yml @@ -0,0 +1,72 @@ +name: gatk4_baserecalibrator_spark +description: Generate recalibration table for Base Quality Score Recalibration (BQSR) +keywords: + - sort +tools: + - gatk4: + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" + - known_sites: + type: file + description: VCF files with known sites for indels / snps (optional) + pattern: "*.vcf.gz" + - known_sites_tbi: + type: file + description: Tabix index of the known_sites (optional) + pattern: "*.vcf.gz.tbi" + +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" + - table: + type: file + description: Recalibration table from BaseRecalibrator + pattern: "*.{table}" + +authors: + - "@yocra3" + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/bedtointervallist/main.nf b/modules/gatk4/bedtointervallist/main.nf index 9f2b2dfe..6224d9b3 100644 --- a/modules/gatk4/bedtointervallist/main.nf +++ b/modules/gatk4/bedtointervallist/main.nf @@ -2,14 +2,14 @@ process GATK4_BEDTOINTERVALLIST { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(bed) - path sequence_dict + path dict output: tuple val(meta), path('*.interval_list'), emit: interval_list @@ -21,6 +21,7 @@ process GATK4_BEDTOINTERVALLIST { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK BedToIntervalList] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -29,9 +30,10 @@ process GATK4_BEDTOINTERVALLIST { } """ gatk --java-options "-Xmx${avail_mem}g" BedToIntervalList \\ - -I $bed \\ - -SD $sequence_dict \\ - -O ${prefix}.interval_list \\ + --INPUT $bed \\ + --OUTPUT ${prefix}.interval_list \\ + --SEQUENCE_DICTIONARY $dict \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml @@ -39,4 +41,15 @@ process GATK4_BEDTOINTERVALLIST { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.interval_list + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/bedtointervallist/meta.yml b/modules/gatk4/bedtointervallist/meta.yml index 910f9552..986f1592 100644 --- a/modules/gatk4/bedtointervallist/meta.yml +++ b/modules/gatk4/bedtointervallist/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/calculatecontamination/main.nf b/modules/gatk4/calculatecontamination/main.nf index 177f4878..c289684e 100644 --- a/modules/gatk4/calculatecontamination/main.nf +++ b/modules/gatk4/calculatecontamination/main.nf @@ -2,14 +2,13 @@ process GATK4_CALCULATECONTAMINATION { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(pileup), path(matched) - val segmentout output: tuple val(meta), path('*.contamination.table'), emit: contamination @@ -22,8 +21,8 @@ process GATK4_CALCULATECONTAMINATION { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def matched_command = matched ? " -matched ${matched} " : '' - def segment_command = segmentout ? " -segments ${prefix}.segmentation.table" : '' + def matched_command = matched ? "--matched-normal $matched" : '' + def avail_mem = 3 if (!task.memory) { log.info '[GATK CalculateContamination] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -32,10 +31,10 @@ process GATK4_CALCULATECONTAMINATION { } """ gatk --java-options "-Xmx${avail_mem}g" CalculateContamination \\ - -I $pileup \\ + --input $pileup \\ + --output ${prefix}.contamination.table \\ $matched_command \\ - -O ${prefix}.contamination.table \\ - $segment_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/calculatecontamination/meta.yml b/modules/gatk4/calculatecontamination/meta.yml index 8c843732..7767bd08 100644 --- a/modules/gatk4/calculatecontamination/meta.yml +++ b/modules/gatk4/calculatecontamination/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -32,9 +32,6 @@ input: type: file description: File containing the pileups summary table of a normal sample that matches with the tumor sample specified in pileup argument. This is an optional input. pattern: "*.pileups.table" - - segmentout: - type: boolean - description: specifies whether to output the segmentation table. output: - contamination: @@ -43,7 +40,7 @@ output: pattern: "*.contamination.table" - segmentation: type: file - description: optional output table containing segmentation of tumor minor allele fractions. + description: output table containing segmentation of tumor minor allele fractions (optional) pattern: "*.segmentation.table" - versions: type: file @@ -52,3 +49,4 @@ output: authors: - "@GCJMackenzie" + - "@maxulysse" diff --git a/modules/gatk4/combinegvcfs/main.nf b/modules/gatk4/combinegvcfs/main.nf new file mode 100644 index 00000000..db4d9cdb --- /dev/null +++ b/modules/gatk4/combinegvcfs/main.nf @@ -0,0 +1,47 @@ +process GATK4_COMBINEGVCFS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(vcf), path(vcf_idx) + path fasta + path fai + path dict + + output: + tuple val(meta), path("*.combined.g.vcf.gz"), emit: combined_gvcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = vcf.collect{"--variant $it"}.join(' ') + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK COMBINEGVCFS] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" CombineGVCFs \\ + $input_list \\ + --output ${prefix}.combined.g.vcf.gz \\ + --reference ${fasta} \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/combinegvcfs/meta.yml b/modules/gatk4/combinegvcfs/meta.yml new file mode 100644 index 00000000..9330e084 --- /dev/null +++ b/modules/gatk4/combinegvcfs/meta.yml @@ -0,0 +1,61 @@ +name: gatk4_combinegvcfs +description: Combine per-sample gVCF files produced by HaplotypeCaller into a multi-sample gVCF file +keywords: + - gvcf + - gatk4 + - vcf + - combinegvcfs + - Short_Variant_Discovery +tools: + - gatk4: + description: + Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037593911-CombineGVCFs + tool_dev_url: https://github.com/broadinstitute/gatk + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - vcf: + type: file + description: Compressed VCF files + pattern: "*.vcf.gz" + - vcf_idx: + type: file + description: VCF Index file + pattern: "*.vcf.gz.idx" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: FASTA index file + pattern: "*.fasta.fai" + - dict: + type: file + description: FASTA dictionary file + pattern: "*.dict" +output: + - gvcf: + type: file + description: Compressed Combined GVCF file + pattern: "*.combined.g.vcf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" + - "@maxulysse" diff --git a/modules/gatk4/createsequencedictionary/main.nf b/modules/gatk4/createsequencedictionary/main.nf index 714843c2..13fa9e81 100644 --- a/modules/gatk4/createsequencedictionary/main.nf +++ b/modules/gatk4/createsequencedictionary/main.nf @@ -2,23 +2,24 @@ process GATK4_CREATESEQUENCEDICTIONARY { tag "$fasta" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: path fasta output: - path "*.dict" , emit: dict - path "versions.yml" , emit: versions + path "*.dict" , emit: dict + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + def avail_mem = 6 if (!task.memory) { log.info '[GATK CreateSequenceDictionary] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.' @@ -26,10 +27,10 @@ process GATK4_CREATESEQUENCEDICTIONARY { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - CreateSequenceDictionary \\ + gatk --java-options "-Xmx${avail_mem}g" CreateSequenceDictionary \\ --REFERENCE $fasta \\ --URI $fasta \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml @@ -37,4 +38,14 @@ process GATK4_CREATESEQUENCEDICTIONARY { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + """ + touch test.dict + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/createsequencedictionary/meta.yml b/modules/gatk4/createsequencedictionary/meta.yml index 54f479b3..bd247888 100644 --- a/modules/gatk4/createsequencedictionary/meta.yml +++ b/modules/gatk4/createsequencedictionary/meta.yml @@ -1,32 +1,32 @@ name: gatk4_createsequencedictionary description: Creates a sequence dictionary for a reference sequence keywords: - - dictionary - - fasta + - dictionary + - fasta tools: - - gatk: - description: | - Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools - with a primary focus on variant discovery and genotyping. Its powerful processing engine - and high-performance computing features make it capable of taking on projects of any size. - homepage: https://gatk.broadinstitute.org/hc/en-us - documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s - doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + - gatk: + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] input: - - fasta: - type: file - description: Input fasta file - pattern: "*.{fasta,fa}" + - fasta: + type: file + description: Input fasta file + pattern: "*.{fasta,fa}" output: - - dict: - type: file - description: gatk dictionary file - pattern: "*.{dict}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - dict: + type: file + description: gatk dictionary file + pattern: "*.{dict}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/gatk4/createsomaticpanelofnormals/main.nf b/modules/gatk4/createsomaticpanelofnormals/main.nf index a82c24d8..653a9497 100644 --- a/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -2,16 +2,16 @@ process GATK4_CREATESOMATICPANELOFNORMALS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(genomicsdb) - path fasta - path fai - path dict + path fasta + path fai + path dict output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -24,6 +24,7 @@ process GATK4_CREATESOMATICPANELOFNORMALS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK CreateSomaticPanelOfNormals] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -31,11 +32,11 @@ process GATK4_CREATESOMATICPANELOFNORMALS { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - CreateSomaticPanelOfNormals \\ - -R $fasta \\ - -V gendb://$genomicsdb \\ - -O ${prefix}.vcf.gz \\ + gatk --java-options "-Xmx${avail_mem}g" CreateSomaticPanelOfNormals \\ + --variant gendb://$genomicsdb \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/createsomaticpanelofnormals/meta.yml b/modules/gatk4/createsomaticpanelofnormals/meta.yml index e450c68a..43e675fb 100644 --- a/modules/gatk4/createsomaticpanelofnormals/meta.yml +++ b/modules/gatk4/createsomaticpanelofnormals/meta.yml @@ -44,7 +44,7 @@ output: pattern: "*.vcf.gz" - tbi: type: file - description: Index of vcf file + description: Tabix index of vcf file pattern: "*vcf.gz.tbi" - versions: type: file diff --git a/modules/gatk4/estimatelibrarycomplexity/main.nf b/modules/gatk4/estimatelibrarycomplexity/main.nf index 2894e305..46e09a95 100644 --- a/modules/gatk4/estimatelibrarycomplexity/main.nf +++ b/modules/gatk4/estimatelibrarycomplexity/main.nf @@ -2,20 +2,20 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(cram) - path(fasta) - path(fai) - path(dict) + tuple val(meta), path(input) + path fasta + path fai + path dict output: tuple val(meta), path('*.metrics'), emit: metrics - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,7 +23,7 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def crams = cram.collect(){ x -> "-I ".concat(x.toString()) }.join(" ") + def input_list = input.collect(){"--INPUT $it"}.join(" ") def avail_mem = 3 if (!task.memory) { @@ -32,12 +32,12 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" EstimateLibraryComplexity \ - ${crams} \ - -O ${prefix}.metrics \ - --REFERENCE_SEQUENCE ${fasta} \ - --VALIDATION_STRINGENCY SILENT \ - --TMP_DIR . $args + gatk --java-options "-Xmx${avail_mem}g" EstimateLibraryComplexity \\ + $input_list \\ + --OUTPUT ${prefix}.metrics \\ + --REFERENCE_SEQUENCE ${fasta} \\ + --TMP_DIR . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/estimatelibrarycomplexity/meta.yml b/modules/gatk4/estimatelibrarycomplexity/meta.yml index 94c1817d..72a679e9 100644 --- a/modules/gatk4/estimatelibrarycomplexity/meta.yml +++ b/modules/gatk4/estimatelibrarycomplexity/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us tool_dev_url: https://github.com/broadinstitute/gatk doi: "10.1158/1538-7445.AM2017-3590" - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -20,7 +20,7 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - cram: + - input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" @@ -54,3 +54,4 @@ output: authors: - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/fastqtosam/main.nf b/modules/gatk4/fastqtosam/main.nf index 631c0394..326d4d58 100644 --- a/modules/gatk4/fastqtosam/main.nf +++ b/modules/gatk4/fastqtosam/main.nf @@ -2,10 +2,10 @@ process GATK4_FASTQTOSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(reads) @@ -20,7 +20,8 @@ process GATK4_FASTQTOSAM { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def read_files = meta.single_end ? "-F1 $reads" : "-F1 ${reads[0]} -F2 ${reads[1]}" + def reads_command = meta.single_end ? "--FASTQ $reads" : "--FASTQ ${reads[0]} --FASTQ2 ${reads[1]}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK FastqToSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -29,9 +30,10 @@ process GATK4_FASTQTOSAM { } """ gatk --java-options "-Xmx${avail_mem}g" FastqToSam \\ - $read_files \\ - -O ${prefix}.bam \\ - -SM $prefix \\ + $reads_command \\ + --OUTPUT ${prefix}.bam \\ + --SAMPLE_NAME $prefix \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/fastqtosam/meta.yml b/modules/gatk4/fastqtosam/meta.yml index 8bd9eed5..6e5bf1cd 100644 --- a/modules/gatk4/fastqtosam/meta.yml +++ b/modules/gatk4/fastqtosam/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s tool_dev_url: https://github.com/broadinstitute/gatk doi: "10.1158/1538-7445.AM2017-3590" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -25,7 +25,7 @@ input: - reads: type: file description: List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + respectively. pattern: "*.fastq.gz" output: @@ -34,14 +34,14 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bam: type: file description: Converted BAM file pattern: "*.bam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ntoda03" diff --git a/modules/gatk4/filtermutectcalls/main.nf b/modules/gatk4/filtermutectcalls/main.nf index a7dd9a61..91f6defa 100644 --- a/modules/gatk4/filtermutectcalls/main.nf +++ b/modules/gatk4/filtermutectcalls/main.nf @@ -2,16 +2,16 @@ process GATK4_FILTERMUTECTCALLS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcf), path(tbi), path(stats), path(orientationbias), path(segmentation), path(contaminationfile), val(contaminationest) - path fasta - path fai - path dict + tuple val(meta), path(vcf), path(vcf_tbi), path(stats), path(orientationbias), path(segmentation), path(table), val(estimate) + path fasta + path fai + path dict output: tuple val(meta), path("*.vcf.gz") , emit: vcf @@ -26,20 +26,11 @@ process GATK4_FILTERMUTECTCALLS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def orientationbias_options = '' - if (orientationbias) { - orientationbias_options = '--orientation-bias-artifact-priors ' + orientationbias.join(' --orientation-bias-artifact-priors ') - } + def orientationbias_command = orientationbias ? orientationbias.collect{"--orientation-bias-artifact-priors $it"}.join(' ') : '' + def segmentation_command = segmentation ? segmentation.collect{"--tumor-segmentation $it"}.join(' ') : '' + def estimate_command = estimate ? " --contamination-estimate ${estimate} " : '' + def table_command = table ? " --contamination-table ${table} " : '' - def segmentation_options = '' - if (segmentation) { - segmentation_options = '--tumor-segmentation ' + segmentation.join(' --tumor-segmentation ') - } - - def contamination_options = contaminationest ? " --contamination-estimate ${contaminationest} " : '' - if (contaminationfile) { - contamination_options = '--contamination-table ' + contaminationfile.join(' --contamination-table ') - } def avail_mem = 3 if (!task.memory) { log.info '[GATK FilterMutectCalls] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -48,12 +39,14 @@ process GATK4_FILTERMUTECTCALLS { } """ gatk --java-options "-Xmx${avail_mem}g" FilterMutectCalls \\ - -R $fasta \\ - -V $vcf \\ - $orientationbias_options \\ - $segmentation_options \\ - $contamination_options \\ - -O ${prefix}.vcf.gz \\ + --variant $vcf \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + $orientationbias_command \\ + $segmentation_command \\ + $estimate_command \\ + $table_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/filtermutectcalls/meta.yml b/modules/gatk4/filtermutectcalls/meta.yml index 7d85e2b9..d1972d70 100644 --- a/modules/gatk4/filtermutectcalls/meta.yml +++ b/modules/gatk4/filtermutectcalls/meta.yml @@ -1,6 +1,6 @@ name: gatk4_filtermutectcalls description: | - Filters the raw output of mutect2, can optionally use outputs of calculatecontamination and learnreadorientationmodel to improve filtering. + Filters the raw output of mutect2, can optionally use outputs of calculatecontamination and learnreadorientationmodel to improve filtering. keywords: - filtermutectcalls - mutect2 @@ -26,9 +26,9 @@ input: type: file description: compressed vcf file of mutect2calls pattern: "*.vcf.gz" - - tbi: + - vcf_tbi: type: file - description: Index of vcf file + description: Tabix index of vcf file pattern: "*vcf.gz.tbi" - stats: type: file @@ -42,13 +42,13 @@ input: type: list description: tables containing segmentation information for input vcf. Optional input. pattern: "*.segmentation.table" - - contaminationfile: + - table: type: list - description: table(s) containing contamination contamination data for input vcf. Optional input, takes priority over contaminationest. + description: table(s) containing contamination data for input vcf. Optional input, takes priority over estimate. pattern: "*.contamination.table" - - contaminationest: + - estimate: type: val - description: estimation of contamination value as a double. Optional input, will only be used if contaminationfile is not specified. + description: estimation of contamination value as a double. Optional input, will only be used if table is not specified. - fasta: type: file description: The reference fasta file @@ -82,3 +82,4 @@ output: authors: - "@GCJMackenzie" + - "@maxulysse" diff --git a/modules/gatk4/gatherbqsrreports/main.nf b/modules/gatk4/gatherbqsrreports/main.nf index f8d91a92..231bd39e 100644 --- a/modules/gatk4/gatherbqsrreports/main.nf +++ b/modules/gatk4/gatherbqsrreports/main.nf @@ -2,13 +2,13 @@ process GATK4_GATHERBQSRREPORTS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(recal_table) + tuple val(meta), path(table) output: tuple val(meta), path("*.table"), emit: table @@ -20,7 +20,7 @@ process GATK4_GATHERBQSRREPORTS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input = recal_table.collect{"-I ${it}"}.join(' ') + def input_list = table.collect{"--input $it"}.join(' ') def avail_mem = 3 if (!task.memory) { @@ -29,12 +29,11 @@ process GATK4_GATHERBQSRREPORTS { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - GatherBQSRReports \ - ${input} \ - --tmp-dir . \ - $args \ - --output ${prefix}.table + gatk --java-options "-Xmx${avail_mem}g" GatherBQSRReports \\ + $input_list \\ + --output ${prefix}.table \\ + --tmp-dir . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/gatherbqsrreports/meta.yml b/modules/gatk4/gatherbqsrreports/meta.yml index f71afd69..99e74951 100644 --- a/modules/gatk4/gatherbqsrreports/meta.yml +++ b/modules/gatk4/gatherbqsrreports/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us tool_dev_url: https://github.com/broadinstitute/gatk doi: "10.1158/1538-7445.AM2017-3590" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: @@ -19,7 +19,7 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - recal_table: + - table: type: file description: File(s) containing BQSR table(s) pattern: "*.table" @@ -30,14 +30,14 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - table: + type: file + description: File containing joined BQSR table + pattern: "*.table" - versions: type: file description: File containing software versions pattern: "versions.yml" - - recal_table: - type: file - description: File containing joined BQSR table - pattern: "*.table" authors: - "@FriederikeHanssen" diff --git a/modules/gatk4/gatherpileupsummaries/main.nf b/modules/gatk4/gatherpileupsummaries/main.nf new file mode 100644 index 00000000..0b763f41 --- /dev/null +++ b/modules/gatk4/gatherpileupsummaries/main.nf @@ -0,0 +1,46 @@ +process GATK4_GATHERPILEUPSUMMARIES { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + + input: + tuple val(meta), path(pileup) + path dict + + output: + tuple val(meta), path("*.pileupsummaries.table"), emit: table + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = pileup.collect{ "--I $it" }.join(' ') + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK GatherPileupSummaries] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" GatherPileupSummaries \\ + $input_list \\ + --O ${prefix}.pileupsummaries.table \\ + --sequence-dictionary $dict \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/gatherpileupsummaries/meta.yml b/modules/gatk4/gatherpileupsummaries/meta.yml new file mode 100644 index 00000000..823ea365 --- /dev/null +++ b/modules/gatk4/gatherpileupsummaries/meta.yml @@ -0,0 +1,42 @@ +name: gatk4_gatherpileupsummaries +description: write your description here +keywords: + - sort +tools: + - gatk4: + description: Genome Analysis Toolkit (GATK4) + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us + tool_dev_url: https://github.com/broadinstitute/gatk + doi: "10.1158/1538-7445.AM2017-3590" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pileup: + type: (list of) file(s) + description: Pileup files from gatk4/getpileupsummaries + pattern: "*.pileups.table" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - table: + type: file + description: pileup summaries table file + pattern: "*.pileupsummaries.table" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/genomicsdbimport/main.nf b/modules/gatk4/genomicsdbimport/main.nf index e88471e1..810f2b63 100644 --- a/modules/gatk4/genomicsdbimport/main.nf +++ b/modules/gatk4/genomicsdbimport/main.nf @@ -2,19 +2,19 @@ process GATK4_GENOMICSDBIMPORT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcf), path(tbi), path(intervalfile), val(intervalval), path(wspace) - val run_intlist - val run_updatewspace - val input_map + tuple val(meta), path(vcf), path(tbi), path(interval_file), val(interval_value), path(wspace) + val run_intlist + val run_updatewspace + val input_map output: - tuple val(meta), path("${prefix}") , optional:true, emit: genomicsdb + tuple val(meta), path("$prefix") , optional:true, emit: genomicsdb tuple val(meta), path("$updated_db") , optional:true, emit: updatedb tuple val(meta), path("*.interval_list"), optional:true, emit: intervallist path "versions.yml" , emit: versions @@ -27,22 +27,22 @@ process GATK4_GENOMICSDBIMPORT { prefix = task.ext.prefix ?: "${meta.id}" // settings for running default create gendb mode - inputs_command = input_map ? "--sample-name-map ${vcf[0]}" : "${'-V ' + vcf.join(' -V ')}" - dir_command = "--genomicsdb-workspace-path ${prefix}" - intervals_command = intervalfile ? " -L ${intervalfile} " : " -L ${intervalval} " + input_command = input_map ? "--sample-name-map ${vcf[0]}" : vcf.collect(){"--variant $it"}.join(' ') + + genomicsdb_command = "--genomicsdb-workspace-path ${prefix}" + interval_command = interval_file ? "--intervals ${interval_file}" : "--intervals ${interval_value}" // settings changed for running get intervals list mode if run_intlist is true if (run_intlist) { - inputs_command = '' - dir_command = "--genomicsdb-update-workspace-path ${wspace}" - intervals_command = "--output-interval-list-to-file ${prefix}.interval_list" + genomicsdb_command = "--genomicsdb-update-workspace-path ${wspace}" + interval_command = "--output-interval-list-to-file ${prefix}.interval_list" } - // settings changed for running update gendb mode. inputs_command same as default, update_db forces module to emit the updated gendb + // settings changed for running update gendb mode. input_command same as default, update_db forces module to emit the updated gendb if (run_updatewspace) { - dir_command = "--genomicsdb-update-workspace-path ${wspace}" - intervals_command = '' - updated_db = wspace.toString() + genomicsdb_command = "--genomicsdb-update-workspace-path ${wspace}" + interval_command = '' + updated_db = "${wspace}" } def avail_mem = 3 @@ -53,9 +53,10 @@ process GATK4_GENOMICSDBIMPORT { } """ gatk --java-options "-Xmx${avail_mem}g" GenomicsDBImport \\ - $inputs_command \\ - $dir_command \\ - $intervals_command \\ + $input_command \\ + $genomicsdb_command \\ + $interval_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/genotypegvcfs/main.nf b/modules/gatk4/genotypegvcfs/main.nf index c3e41229..11024b1b 100644 --- a/modules/gatk4/genotypegvcfs/main.nf +++ b/modules/gatk4/genotypegvcfs/main.nf @@ -1,19 +1,19 @@ process GATK4_GENOTYPEGVCFS { tag "$meta.id" - label 'process_medium' + label 'process_high' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(gvcf), path(gvcf_index), path(intervals) + tuple val(meta), path(gvcf), path(gvcf_index), path(intervals), path(intervals_index) path fasta - path fasta_index - path fasta_dict + path fai + path dict path dbsnp - path dbsnp_index + path dbsnp_tbi output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -26,9 +26,10 @@ process GATK4_GENOTYPEGVCFS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def dbsnp_options = dbsnp ? "-D ${dbsnp}" : "" - def interval_options = intervals ? "-L ${intervals}" : "" - def gvcf_options = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" + def gvcf_command = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" + def dbsnp_command = dbsnp ? "--dbsnp $dbsnp" : "" + def interval_command = intervals ? "--intervals $intervals" : "" + def avail_mem = 3 if (!task.memory) { log.info '[GATK GenotypeGVCFs] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -36,14 +37,14 @@ process GATK4_GENOTYPEGVCFS { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - GenotypeGVCFs \\ - $args \\ - $interval_options \\ - $dbsnp_options \\ - -R $fasta \\ - -V $gvcf_options \\ - -O ${prefix}.vcf.gz + gatk --java-options "-Xmx${avail_mem}g" GenotypeGVCFs \\ + --variant $gvcf_command \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + $interval_command \\ + $dbsnp_command \\ + --tmp-dir . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/genotypegvcfs/meta.yml b/modules/gatk4/genotypegvcfs/meta.yml index 2c9767b2..7bec10ed 100644 --- a/modules/gatk4/genotypegvcfs/meta.yml +++ b/modules/gatk4/genotypegvcfs/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s tool_dev_url: https://github.com/broadinstitute/gatk doi: "10.1158/1538-7445.AM2017-3590" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: @@ -21,22 +21,30 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - gvcf: - type: tuple of files + type: file description: | - Tuple of gVCF(.gz) file (first) and its index (second) or the path to a GenomicsDB (and empty) - pattern: ["*.{vcf,vcf.gz}", "*.{idx,tbi}"] + gVCF(.gz) file or to a GenomicsDB + pattern: "*.{vcf,vcf.gz}" + - gvcf_index: + type: file + description: | + index of gvcf file, or empty when providing GenomicsDB + pattern: "*.{idx,tbi}" - intervals: type: file - description: Bed file with the genomic regions included in the library (optional) + description: Interval file with the genomic regions included in the library (optional) + - intervals_index: + type: file + description: Interval index file (optional) - fasta: type: file description: Reference fasta file pattern: "*.fasta" - - fasta_index: + - fai: type: file description: Reference fasta index file pattern: "*.fai" - - fasta_dict: + - dict: type: file description: Reference fasta sequence dict file pattern: "*.dict" @@ -44,8 +52,8 @@ input: type: file description: dbSNP VCF file pattern: "*.vcf.gz" - - dbsnp_index: - type: tuple of files + - dbsnp_tbi: + type: file description: dbSNP VCF index file pattern: "*.tbi" @@ -70,3 +78,4 @@ output: authors: - "@santiagorevale" + - "@maxulysse" diff --git a/modules/gatk4/getpileupsummaries/main.nf b/modules/gatk4/getpileupsummaries/main.nf index 3667a210..1c056170 100644 --- a/modules/gatk4/getpileupsummaries/main.nf +++ b/modules/gatk4/getpileupsummaries/main.nf @@ -2,20 +2,22 @@ process GATK4_GETPILEUPSUMMARIES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) - path variants - path variants_tbi - path sites + tuple val(meta), path(input), path(index), path(intervals) + path fasta + path fai + path dict + path variants + path variants_tbi output: tuple val(meta), path('*.pileups.table'), emit: table - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,9 +25,8 @@ process GATK4_GETPILEUPSUMMARIES { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def sitesCommand = '' - - sitesCommand = sites ? " -L ${sites} " : " -L ${variants} " + def interval_command = intervals ? "--intervals $intervals" : "" + def reference_command = fasta ? "--reference $fasta" : '' def avail_mem = 3 if (!task.memory) { @@ -35,10 +36,12 @@ process GATK4_GETPILEUPSUMMARIES { } """ gatk --java-options "-Xmx${avail_mem}g" GetPileupSummaries \\ - -I $bam \\ - -V $variants \\ - $sitesCommand \\ - -O ${prefix}.pileups.table \\ + --input $input \\ + --variant $variants \\ + --output ${prefix}.pileups.table \\ + $reference_command \\ + $interval_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/getpileupsummaries/meta.yml b/modules/gatk4/getpileupsummaries/meta.yml index 0add299b..3a940dea 100644 --- a/modules/gatk4/getpileupsummaries/meta.yml +++ b/modules/gatk4/getpileupsummaries/meta.yml @@ -15,7 +15,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -23,14 +23,30 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - bam: + - input: type: file - description: BAM file to be summarised. - pattern: "*.bam" - - bai: + description: BAM/CRAM file to be summarised. + pattern: "*.{bam,cram}" + - input_index: type: file - description: BAM file index. - pattern: "*.bam.bai" + description: BAM/CRAM file index. + pattern: "*.{bai,crai}" + - intervals: + type: file + description: File containing specified sites to be used for the summary. If this option is not specified, variants file is used instead automatically. + pattern: "*.interval_list" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" - variants: type: file description: Population vcf of germline sequencing, containing allele fractions. Is also used as sites file if no separate sites file is specified. @@ -39,10 +55,6 @@ input: type: file description: Index file for the germline resource. pattern: "*.vcf.gz.tbi" - - sites: - type: file - description: File containing specified sites to be used for the summary. If this option is not specified, variants file is used instead automatically. - pattern: "*.interval_list" output: - pileup: diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 6f03ffd2..6dd3f69e 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -2,22 +2,22 @@ process GATK4_HAPLOTYPECALLER { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(intervals) - path fasta - path fai - path dict - path dbsnp - path dbsnp_tbi + path fasta + path fai + path dict + path dbsnp + path dbsnp_tbi output: tuple val(meta), path("*.vcf.gz"), emit: vcf - tuple val(meta), path("*.tbi") , emit: tbi + tuple val(meta), path("*.tbi") , optional:true, emit: tbi path "versions.yml" , emit: versions when: @@ -26,25 +26,24 @@ process GATK4_HAPLOTYPECALLER { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def interval_option = intervals ? "-L ${intervals}" : "" - def dbsnp_option = dbsnp ? "-D ${dbsnp}" : "" - def avail_mem = 3 + def dbsnp_command = dbsnp ? "--dbsnp $dbsnp" : "" + def interval_command = intervals ? "--intervals $intervals" : "" + + def avail_mem = 3 if (!task.memory) { log.info '[GATK HaplotypeCaller] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' } else { avail_mem = task.memory.giga } """ - gatk \\ - --java-options "-Xmx${avail_mem}g" \\ - HaplotypeCaller \\ - -R $fasta \\ - -I $input \\ - ${dbsnp_option} \\ - ${interval_option} \\ - -O ${prefix}.vcf.gz \\ - $args \\ - --tmp-dir . + gatk --java-options "-Xmx${avail_mem}g" HaplotypeCaller \\ + --input $input \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + $dbsnp_command \\ + $interval_command \\ + --tmp-dir . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/haplotypecaller/meta.yml b/modules/gatk4/haplotypecaller/meta.yml index 869bd1d2..81851a96 100644 --- a/modules/gatk4/haplotypecaller/meta.yml +++ b/modules/gatk4/haplotypecaller/meta.yml @@ -7,13 +7,13 @@ keywords: tools: - gatk4: description: | - Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools - with a primary focus on variant discovery and genotyping. Its powerful processing engine - and high-performance computing features make it capable of taking on projects of any size. + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/gatk4/indexfeaturefile/main.nf b/modules/gatk4/indexfeaturefile/main.nf index b5add0e0..264f71ef 100644 --- a/modules/gatk4/indexfeaturefile/main.nf +++ b/modules/gatk4/indexfeaturefile/main.nf @@ -2,10 +2,10 @@ process GATK4_INDEXFEATUREFILE { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(feature_file) @@ -19,6 +19,7 @@ process GATK4_INDEXFEATUREFILE { script: def args = task.ext.args ?: '' + def avail_mem = 3 if (!task.memory) { log.info '[GATK IndexFeatureFile] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -26,10 +27,10 @@ process GATK4_INDEXFEATUREFILE { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - IndexFeatureFile \\ - $args \\ - -I $feature_file + gatk --java-options "-Xmx${avail_mem}g" IndexFeatureFile \\ + --input $feature_file \\ + --tmp-dir . \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/indexfeaturefile/meta.yml b/modules/gatk4/indexfeaturefile/meta.yml index eebe6b85..721350a9 100644 --- a/modules/gatk4/indexfeaturefile/meta.yml +++ b/modules/gatk4/indexfeaturefile/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s tool_dev_url: https://github.com/broadinstitute/gatk doi: "10.1158/1538-7445.AM2017-3590" - licence: ['BSD-3-clause'] + licence: ["BSD-3-clause"] input: - meta: diff --git a/modules/gatk4/intervallisttobed/main.nf b/modules/gatk4/intervallisttobed/main.nf new file mode 100644 index 00000000..84f3c472 --- /dev/null +++ b/modules/gatk4/intervallisttobed/main.nf @@ -0,0 +1,42 @@ +process GATK4_INTERVALLISTTOBED { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(intervals) + + output: + tuple val(meta), path("*.bed"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK IntervalListToBed] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" IntervalListToBed \\ + --INPUT $intervals \\ + --OUTPUT ${prefix}.bed \\ + --TMP_DIR . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/intervallisttobed/meta.yml b/modules/gatk4/intervallisttobed/meta.yml new file mode 100644 index 00000000..90b78c05 --- /dev/null +++ b/modules/gatk4/intervallisttobed/meta.yml @@ -0,0 +1,41 @@ +name: gatk4_intervallisttobed +keywords: + - interval + - bed +tools: + - gatk4: + description: Genome Analysis Toolkit (GATK4) + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + tool_dev_url: https://github.com/broadinstitute/gatk + doi: "10.1158/1538-7445.AM2017-3590" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - interval: + type: file + description: Interval list + pattern: "*.{interval,interval_list}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: BED file + pattern: "*.bed" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@FriederikeHanssen" diff --git a/modules/gatk4/intervallisttools/main.nf b/modules/gatk4/intervallisttools/main.nf index 40c7fb19..7ab26c15 100644 --- a/modules/gatk4/intervallisttools/main.nf +++ b/modules/gatk4/intervallisttools/main.nf @@ -2,17 +2,17 @@ process GATK4_INTERVALLISTTOOLS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(interval_list) + tuple val(meta), path(intervals) output: tuple val(meta), path("*_split/*/*.interval_list"), emit: interval_list - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,6 +20,7 @@ process GATK4_INTERVALLISTTOOLS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK IntervalListTools] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -30,10 +31,10 @@ process GATK4_INTERVALLISTTOOLS { mkdir ${prefix}_split - gatk --java-options "-Xmx${avail_mem}g" \\ - IntervalListTools \\ - -I ${interval_list} \\ - -O ${prefix}_split \\ + gatk --java-options "-Xmx${avail_mem}g" IntervalListTools \\ + --INPUT $intervals \\ + --OUTPUT ${prefix}_split \\ + --TMP_DIR . \\ $args python3 <&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir -p ${prefix}_split/temp_0001_of_6 + mkdir -p ${prefix}_split/temp_0002_of_6 + mkdir -p ${prefix}_split/temp_0003_of_6 + mkdir -p ${prefix}_split/temp_0004_of_6 + touch ${prefix}_split/temp_0001_of_6/1scattered.interval_list + touch ${prefix}_split/temp_0002_of_6/2scattered.interval_list + touch ${prefix}_split/temp_0003_of_6/3scattered.interval_list + touch ${prefix}_split/temp_0004_of_6/4scattered.interval_list + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/intervallisttools/meta.yml b/modules/gatk4/intervallisttools/meta.yml index 9e2d994f..804645f3 100644 --- a/modules/gatk4/intervallisttools/meta.yml +++ b/modules/gatk4/intervallisttools/meta.yml @@ -14,7 +14,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/gatk4/learnreadorientationmodel/main.nf b/modules/gatk4/learnreadorientationmodel/main.nf index 7d96c27e..8c4ac94e 100644 --- a/modules/gatk4/learnreadorientationmodel/main.nf +++ b/modules/gatk4/learnreadorientationmodel/main.nf @@ -2,10 +2,10 @@ process GATK4_LEARNREADORIENTATIONMODEL { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(f1r2) @@ -20,8 +20,8 @@ process GATK4_LEARNREADORIENTATIONMODEL { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def inputs_list = [] - f1r2.each() { a -> inputs_list.add(" -I " + a) } + def input_list = f1r2.collect{"--input $it"}.join(' ') + def avail_mem = 3 if (!task.memory) { log.info '[GATK LearnReadOrientationModel] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -29,10 +29,10 @@ process GATK4_LEARNREADORIENTATIONMODEL { avail_mem = task.memory.giga } """ - gatk --java-options "-Xmx${avail_mem}g" \\ - LearnReadOrientationModel \\ - ${inputs_list.join(' ')} \\ - -O ${prefix}.tar.gz \\ + gatk --java-options "-Xmx${avail_mem}g" LearnReadOrientationModel \\ + $input_list \\ + --output ${prefix}.tar.gz \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/learnreadorientationmodel/meta.yml b/modules/gatk4/learnreadorientationmodel/meta.yml index 4eff6939..b2dd9612 100644 --- a/modules/gatk4/learnreadorientationmodel/meta.yml +++ b/modules/gatk4/learnreadorientationmodel/meta.yml @@ -15,7 +15,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index 735b093e..97a8c3e1 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -2,17 +2,17 @@ process GATK4_MARKDUPLICATES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(bams) + tuple val(meta), path(bam) output: tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bai") , emit: bai + tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.metrics"), emit: metrics path "versions.yml" , emit: versions @@ -22,7 +22,8 @@ process GATK4_MARKDUPLICATES { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def bam_list = bams.collect(){ bam -> "--INPUT ".concat(bam.toString()) }.join(" ") + def input_list = bam.collect{"--INPUT $it"}.join(' ') + def avail_mem = 3 if (!task.memory) { log.info '[GATK MarkDuplicates] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -31,11 +32,10 @@ process GATK4_MARKDUPLICATES { } """ gatk --java-options "-Xmx${avail_mem}g" MarkDuplicates \\ - $bam_list \\ + $input_list \\ + --OUTPUT ${prefix}.bam \\ --METRICS_FILE ${prefix}.metrics \\ --TMP_DIR . \\ - --CREATE_INDEX true \\ - --OUTPUT ${prefix}.bam \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/markduplicates/meta.yml b/modules/gatk4/markduplicates/meta.yml index 5777067a..93877f47 100644 --- a/modules/gatk4/markduplicates/meta.yml +++ b/modules/gatk4/markduplicates/meta.yml @@ -6,14 +6,15 @@ keywords: - sort tools: - gatk4: - description: Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + description: + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard- tool_dev_url: https://github.com/broadinstitute/gatk doi: 10.1158/1538-7445.AM2017-3590 - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -48,3 +49,4 @@ output: authors: - "@ajodeh-juma" - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/markduplicatesspark/main.nf b/modules/gatk4/markduplicatesspark/main.nf new file mode 100644 index 00000000..77e135db --- /dev/null +++ b/modules/gatk4/markduplicatesspark/main.nf @@ -0,0 +1,50 @@ +process GATK4_MARKDUPLICATES_SPARK { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' : + 'broadinstitute/gatk:4.2.3.0' }" + + input: + tuple val(meta), path(bam) + path fasta + path fasta_fai + path dict + + output: + tuple val(meta), path("${prefix}"), emit: output + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"--input $it"}.join(' ') + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK MarkDuplicatesSpark] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + export SPARK_USER=spark3 + + gatk --java-options "-Xmx${avail_mem}g" MarkDuplicatesSpark \\ + $input_list \\ + --output $prefix \\ + --reference $fasta \\ + --spark-master local[${task.cpus}] \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/markduplicatesspark/meta.yml b/modules/gatk4/markduplicatesspark/meta.yml new file mode 100644 index 00000000..bf3e02ba --- /dev/null +++ b/modules/gatk4/markduplicatesspark/meta.yml @@ -0,0 +1,60 @@ +name: gatk4_markduplicates_spark +description: This tool locates and tags duplicate reads in a BAM or SAM file, where duplicate reads are defined as originating from a single fragment of DNA. +keywords: + - markduplicates + - bam + - sort +tools: + - gatk4: + description: + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard- + tool_dev_url: https://github.com/broadinstitute/gatk + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Sorted BAM file + pattern: "*.{bam}" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" + +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" + - bam: + type: file + description: Marked duplicates BAM file + pattern: "*.{bam}" + +authors: + - "@ajodeh-juma" + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index e636e1cd..ff51de06 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -2,10 +2,10 @@ process GATK4_MERGEBAMALIGNMENT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(aligned), path(unmapped) @@ -22,6 +22,7 @@ process GATK4_MERGEBAMALIGNMENT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK MergeBamAlignment] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -30,10 +31,11 @@ process GATK4_MERGEBAMALIGNMENT { } """ gatk --java-options "-Xmx${avail_mem}g" MergeBamAlignment \\ - -ALIGNED $aligned \\ - -UNMAPPED $unmapped \\ - -R $fasta \\ - -O ${prefix}.bam \\ + --UNMAPPED_BAM $unmapped \\ + --ALIGNED_BAM $aligned \\ + --OUTPUT ${prefix}.bam \\ + --REFERENCE_SEQUENCE $fasta \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml @@ -41,4 +43,15 @@ process GATK4_MERGEBAMALIGNMENT { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/mergebamalignment/meta.yml b/modules/gatk4/mergebamalignment/meta.yml index c66c78db..b4bff490 100644 --- a/modules/gatk4/mergebamalignment/meta.yml +++ b/modules/gatk4/mergebamalignment/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/mergemutectstats/main.nf b/modules/gatk4/mergemutectstats/main.nf new file mode 100644 index 00000000..54311df7 --- /dev/null +++ b/modules/gatk4/mergemutectstats/main.nf @@ -0,0 +1,43 @@ +process GATK4_MERGEMUTECTSTATS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(stats) + + output: + tuple val(meta), path("*.vcf.gz.stats"), emit: stats + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def input_list = stats.collect{ "--stats ${it}"}.join(' ') + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK MergeMutectStats] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + gatk --java-options "-Xmx${avail_mem}g" MergeMutectStats \\ + $input_list \\ + --output ${prefix}.vcf.gz.stats \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/mergemutectstats/meta.yml b/modules/gatk4/mergemutectstats/meta.yml new file mode 100644 index 00000000..c9950e14 --- /dev/null +++ b/modules/gatk4/mergemutectstats/meta.yml @@ -0,0 +1,42 @@ +name: gatk4_mergemutectstats +description: Merges mutect2 stats generated on different intervals/regions +keywords: + - mutectstats + - merge +tools: + - gatk4: + description: Genome Analysis Toolkit (GATK4) + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + tool_dev_url: https://github.com/broadinstitute/gatk + doi: "10.1158/1538-7445.AM2017-3590" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - stats: + type: (list of) file(s) + description: Stats file + pattern: "*.{stats}" + +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" + - stats: + type: file + description: Stats file + pattern: "*.vcf.gz.stats" + +authors: + - "@FriederikeHanssen" diff --git a/modules/gatk4/mergevcfs/main.nf b/modules/gatk4/mergevcfs/main.nf index 3e9973e7..964c1a3b 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -2,15 +2,14 @@ process GATK4_MERGEVCFS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcfs) - path ref_dict - val use_ref_dict + tuple val(meta), path(vcf) + path dict output: tuple val(meta), path('*.vcf.gz'), emit: vcf @@ -22,13 +21,9 @@ process GATK4_MERGEVCFS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = vcf.collect{ "--INPUT $it"}.join(' ') + def reference_command = dict ? "--SEQUENCE_DICTIONARY $dict" : "" - // Make list of VCFs to merge - def input = "" - for (vcf in vcfs) { - input += " I=${vcf}" - } - def ref = use_ref_dict ? "D=${ref_dict}" : "" def avail_mem = 3 if (!task.memory) { log.info '[GATK MergeVcfs] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -37,9 +32,10 @@ process GATK4_MERGEVCFS { } """ gatk --java-options "-Xmx${avail_mem}g" MergeVcfs \\ - $input \\ - O=${prefix}.vcf.gz \\ - $ref \\ + $input_list \\ + --OUTPUT ${prefix}.vcf.gz \\ + $reference_command \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/mergevcfs/meta.yml b/modules/gatk4/mergevcfs/meta.yml index 597f9ec6..8d4123d9 100644 --- a/modules/gatk4/mergevcfs/meta.yml +++ b/modules/gatk4/mergevcfs/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 1c8c3993..abec0d73 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -2,17 +2,13 @@ process GATK4_MUTECT2 { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta) , path(input) , path(input_index) , val(which_norm) - val run_single - val run_pon - val run_mito - val interval_label + tuple val(meta), path(input), path(input_index), path(intervals) path fasta path fai path dict @@ -34,27 +30,10 @@ process GATK4_MUTECT2 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def panels_command = '' - def normals_command = '' - - def inputs_command = '-I ' + input.join( ' -I ') - - if(run_pon) { - panels_command = '' - normals_command = '' - - } else if(run_single) { - panels_command = " --germline-resource $germline_resource --panel-of-normals $panel_of_normals" - normals_command = '' - - } else if(run_mito){ - panels_command = "-L ${interval_label} --mitochondria-mode" - normals_command = '' - - } else { - panels_command = " --germline-resource $germline_resource --panel-of-normals $panel_of_normals --f1r2-tar-gz ${prefix}.f1r2.tar.gz" - normals_command = '-normal ' + which_norm.join( ' -normal ') - } + def inputs = input.collect{ "--input $it"}.join(" ") + def interval_command = intervals ? "--intervals $intervals" : "" + def pon_command = panel_of_normals ? "--panel-of-normals $panel_of_normals" : "" + def gr_command = germline_resource ? "--germline-resource $germline_resource" : "" def avail_mem = 3 if (!task.memory) { @@ -64,11 +43,13 @@ process GATK4_MUTECT2 { } """ gatk --java-options "-Xmx${avail_mem}g" Mutect2 \\ - -R ${fasta} \\ - ${inputs_command} \\ - ${normals_command} \\ - ${panels_command} \\ - -O ${prefix}.vcf.gz \\ + $inputs \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + $pon_command \\ + $gr_command \\ + $interval_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml @@ -76,4 +57,18 @@ process GATK4_MUTECT2 { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.vcf.gz.stats + touch ${prefix}.f1r2.tar.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/mutect2/meta.yml b/modules/gatk4/mutect2/meta.yml index 83f6cb7c..aa0a02aa 100644 --- a/modules/gatk4/mutect2/meta.yml +++ b/modules/gatk4/mutect2/meta.yml @@ -1,5 +1,5 @@ name: gatk4_mutect2 -description: Call somatic SNVs and indels via local assembly of haplotypes. +description: Call somatic SNVs and indels via local assembly of haplotypes. keywords: - gatk4 - mutect2 @@ -14,7 +14,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: @@ -30,26 +30,10 @@ input: type: list description: list of BAM file indexes, also able to take CRAM indexes as an input pattern: "*.{bam.bai/cram.crai}" - - which_norm: - type: list - description: optional list of sample headers contained in the normal sample bam files (these are required for tumor_normal_pair mode) - pattern: "testN" - - run_single: - type: boolean - description: Specify whether or not to run in tumor_single mode instead of tumor_normal_pair mode (will be ignored if run_pon is also true) - pattern: "true/false" - - run_pon: - type: boolean - description: Specify whether or not to run in panel_of_normal mode instead of tumor_normal_pair mode - pattern: "true/false" - - run_mito: - type: boolean - description: Specify whether or not to run in mitochondria-mode instead of tumor_normal_pair mode - pattern: "true/false" - - interval_label: - type: string - description: Specify the label used for mitochondrial chromosome when mutect2 is run in mitochondria mode. - pattern: "chrM" + - intervals: + type: File/string + description: Specify region the tools is run on. + pattern: ".{bed,interval_list}/chrM" - fasta: type: file description: The reference fasta file diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 23f99ab4..959c3e79 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -2,10 +2,10 @@ process GATK4_REVERTSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -20,6 +20,7 @@ process GATK4_REVERTSAM { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK RevertSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -28,8 +29,9 @@ process GATK4_REVERTSAM { } """ gatk --java-options "-Xmx${avail_mem}g" RevertSam \\ - I=$bam \\ - O=${prefix}.reverted.bam \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.reverted.bam \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml @@ -37,4 +39,15 @@ process GATK4_REVERTSAM { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.reverted.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/revertsam/meta.yml b/modules/gatk4/revertsam/meta.yml index b52dcb36..6cc97d86 100644 --- a/modules/gatk4/revertsam/meta.yml +++ b/modules/gatk4/revertsam/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 2da40b6c..de83293a 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -2,10 +2,10 @@ process GATK4_SAMTOFASTQ { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -20,7 +20,8 @@ process GATK4_SAMTOFASTQ { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def output = meta.single_end ? "FASTQ=${prefix}.fastq.gz" : "FASTQ=${prefix}_1.fastq.gz SECOND_END_FASTQ=${prefix}_2.fastq.gz" + def output = meta.single_end ? "--FASTQ ${prefix}.fastq.gz" : "--FASTQ ${prefix}_1.fastq.gz --SECOND_END_FASTQ ${prefix}_2.fastq.gz" + def avail_mem = 3 if (!task.memory) { log.info '[GATK SamToFastq] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -29,8 +30,9 @@ process GATK4_SAMTOFASTQ { } """ gatk --java-options "-Xmx${avail_mem}g" SamToFastq \\ - I=$bam \\ + --INPUT $bam \\ $output \\ + --TMP_DIR . \\ $args cat <<-END_VERSIONS > versions.yml @@ -38,4 +40,17 @@ process GATK4_SAMTOFASTQ { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fastq.gz + touch ${prefix}_1.fastq.gz + touch ${prefix}_2.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/samtofastq/meta.yml b/modules/gatk4/samtofastq/meta.yml index de4624b5..60ca6aee 100644 --- a/modules/gatk4/samtofastq/meta.yml +++ b/modules/gatk4/samtofastq/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/selectvariants/main.nf b/modules/gatk4/selectvariants/main.nf new file mode 100644 index 00000000..633c21f2 --- /dev/null +++ b/modules/gatk4/selectvariants/main.nf @@ -0,0 +1,43 @@ +process GATK4_SELECTVARIANTS { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(vcf), path(vcf_idx) + + output: + tuple val(meta), path("*.selectvariants.vcf.gz") , emit: vcf + tuple val(meta), path("*.selectvariants.vcf.gz.tbi") , emit: tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK VariantFiltration] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.toGiga() + } + """ + gatk --java-options "-Xmx${avail_mem}G" SelectVariants \\ + --variant $vcf \\ + --output ${prefix}.selectvariants.vcf.gz \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/selectvariants/meta.yml b/modules/gatk4/selectvariants/meta.yml new file mode 100644 index 00000000..381af249 --- /dev/null +++ b/modules/gatk4/selectvariants/meta.yml @@ -0,0 +1,55 @@ +name: gatk4_selectvariants +description: Select a subset of variants from a VCF file +keywords: + - gatk + - gatk4 + - selectvariants + - vcf +tools: + - gatk4: + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360036362532-SelectVariants + tool_dev_url: https://github.com/broadinstitute/gatk + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - vcf: + type: list + description: VCF(.gz) file + pattern: "*.{vcf,vcf.gz}" + - vcf_idx: + type: list + description: VCF file index + pattern: "*.{idx,tbi}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.selectvariants.vcf.gz" + - vcf_tbi: + type: list + description: VCF file index + pattern: "*.{idx,tbi}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@mjcipriano" diff --git a/modules/gatk4/splitintervals/main.nf b/modules/gatk4/splitintervals/main.nf new file mode 100644 index 00000000..9df66c21 --- /dev/null +++ b/modules/gatk4/splitintervals/main.nf @@ -0,0 +1,48 @@ +process GATK4_SPLITINTERVALS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(intervals) + path(fasta) + path(fasta_fai) + path(dict) + + output: + tuple val(meta), path("**.interval_list"), emit: split_intervals + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--reference $fasta" : "" + + def avail_mem = 3 + if (!task.memory) { + log.info '[GATK SplitIntervals] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + + """ + gatk --java-options "-Xmx${avail_mem}g" SplitIntervals \\ + --output ${prefix} \\ + --intervals $intervals \\ + $reference \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/gatk4/splitintervals/meta.yml b/modules/gatk4/splitintervals/meta.yml new file mode 100644 index 00000000..ba557544 --- /dev/null +++ b/modules/gatk4/splitintervals/meta.yml @@ -0,0 +1,53 @@ +name: gatk4_splitintervals +keywords: + - interval + - bed +tools: + - gatk4: + description: Genome Analysis Toolkit (GATK4) + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + tool_dev_url: https://github.com/broadinstitute/gatk + doi: "10.1158/1538-7445.AM2017-3590" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - interval: + type: file + description: Interval list or BED + pattern: "*.{interval,interval_list,bed}" + - fasta: + type: file + description: Reference FASTA + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: Reference FASTA index + pattern: "*.fai" + - dict: + type: file + description: Reference sequence dictionary + pattern: "*.dict" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bed: + type: file + description: A list of scattered interval lists + pattern: "*.interval_list" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index 6d0a35fd..456ec055 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -2,13 +2,13 @@ process GATK4_SPLITNCIGARREADS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai), path(intervals) path fasta path fai path dict @@ -23,6 +23,8 @@ process GATK4_SPLITNCIGARREADS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? "--intervals $intervals" : "" + def avail_mem = 3 if (!task.memory) { log.info '[GATK SplitNCigarReads] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -31,9 +33,11 @@ process GATK4_SPLITNCIGARREADS { } """ gatk --java-options "-Xmx${avail_mem}g" SplitNCigarReads \\ - -R $fasta \\ - -I $bam \\ - -O ${prefix}.bam \\ + --input $bam \\ + --output ${prefix}.bam \\ + --reference $fasta \\ + $interval_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/splitncigarreads/meta.yml b/modules/gatk4/splitncigarreads/meta.yml index fd6edda0..76bfdcd3 100644 --- a/modules/gatk4/splitncigarreads/meta.yml +++ b/modules/gatk4/splitncigarreads/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map @@ -23,6 +23,13 @@ input: type: list description: BAM/SAM/CRAM file containing reads pattern: "*.{bam,sam,cram}" + - bai: + type: list + description: BAI/SAI/CRAI index file (optional) + pattern: "*.{bai,sai,crai}" + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) - fasta: type: file description: The reference fasta file diff --git a/modules/gatk4/variantfiltration/main.nf b/modules/gatk4/variantfiltration/main.nf index 3a41d20c..cda06e11 100644 --- a/modules/gatk4/variantfiltration/main.nf +++ b/modules/gatk4/variantfiltration/main.nf @@ -2,13 +2,13 @@ process GATK4_VARIANTFILTRATION { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcf), path(vcf_tbi) + tuple val(meta), path(vcf), path(tbi) path fasta path fai path dict @@ -24,6 +24,7 @@ process GATK4_VARIANTFILTRATION { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 if (!task.memory) { log.info '[GATK VariantFiltration] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -32,9 +33,10 @@ process GATK4_VARIANTFILTRATION { } """ gatk --java-options "-Xmx${avail_mem}G" VariantFiltration \\ - -R $fasta \\ - -V $vcf \\ - -O ${prefix}.vcf.gz \\ + --variant $vcf \\ + --output ${prefix}.vcf.gz \\ + --reference $fasta \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/variantfiltration/meta.yml b/modules/gatk4/variantfiltration/meta.yml index 71f0b8b2..04b1c086 100644 --- a/modules/gatk4/variantfiltration/meta.yml +++ b/modules/gatk4/variantfiltration/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: type: map diff --git a/modules/gatk4/variantrecalibrator/main.nf b/modules/gatk4/variantrecalibrator/main.nf index df8a9599..120aeade 100644 --- a/modules/gatk4/variantrecalibrator/main.nf +++ b/modules/gatk4/variantrecalibrator/main.nf @@ -2,21 +2,17 @@ process GATK4_VARIANTRECALIBRATOR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }" input: - tuple val(meta), path(vcf) , path(tbi) - path fasta - path fai - path dict - val allelespecific - tuple path(resvcfs), path(restbis), val(reslabels) - val annotation - val mode - val create_rscript + tuple val(meta), path(vcf), path(tbi) + tuple path(vcfs), path(tbis), val(labels) + path fasta + path fai + path dict output: tuple val(meta), path("*.recal") , emit: recal @@ -31,12 +27,8 @@ process GATK4_VARIANTRECALIBRATOR { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - refCommand = fasta ? "-R ${fasta} " : '' - alleleSpecificCommand = allelespecific ? '-AS' : '' - resourceCommand = '--resource:' + reslabels.join( ' --resource:') - annotationCommand = '-an ' + annotation.join( ' -an ') - modeCommand = mode ? "--mode ${mode} " : 'SNP' - rscriptCommand = create_rscript ? "--rscript-file ${prefix}.plots.R" : '' + def reference_command = fasta ? "--reference $fasta " : '' + def resource_command = labels.collect{"--resource:$it"}.join(' ') def avail_mem = 3 if (!task.memory) { @@ -46,15 +38,12 @@ process GATK4_VARIANTRECALIBRATOR { } """ gatk --java-options "-Xmx${avail_mem}g" VariantRecalibrator \\ - ${refCommand} \\ - -V ${vcf} \\ - ${alleleSpecificCommand} \\ - ${resourceCommand} \\ - ${annotationCommand} \\ - ${modeCommand} \\ - -O ${prefix}.recal \\ + --variant $vcf \\ + --output ${prefix}.recal \\ --tranches-file ${prefix}.tranches \\ - ${rscriptCommand}\\ + $reference_command \\ + $resource_command \\ + --tmp-dir . \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/variantrecalibrator/meta.yml b/modules/gatk4/variantrecalibrator/meta.yml index 92416a58..afe33d7a 100644 --- a/modules/gatk4/variantrecalibrator/meta.yml +++ b/modules/gatk4/variantrecalibrator/meta.yml @@ -52,11 +52,11 @@ input: - resvcfs: type: list description: resource files to be used as truth, training and known sites resources, this imports the files into the module, file names are specified again in the resource_labels to be called via the command. - pattern: '*/hapmap_3.3.hg38_chr21.vcf.gz' + pattern: "*/hapmap_3.3.hg38_chr21.vcf.gz" - restbis: type: list description: tbis for the corresponding vcfs files to be used as truth, training and known resources. - pattern: '*/hapmap_3.3.hg38_chr21.vcf.gz.tbi' + pattern: "*/hapmap_3.3.hg38_chr21.vcf.gz.tbi" - reslabels: type: list description: labels for the resource files to be used as truth, training and known sites resources, label should include an identifier,which kind of resource(s) it is, prior value and name of the file. diff --git a/modules/genmap/index/meta.yml b/modules/genmap/index/meta.yml index 2ab0910d..73563c1d 100644 --- a/modules/genmap/index/meta.yml +++ b/modules/genmap/index/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://github.com/cpockrandt/genmap tool_dev_url: https://github.com/cpockrandt/genmap doi: "10.1093/bioinformatics/btaa222" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - fasta: diff --git a/modules/genmap/mappability/meta.yml b/modules/genmap/mappability/meta.yml index d2835d92..5469cef5 100644 --- a/modules/genmap/mappability/meta.yml +++ b/modules/genmap/mappability/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://github.com/cpockrandt/genmap tool_dev_url: https://github.com/cpockrandt/genmap doi: "10.1093/bioinformatics/btaa222" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - fasta: diff --git a/modules/genomescope2/main.nf b/modules/genomescope2/main.nf new file mode 100644 index 00000000..2ddf9e43 --- /dev/null +++ b/modules/genomescope2/main.nf @@ -0,0 +1,40 @@ +process GENOMESCOPE2 { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::genomescope2=2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/genomescope2:2.0--py310r41hdfd78af_5': + 'quay.io/biocontainers/genomescope2:2.0--py310r41hdfd78af_5' }" + + input: + tuple val(meta), path(histogram) + + output: + tuple val(meta), path("*_linear_plot.png") , emit: linear_plot_png + tuple val(meta), path("*_transformed_linear_plot.png"), emit: transformed_linear_plot_png + tuple val(meta), path("*_log_plot.png") , emit: log_plot_png + tuple val(meta), path("*_transformed_log_plot.png") , emit: transformed_log_plot_png + tuple val(meta), path("*_model.txt") , emit: model + tuple val(meta), path("*_summary.txt") , emit: summary + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + genomescope2 \\ + --input $histogram \\ + $args \\ + --output . \\ + --name_prefix $prefix + + cat <<-END_VERSIONS > versions.yml + '${task.process}': + genomescope2: \$( genomescope2 -v | sed 's/GenomeScope //' ) + END_VERSIONS + """ +} diff --git a/modules/genomescope2/meta.yml b/modules/genomescope2/meta.yml new file mode 100644 index 00000000..505daafe --- /dev/null +++ b/modules/genomescope2/meta.yml @@ -0,0 +1,67 @@ +name: "genomescope2" +description: Estimate genome heterozygosity, repeat content, and size from sequencing reads using a kmer-based statistical approach +keywords: + - "genome size" + - "genome heterozygosity" + - "repeat content" +tools: + - "genomescope2": + description: "Reference-free profiling of polyploid genomes" + homepage: "http://qb.cshl.edu/genomescope/genomescope2.0/" + documentation: "https://github.com/tbenavi1/genomescope2.0/blob/master/README.md" + tool_dev_url: "https://github.com/tbenavi1/genomescope2.0" + doi: "https://doi.org/10.1038/s41467-020-14998-3" + licence: "['Apache License, Version 2.0 (Apache-2.0)']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - histogram: + type: file + description: A K-mer histogram file + pattern: "*.hist" + +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" + - linear_plot_png: + type: file + description: A genomescope2 linear plot in PNG format + pattern: "*_linear_plot.png" + - linear_plot_png: + type: file + description: A genomescope2 linear plot in PNG format + pattern: "*_linear_plot.png" + - transformed_linear_plot_png: + type: file + description: A genomescope2 transformed linear plot in PNG format + pattern: "*_transformed_linear_plot.png" + - log_plot_png: + type: file + description: A genomescope2 log plot in PNG format + pattern: "*_log_plot.png" + - transformed_log_plot_png: + type: file + description: A genomescope2 transformed log plot in PNG format + pattern: "*_transformed_log_plot.png" + - model: + type: file + description: Genomescope2 model fit summary + pattern: "*_model.txt" + - summary: + type: file + description: Genomescope2 histogram summary + pattern: "*_summary.txt" + +authors: + - "@mahesh-panchal" diff --git a/modules/genrich/meta.yml b/modules/genrich/meta.yml index 37184190..343c25d7 100644 --- a/modules/genrich/meta.yml +++ b/modules/genrich/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://github.com/jsh58/Genrich#readme tool_dev_url: https://github.com/jsh58/Genrich doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map @@ -77,4 +77,3 @@ output: pattern: "*.{version.txt}" authors: - "@JoseEspinosa" - diff --git a/modules/gffread/meta.yml b/modules/gffread/meta.yml index bf1a15cb..20335747 100644 --- a/modules/gffread/meta.yml +++ b/modules/gffread/meta.yml @@ -11,13 +11,13 @@ tools: documentation: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread tool_dev_url: https://github.com/gpertea/gffread doi: 10.12688/f1000research.23297.1 - licence: ['MIT'] + licence: ["MIT"] input: - gff: - type: file - description: A reference file in either the GFF3, GFF2 or GTF format. - pattern: "*.{gff, gtf}" + type: file + description: A reference file in either the GFF3, GFF2 or GTF format. + pattern: "*.{gff, gtf}" output: - gtf: diff --git a/modules/glnexus/main.nf b/modules/glnexus/main.nf index 84da95a0..a26ab4ce 100644 --- a/modules/glnexus/main.nf +++ b/modules/glnexus/main.nf @@ -42,4 +42,15 @@ process GLNEXUS { glnexus: \$( echo \$(glnexus_cli 2>&1) | head -n 1 | sed 's/^.*release v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + glnexus: \$( echo \$(glnexus_cli 2>&1) | head -n 1 | sed 's/^.*release v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/glnexus/meta.yml b/modules/glnexus/meta.yml index 5ba17cae..0fc19452 100644 --- a/modules/glnexus/meta.yml +++ b/modules/glnexus/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/dnanexus-rnd/GLnexus/wiki/Getting-Started tool_dev_url: None doi: https://doi.org/10.1101/343970 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/graphmap2/align/meta.yml b/modules/graphmap2/align/meta.yml index 9fb1507a..d498069b 100644 --- a/modules/graphmap2/align/meta.yml +++ b/modules/graphmap2/align/meta.yml @@ -1,51 +1,51 @@ name: graphmap2_align description: A versatile pairwise aligner for genomic and spliced nucleotide sequences keywords: - - align - - fasta - - fastq - - genome - - reference + - align + - fasta + - fastq + - genome + - reference tools: - - graphmap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lbcb-sci/graphmap2 - documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ['MIT'] + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fastq: - type: file - description: | - List of input FASTQ files - and paired-end data, respectively. - - fasta: - type: file - description: | - Reference database in FASTA format. - - index: - type: file - description: | - FASTA index in gmidx. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: | + List of input FASTQ files + and paired-end data, respectively. + - fasta: + type: file + description: | + Reference database in FASTA format. + - index: + type: file + description: | + FASTA index in gmidx. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - sam: - type: file - description: Alignment in SAM format - pattern: "*.sam" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sam: + type: file + description: Alignment in SAM format + pattern: "*.sam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" - - "@drpatelh" + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/graphmap2/index/meta.yml b/modules/graphmap2/index/meta.yml index 92a0a3d7..8e9d2c1c 100644 --- a/modules/graphmap2/index/meta.yml +++ b/modules/graphmap2/index/meta.yml @@ -1,30 +1,30 @@ name: graphmap2_index description: A versatile pairwise aligner for genomic and spliced nucleotide sequences keywords: - - index - - fasta - - reference + - index + - fasta + - reference tools: - - graphmap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lbcb-sci/graphmap2 - documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ['MIT'] + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] input: - - fasta: - type: file - description: | - Reference database in FASTA format. + - fasta: + type: file + description: | + Reference database in FASTA format. output: - - gmidx: - type: file - description: Graphmap2 fasta index in gmidx format - pattern: "*.gmidx" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - gmidx: + type: file + description: Graphmap2 fasta index in gmidx format + pattern: "*.gmidx" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" - - "@drpatelh" + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/gstama/merge/meta.yml b/modules/gstama/merge/meta.yml index 1351b864..2f91a56d 100644 --- a/modules/gstama/merge/meta.yml +++ b/modules/gstama/merge/meta.yml @@ -16,7 +16,7 @@ tools: documentation: https://github.com/GenomeRIK/tama/wiki tool_dev_url: https://github.com/sguizard/gs-tama doi: "https://doi.org/10.1186/s12864-020-07123-7" - licence: ['GPL v3 License'] + licence: ["GPL v3 License"] input: - meta: diff --git a/modules/gstama/polyacleanup/main.nf b/modules/gstama/polyacleanup/main.nf new file mode 100644 index 00000000..214e5f93 --- /dev/null +++ b/modules/gstama/polyacleanup/main.nf @@ -0,0 +1,40 @@ +process GSTAMA_POLYACLEANUP { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gs-tama=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gs-tama:1.0.3--hdfd78af_0': + 'quay.io/biocontainers/gs-tama:1.0.3--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*_tama.fa.gz") , emit: fasta + tuple val(meta), path("*_tama_polya_flnc_report.txt.gz"), emit: report + tuple val(meta), path("*_tama_tails.fa.gz") , emit: tails + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if( "$fasta" == "${prefix}.fasta" | "$fasta" == "${prefix}.fa" ) error "Input and output names are the same, set prefix in module configuration" + """ + tama_flnc_polya_cleanup.py \\ + -f $fasta \\ + -p ${prefix} \\ + $args + gzip ${prefix}.fa + gzip ${prefix}_polya_flnc_report.txt + gzip ${prefix}_tails.fa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gstama: \$( tama_collapse.py -version | grep 'tc_version_date_'|sed 's/tc_version_date_//g' ) + END_VERSIONS + """ +} diff --git a/modules/gstama/polyacleanup/meta.yml b/modules/gstama/polyacleanup/meta.yml new file mode 100644 index 00000000..c7047d15 --- /dev/null +++ b/modules/gstama/polyacleanup/meta.yml @@ -0,0 +1,55 @@ +name: gstama_polyacleanup +description: Helper script, remove remaining polyA sequences from Full Length Non Chimeric reads (Pacbio isoseq3) +keywords: + - gstama + - gstama/polyacleanup + - long-read + - isoseq + - tama + - trancriptome + - annotation +tools: + - gstama: + description: Gene-Switch Transcriptome Annotation by Modular Algorithms + homepage: https://github.com/sguizard/gs-tama + documentation: https://github.com/GenomeRIK/tama/wiki + tool_dev_url: https://github.com/sguizard/gs-tama + doi: "https://doi.org/10.1186/s12864-020-07123-7" + licence: ["GPL v3 License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Full Length Non Chimeric reads in fasta format + pattern: "*.{fa,fasta}" + +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" + - fasta: + type: file + description: The Full Length Non Chimeric reads clened from remaining polyA tails. The sequences are in FASTA format compressed with gzip. + pattern: "*_tama.fa.gz" + - report: + type: file + description: A text file describing the number of polyA tails removed and their length. Compressed with gzip. + pattern: "*_tama_polya_flnc_report.txt.gz" + - tails: + type: file + description: A gzip compressed FASTA file of trimmed polyA tails. + pattern: "*_tama_tails.fa.gz" + +authors: + - "@sguizard" diff --git a/modules/gtdbtk/classifywf/meta.yml b/modules/gtdbtk/classifywf/meta.yml index d70de362..86301035 100644 --- a/modules/gtdbtk/classifywf/meta.yml +++ b/modules/gtdbtk/classifywf/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://ecogenomics.github.io/GTDBTk/ tool_dev_url: https://github.com/Ecogenomics/GTDBTk doi: "10.1093/bioinformatics/btz848" - licence: ['GNU General Public v3 (GPL v3)'] + licence: ["GNU General Public v3 (GPL v3)"] input: - meta: diff --git a/modules/gubbins/meta.yml b/modules/gubbins/meta.yml index f73e2bb0..785366ad 100644 --- a/modules/gubbins/meta.yml +++ b/modules/gubbins/meta.yml @@ -1,8 +1,9 @@ name: gubbins -description: Gubbins (Genealogies Unbiased By recomBinations In Nucleotide Sequences) is an algorithm that iteratively identifies - loci containing elevated densities of base substitutions while concurrently constructing a phylogeny based on the - putative point mutations outside of these regions. -licence: ['GPL-2.0-only'] +description: + Gubbins (Genealogies Unbiased By recomBinations In Nucleotide Sequences) is an algorithm that iteratively identifies + loci containing elevated densities of base substitutions while concurrently constructing a phylogeny based on the + putative point mutations outside of these regions. +licence: ["GPL-2.0-only"] keywords: - recombination - alignment @@ -59,4 +60,3 @@ output: pattern: "*.{node_labelled.final_tree.tre}" authors: - "@avantonder" - diff --git a/modules/gunc/downloaddb/meta.yml b/modules/gunc/downloaddb/meta.yml index cb486da0..c36ff3f3 100644 --- a/modules/gunc/downloaddb/meta.yml +++ b/modules/gunc/downloaddb/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://grp-bork.embl-community.io/gunc/ tool_dev_url: https://github.com/grp-bork/gunc doi: "10.1186/s13059-021-02393-0" - licence: ['GNU General Public v3 or later (GPL v3+)'] + licence: ["GNU General Public v3 or later (GPL v3+)"] input: - db_name: diff --git a/modules/gunc/run/meta.yml b/modules/gunc/run/meta.yml index 1dd4a8ae..3a85e1fb 100644 --- a/modules/gunc/run/meta.yml +++ b/modules/gunc/run/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://grp-bork.embl-community.io/gunc/ tool_dev_url: https://github.com/grp-bork/gunc doi: "10.1186/s13059-021-02393-0" - licence: ['GNU General Public v3 or later (GPL v3+)'] + licence: ["GNU General Public v3 or later (GPL v3+)"] input: - meta: diff --git a/modules/gunzip/main.nf b/modules/gunzip/main.nf index 9d4b0666..61bf1afa 100644 --- a/modules/gunzip/main.nf +++ b/modules/gunzip/main.nf @@ -4,8 +4,8 @@ process GUNZIP { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/gunzip/meta.yml b/modules/gunzip/meta.yml index ea1f1546..4d2ebc84 100644 --- a/modules/gunzip/meta.yml +++ b/modules/gunzip/meta.yml @@ -1,34 +1,34 @@ name: gunzip description: Compresses and decompresses files. keywords: - - gunzip - - compression + - gunzip + - compression tools: - - gunzip: - description: | - 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'] + - gunzip: + description: | + 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"] 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: "*.*" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - gunzip: + type: file + description: Compressed/uncompressed file + pattern: "*.*" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" - - "@jfy133" + - "@joseespinosa" + - "@drpatelh" + - "@jfy133" diff --git a/modules/hamronization/deeparg/main.nf b/modules/hamronization/deeparg/main.nf new file mode 100644 index 00000000..ebfdcf17 --- /dev/null +++ b/modules/hamronization/deeparg/main.nf @@ -0,0 +1,44 @@ +process HAMRONIZATION_DEEPARG { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::hamronization=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hamronization:1.0.3--py_0': + 'quay.io/biocontainers/hamronization:1.0.3--py_0' }" + + input: + tuple val(meta), path(report) + val(format) + val(software_version) + val(reference_db_version) + + output: + tuple val(meta), path("*.json"), optional: true, emit: json + tuple val(meta), path("*.tsv") , optional: true, emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + hamronize \\ + deeparg \\ + ${report} \\ + $args \\ + --format ${format} \\ + --analysis_software_version ${software_version} \\ + --reference_database_version ${reference_db_version} \\ + --input_file_name ${prefix} \\ + > ${prefix}.${format} + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ +} diff --git a/modules/hamronization/deeparg/meta.yml b/modules/hamronization/deeparg/meta.yml new file mode 100644 index 00000000..dc076d06 --- /dev/null +++ b/modules/hamronization/deeparg/meta.yml @@ -0,0 +1,60 @@ +name: hamronization_deeparg +description: Tool to convert and summarize DeepARG outputs using the hAMRonization specification +keywords: + - amr + - antimicrobial resistance + - reporting + - deeparg +tools: + - hamronization: + description: Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification + homepage: https://github.com/pha4ge/hAMRonization/blob/master/README.md + documentation: https://github.com/pha4ge/hAMRonization/blob/master/README.md + tool_dev_url: https://github.com/pha4ge/hAMRonization + doi: "" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] + +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: value + description: Type of report file to be produced + pattern: "tsv|json" + - software_version: + type: value + description: Version of DeepARG used + pattern: "[0-9].[0-9].[0-9]" + - reference_db_version: + type: value + 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" + - tsv: + type: file + description: hAMRonised report in TSV format + pattern: "*.json" + +authors: + - "@jfy133" diff --git a/modules/hamronization/summarize/main.nf b/modules/hamronization/summarize/main.nf new file mode 100644 index 00000000..9b10de80 --- /dev/null +++ b/modules/hamronization/summarize/main.nf @@ -0,0 +1,38 @@ +process HAMRONIZATION_SUMMARIZE { + label 'process_low' + + conda (params.enable_conda ? "bioconda::hamronization=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hamronization:1.0.3--py_0': + 'quay.io/biocontainers/hamronization:1.0.3--py_0' }" + + input: + path(reports) + val(format) + + output: + path("hamronization_combined_report.json"), optional: true, emit: json + path("hamronization_combined_report.tsv") , optional: true, emit: tsv + path("hamronization_combined_report.html"), optional: true, emit: html + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def outformat = format == 'interactive' ? 'html' : format + """ + hamronize \\ + summarize \\ + ${reports.join(' ')} \\ + -t ${format} \\ + $args \\ + -o hamronization_combined_report.${outformat} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' ) + END_VERSIONS + """ +} diff --git a/modules/hamronization/summarize/meta.yml b/modules/hamronization/summarize/meta.yml new file mode 100644 index 00000000..dabcd092 --- /dev/null +++ b/modules/hamronization/summarize/meta.yml @@ -0,0 +1,45 @@ +name: hamronization_summarize +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 + homepage: https://github.com/pha4ge/hAMRonization/blob/master/README.md + documentation: https://github.com/pha4ge/hAMRonization/blob/master/README.md + tool_dev_url: https://github.com/pha4ge/hAMRonization + doi: "" + licence: ["GNU Lesser General Public v3 (LGPL v3)"] + +input: + - reports: + type: file + description: List of multiple hAMRonization reports in either JSON or TSV format + pattern: "*.{json,tsv}" + - format: + type: value + 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" + - tsv: + type: file + description: hAMRonised summary in TSV format + pattern: "*.json" + - html: + type: file + description: hAMRonised summary in HTML format + pattern: "*.html" + +authors: + - "@jfy133" diff --git a/modules/happy/happy/main.nf b/modules/happy/happy/main.nf new file mode 100644 index 00000000..1bb99117 --- /dev/null +++ b/modules/happy/happy/main.nf @@ -0,0 +1,42 @@ +def VERSION = '0.3.14' + +process HAPPY_HAPPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(truth_vcf), path(query_vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.csv'), path('*.json') , emit: metrics + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + hap.py \\ + $truth_vcf \\ + $query_vcf \\ + $args \\ + --reference $fasta \\ + --threads $task.cpus \\ + -R $bed \\ + -o $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hap.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/happy/meta.yml b/modules/happy/happy/meta.yml new file mode 100644 index 00000000..8ec762d5 --- /dev/null +++ b/modules/happy/happy/meta.yml @@ -0,0 +1,67 @@ +name: "happy_happy" +description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - truth_vcf: + type: file + description: gold standard VCF file + pattern: "*.{vcf,vcf.gz}" + - query_vcf: + type: file + description: VCF/GVCF file to query + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - summary: + type: file + description: A CSV file containing the summary of the benchmarking + pattern: "*.summary.csv" + - extended: + type: file + description: A CSV file containing extended info of the benchmarking + pattern: "*.extended.csv" + - runinfo: + type: file + description: A JSON file containing the run info + pattern: "*.runinfo.json" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/modules/happy/prepy/main.nf b/modules/happy/prepy/main.nf new file mode 100644 index 00000000..936f56ea --- /dev/null +++ b/modules/happy/prepy/main.nf @@ -0,0 +1,41 @@ +def VERSION = '0.3.14' + +process HAPPY_PREPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.vcf.gz') , emit: preprocessed_vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $vcf \\ + ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pre.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/prepy/meta.yml b/modules/happy/prepy/meta.yml new file mode 100644 index 00000000..7e27a652 --- /dev/null +++ b/modules/happy/prepy/meta.yml @@ -0,0 +1,55 @@ +name: "happy_prepy" +description: Pre.py is a preprocessing tool made to preprocess VCF files for Hap.py +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file to preprocess + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: A preprocessed VCF file + pattern: "*.vcf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/modules/hicap/meta.yml b/modules/hicap/meta.yml index 275df665..a027c050 100644 --- a/modules/hicap/meta.yml +++ b/modules/hicap/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/scwatts/hicap tool_dev_url: https://github.com/scwatts/hicap doi: "https://doi.org/10.1128/JCM.00190-19" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/hisat2/align/main.nf b/modules/hisat2/align/main.nf index 7f680018..0a45ce72 100644 --- a/modules/hisat2/align/main.nf +++ b/modules/hisat2/align/main.nf @@ -4,10 +4,10 @@ process HISAT2_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::hisat2=2.2.0 bioconda::samtools=1.10" : null) + conda (params.enable_conda ? "bioconda::hisat2=2.2.0 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:2880dd9d8ad0a7b221d4eacda9a818e92983128d-0' : - 'quay.io/biocontainers/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:2880dd9d8ad0a7b221d4eacda9a818e92983128d-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:0e773bb207600fcb4d38202226eb20a33c7909b6-0' : + 'quay.io/biocontainers/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1:0e773bb207600fcb4d38202226eb20a33c7909b6-0' }" input: tuple val(meta), path(reads) diff --git a/modules/hisat2/align/meta.yml b/modules/hisat2/align/meta.yml index 6011cc34..7550aefa 100644 --- a/modules/hisat2/align/meta.yml +++ b/modules/hisat2/align/meta.yml @@ -1,10 +1,10 @@ name: hisat2_align description: Align RNA-Seq reads to a reference with HISAT2 keywords: - - align - - fasta - - genome - - reference + - align + - fasta + - genome + - reference tools: - hisat2: @@ -12,19 +12,19 @@ tools: homepage: https://daehwankimlab.github.io/hisat2/ documentation: https://daehwankimlab.github.io/hisat2/manual/ doi: "10.1038/s41587-019-0201-4" - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - reads: type: file description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. - index: type: file description: HISAT2 genome index file @@ -38,8 +38,8 @@ output: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - bam: type: file description: Output BAM file containing read alignments diff --git a/modules/hisat2/build/meta.yml b/modules/hisat2/build/meta.yml index c08b296d..a2e1fd67 100644 --- a/modules/hisat2/build/meta.yml +++ b/modules/hisat2/build/meta.yml @@ -1,18 +1,18 @@ name: hisat2_build description: Builds HISAT2 index for reference genome keywords: - - build - - index - - fasta - - genome - - reference + - build + - index + - fasta + - genome + - reference tools: - hisat2: description: HISAT2 is a fast and sensitive alignment program for mapping next-generation sequencing reads (both DNA and RNA) to a population of human genomes as well as to a single reference genome. homepage: https://daehwankimlab.github.io/hisat2/ documentation: https://daehwankimlab.github.io/hisat2/manual/ doi: "10.1038/s41587-019-0201-4" - licence: ['MIT'] + licence: ["MIT"] input: - fasta: diff --git a/modules/hisat2/extractsplicesites/meta.yml b/modules/hisat2/extractsplicesites/meta.yml index 97227faf..7dc1bac8 100644 --- a/modules/hisat2/extractsplicesites/meta.yml +++ b/modules/hisat2/extractsplicesites/meta.yml @@ -1,10 +1,10 @@ name: hisat2_extractsplicesites description: Extracts splicing sites from a gtf files keywords: - - splicing - - gtf - - genome - - reference + - splicing + - gtf + - genome + - reference tools: - hisat2: @@ -12,7 +12,7 @@ tools: homepage: https://daehwankimlab.github.io/hisat2/ documentation: https://daehwankimlab.github.io/hisat2/manual/ doi: "10.1038/s41587-019-0201-4" - licence: ['MIT'] + licence: ["MIT"] input: - gtf: diff --git a/modules/hmmcopy/gccounter/meta.yml b/modules/hmmcopy/gccounter/meta.yml index 71727af2..ab101df6 100644 --- a/modules/hmmcopy/gccounter/meta.yml +++ b/modules/hmmcopy/gccounter/meta.yml @@ -11,14 +11,13 @@ tools: documentation: https://github.com/shahcompbio/hmmcopy_utils tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - fasta: type: file description: Input genome fasta file - output: - versions: type: file diff --git a/modules/hmmcopy/generatemap/meta.yml b/modules/hmmcopy/generatemap/meta.yml index ca43c6ce..7c345843 100644 --- a/modules/hmmcopy/generatemap/meta.yml +++ b/modules/hmmcopy/generatemap/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/shahcompbio/hmmcopy_utils tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - fasta: diff --git a/modules/hmmcopy/mapcounter/meta.yml b/modules/hmmcopy/mapcounter/meta.yml index 8f8b9aae..969a027d 100644 --- a/modules/hmmcopy/mapcounter/meta.yml +++ b/modules/hmmcopy/mapcounter/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/shahcompbio/hmmcopy_utils tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - bigwig: diff --git a/modules/hmmcopy/readcounter/meta.yml b/modules/hmmcopy/readcounter/meta.yml index 9b09a55c..81020ed9 100644 --- a/modules/hmmcopy/readcounter/meta.yml +++ b/modules/hmmcopy/readcounter/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/shahcompbio/hmmcopy_utils tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/hmmer/hmmalign/main.nf b/modules/hmmer/hmmalign/main.nf index d3df3c89..f8156e04 100644 --- a/modules/hmmer/hmmalign/main.nf +++ b/modules/hmmer/hmmalign/main.nf @@ -21,13 +21,11 @@ process HMMER_HMMALIGN { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def fastacmd = fasta.getExtension() == 'gz' ? "gunzip -c $fasta" : "cat $fasta" """ - $fastacmd | \\ - hmmalign \\ + hmmalign \\ $args \\ $hmm \\ - - | gzip -c > ${meta.id}.sthlm.gz + $fasta | gzip -c > ${meta.id}.sthlm.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/hmmer/hmmalign/meta.yml b/modules/hmmer/hmmalign/meta.yml index 58dc6b92..6c501120 100644 --- a/modules/hmmer/hmmalign/meta.yml +++ b/modules/hmmer/hmmalign/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://hmmer.org/documentation.html tool_dev_url: None doi: "http://dx.doi.org/10.1371/journal.pcbi.1002195" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - meta: @@ -19,12 +19,12 @@ input: e.g. [ id:'test' ] - fasta: type: file - description: Amino acid or nucleotide fasta file, gzipped or not - pattern: "*.{fna,fna.gz,faa,faa.gz,fasta,fasta.gz,fa,fa.gz}" + description: Amino acid or nucleotide gzipped compressed fasta file + pattern: "*.{fna.gz,faa.gz,fasta.gz,fa.gz}" - hmm: type: file - description: HMM file - pattern: "*.hmm" + description: A gzipped HMM file + pattern: "*.hmm.gz" output: - meta: @@ -43,3 +43,4 @@ output: authors: - "@erikrikarddaniel" + - "@jfy133" diff --git a/modules/hmmer/hmmsearch/main.nf b/modules/hmmer/hmmsearch/main.nf new file mode 100644 index 00000000..3a2d15b7 --- /dev/null +++ b/modules/hmmer/hmmsearch/main.nf @@ -0,0 +1,51 @@ +process HMMER_HMMSEARCH { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hmmer=3.3.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hmmer:3.3.2--h1b792b2_1' : + 'quay.io/biocontainers/hmmer:3.3.2--h1b792b2_1' }" + + input: + tuple val(meta), path(hmmfile), path(seqdb), val(write_align), val(write_target), val(write_domain) + + output: + tuple val(meta), path('*.txt.gz') , emit: output + tuple val(meta), path('*.sto.gz') , emit: alignments , optional: true + tuple val(meta), path('*.tbl.gz') , emit: target_summary, optional: true + tuple val(meta), path('*.domtbl.gz'), emit: domain_summary, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + output = "${prefix}.txt" + alignment = write_align ? "-A ${prefix}.sto" : '' + target_summary = write_target ? "--tblout ${prefix}.tbl" : '' + domain_summary = write_domain ? "--domtblout ${prefix}.domtbl" : '' + """ + hmmsearch \\ + $args \\ + --cpu $task.cpus \\ + -o $output \\ + $alignment \\ + $target_summary \\ + $domain_summary \\ + $hmmfile \\ + $seqdb + + gzip --no-name *.txt \\ + ${write_align ? '*.sto' : ''} \\ + ${write_target ? '*.tbl' : ''} \\ + ${write_domain ? '*.domtbl' : ''} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hmmer: \$(hmmsearch -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//') + END_VERSIONS + """ +} diff --git a/modules/hmmer/hmmsearch/meta.yml b/modules/hmmer/hmmsearch/meta.yml new file mode 100644 index 00000000..3f4459ba --- /dev/null +++ b/modules/hmmer/hmmsearch/meta.yml @@ -0,0 +1,69 @@ +name: hmmer_hmmsearch +description: search profile(s) against a sequence database +keywords: + - hidden Markov model + - HMM + - hmmer + - hmmsearch +tools: + - hmmer: + description: Biosequence analysis using profile hidden Markov models + homepage: http://hmmer.org/ + documentation: http://hmmer.org/documentation.html + tool_dev_url: https://github.com/EddyRivasLab/hmmer + doi: "10.1371/journal.pcbi.1002195" + licence: ["BSD"] + +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: val + description: Flag to write optional alignment output. Specify with 'true' to output + - write_target: + type: val + description: Flag to write optional per target summary . Specify with 'true' to output + - write_domain: + type: val + description: Flag to write optional per domain summary. Specify with 'true' to output + +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}" + - alignments: + 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}" + - domain_summary: + type: file + description: Optional tabular (space-delimited) summary of per-domain output + pattern: "*.{domtbl.gz}" + +authors: + - "@Midnighter" diff --git a/modules/homer/annotatepeaks/meta.yml b/modules/homer/annotatepeaks/meta.yml index c3ab9460..b815e975 100644 --- a/modules/homer/annotatepeaks/meta.yml +++ b/modules/homer/annotatepeaks/meta.yml @@ -10,7 +10,7 @@ tools: HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis. documentation: http://homer.ucsd.edu/homer/ doi: 10.1016/j.molcel.2010.05.004. - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/homer/findpeaks/main.nf b/modules/homer/findpeaks/main.nf index b9947774..4858d6da 100644 --- a/modules/homer/findpeaks/main.nf +++ b/modules/homer/findpeaks/main.nf @@ -13,8 +13,8 @@ process HOMER_FINDPEAKS { tuple val(meta), path(tagDir) output: - tuple val(meta), path("*peaks.txt"), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path("*.peaks.txt"), emit: txt + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/homer/findpeaks/meta.yml b/modules/homer/findpeaks/meta.yml index 2aa8db26..72eb8d0c 100644 --- a/modules/homer/findpeaks/meta.yml +++ b/modules/homer/findpeaks/meta.yml @@ -7,9 +7,11 @@ tools: - homer: description: | HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis. - documentation: http://homer.ucsd.edu/homer/ + homepage: "http://homer.ucsd.edu/homer/index.html" + documentation: "http://homer.ucsd.edu/homer/" + tool_dev_url: "http://homer.ucsd.edu/homer/ngs/peaks.html" doi: 10.1016/j.molcel.2010.05.004. - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map @@ -29,7 +31,7 @@ output: - peaks: type: file description: The found peaks - pattern: "*peaks.txt" + pattern: "*.peaks.txt" - versions: type: file description: File containing software versions diff --git a/modules/homer/maketagdirectory/main.nf b/modules/homer/maketagdirectory/main.nf index 262998d5..35b6904c 100644 --- a/modules/homer/maketagdirectory/main.nf +++ b/modules/homer/maketagdirectory/main.nf @@ -4,18 +4,19 @@ process HOMER_MAKETAGDIRECTORY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::homer=4.11=pl526hc9558a2_3" : null) + conda (params.enable_conda ? "bioconda::homer=4.11 bioconda::samtools=1.11 conda-forge::r-base=4.0.2 bioconda::bioconductor-deseq2=1.30.0 bioconda::bioconductor-edger=3.32.0 anaconda::perl=5.26.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' : - 'quay.io/biocontainers/homer:4.11--pl526hc9558a2_3' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-29293b111ffe5b4c1d1e14c711264aaed6b97b4a:594338b771cacf1623bd27772b5e12825f8835f2-0' : + 'quay.io/biocontainers/mulled-v2-29293b111ffe5b4c1d1e14c711264aaed6b97b4a:594338b771cacf1623bd27772b5e12825f8835f2-0' }" input: - tuple val(meta), path(bed) + tuple val(meta), path(bam) path fasta output: - tuple val(meta), path("tag_dir"), emit: tagdir - path "versions.yml" , emit: versions + tuple val(meta), path("*_tagdir") , emit: tagdir + tuple val(meta), path("*_tagdir/tagInfo.txt"), emit: taginfo + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -25,14 +26,15 @@ process HOMER_MAKETAGDIRECTORY { def prefix = task.ext.prefix ?: "${meta.id}" """ makeTagDirectory \\ - tag_dir \\ + ${prefix}_tagdir \\ + -genome $fasta \\ $args \\ - $bed \\ - -genome $fasta + $bam cat <<-END_VERSIONS > versions.yml "${task.process}": homer: $VERSION + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/homer/maketagdirectory/meta.yml b/modules/homer/maketagdirectory/meta.yml index 802320f9..ccd2d6a8 100644 --- a/modules/homer/maketagdirectory/meta.yml +++ b/modules/homer/maketagdirectory/meta.yml @@ -3,23 +3,50 @@ description: Create a tag directory with the HOMER suite keywords: - peaks - bed + - bam + - sam tools: - homer: description: | HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis. documentation: http://homer.ucsd.edu/homer/ doi: 10.1016/j.molcel.2010.05.004. - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + - DESeq2: + description: | + Differential gene expression analysis based on the negative binomial distribution + homepage: "https://bioconductor.org/packages/DESeq2" + documentation: "https://bioconductor.org/packages/DESeq2" + tool_dev_url: "https://github.com/mikelove/DESeq2" + doi: 10.18129/B9.bioc.DESeq2 + licence: ["LGPL-3.0-or-later"] + - edgeR: + description: | + Empirical Analysis of Digital Gene Expression Data in R + homepage: "https://bioinf.wehi.edu.au/edgeR" + documentation: "https://bioconductor.org/packages/edgeR" + tool_dev_url: " https://git.bioconductor.org/packages/edgeR" + doi: 10.18129/B9.bioc.edgeR + licence: ["GPL >=2"] input: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bed: + - bam: type: file - description: The peak files in bed format - pattern: "*.bed" + description: BAM/BED/SAM file + pattern: "*.{bam,bed,sam}" - fasta: type: file description: Fasta file of reference genome @@ -30,10 +57,14 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - tag_dir: + - tagdir: type: directory description: The "Tag Directory" - pattern: "tag_dir" + pattern: "*_tagdir" + - taginfo: + type: directory + description: The tagInfo.txt included to ensure there's proper output + pattern: "*_tagdir/tagInfo.txt" - versions: type: file description: File containing software versions diff --git a/modules/homer/makeucscfile/main.nf b/modules/homer/makeucscfile/main.nf index c82435ea..379fad3d 100644 --- a/modules/homer/makeucscfile/main.nf +++ b/modules/homer/makeucscfile/main.nf @@ -13,8 +13,8 @@ process HOMER_MAKEUCSCFILE { tuple val(meta), path(tagDir) output: - tuple val(meta), path("tag_dir/*ucsc.bedGraph.gz"), emit: bedGraph - path "versions.yml" , emit: versions + tuple val(meta), path("*.bedGraph.gz"), emit: bedGraph + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -25,7 +25,7 @@ process HOMER_MAKEUCSCFILE { """ makeUCSCfile \\ $tagDir \\ - -o auto \\ + -o ${prefix}.bedGraph \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/homer/makeucscfile/meta.yml b/modules/homer/makeucscfile/meta.yml index 68d5fcd4..039fd37f 100644 --- a/modules/homer/makeucscfile/meta.yml +++ b/modules/homer/makeucscfile/meta.yml @@ -10,7 +10,7 @@ tools: HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis. documentation: http://homer.ucsd.edu/homer/ doi: 10.1016/j.molcel.2010.05.004. - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map @@ -30,7 +30,7 @@ output: - bedGraph: type: file description: The UCSC bed graph - pattern: "tag_dir/*ucsc.bedGraph.gz" + pattern: "*.bedGraph.gz" - versions: type: file description: File containing software versions diff --git a/modules/homer/pos2bed/main.nf b/modules/homer/pos2bed/main.nf new file mode 100644 index 00000000..b85a30b5 --- /dev/null +++ b/modules/homer/pos2bed/main.nf @@ -0,0 +1,33 @@ +def VERSION = '4.11' // Version information not provided by tool on CLI + +process HOMER_POS2BED { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::homer=4.11" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' : + 'quay.io/biocontainers/homer:4.11--pl526hc9558a2_3' }" + + input: + tuple val(meta), path(peaks) + + output: + tuple val(meta), path("*.bed"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + pos2bed.pl $peaks > ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + homer: $VERSION + END_VERSIONS + """ +} diff --git a/modules/homer/pos2bed/meta.yml b/modules/homer/pos2bed/meta.yml new file mode 100644 index 00000000..fb75bb1f --- /dev/null +++ b/modules/homer/pos2bed/meta.yml @@ -0,0 +1,42 @@ +name: "homer_pos2bed" +description: Coverting from HOMER peak to BED file formats +keywords: + - peaks +tools: + - "homer": + description: | + HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis. + homepage: "http://homer.ucsd.edu/homer/index.html" + documentation: "http://homer.ucsd.edu/homer/" + tool_dev_url: "http://homer.ucsd.edu/homer/ngs/miscellaneous.html" + doi: 10.1016/j.molcel.2010.05.004. + licence: ["GPL-3.0-or-later"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tagDir: + type: directory + description: "The 'Tag Directory'" + pattern: "tagDir" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: BED file + pattern: "*.bed" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@Emiller88" diff --git a/modules/hpsuissero/main.nf b/modules/hpsuissero/main.nf new file mode 100644 index 00000000..4b31f91c --- /dev/null +++ b/modules/hpsuissero/main.nf @@ -0,0 +1,44 @@ +def VERSION = '1.0.1' // Version information not provided by tool on CLI + +process HPSUISSERO { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::hpsuissero=1.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hpsuissero%3A1.0.1--hdfd78af_0': + 'quay.io/biocontainers/hpsuissero:1.0.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.tsv"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def is_compressed = fasta.getName().endsWith(".gz") ? true : false + def fasta_name = fasta.getName().replace(".gz", "") + """ + if [ "$is_compressed" == "true" ]; then + gzip -c -d $fasta > $fasta_name + fi + + HpsuisSero.sh \\ + -i $fasta_name \\ + -o ./ \\ + -s $prefix \\ + -x fasta \\ + -t $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hpsuissero: $VERSION + END_VERSIONS + """ +} diff --git a/modules/hpsuissero/meta.yml b/modules/hpsuissero/meta.yml new file mode 100644 index 00000000..55b5de39 --- /dev/null +++ b/modules/hpsuissero/meta.yml @@ -0,0 +1,43 @@ +name: hpsuissero +description: Serotype prediction of Haemophilus parasuis assemblies +keywords: + - bacteria + - fasta + - haemophilus +tools: + - hpsuissero: + description: Rapid Haemophilus parasuis serotyping pipeline for Nanpore data + homepage: https://github.com/jimmyliu1326/HpsuisSero + documentation: https://github.com/jimmyliu1326/HpsuisSero + tool_dev_url: https://github.com/jimmyliu1326/HpsuisSero + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Assembly in FASTA format + pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.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" + - tsv: + type: file + description: Tab-delimited serotype prediction + pattern: "*.{tsv}" + +authors: + - "@rpetit3" diff --git a/modules/ichorcna/createpon/main.nf b/modules/ichorcna/createpon/main.nf new file mode 100644 index 00000000..6b249b32 --- /dev/null +++ b/modules/ichorcna/createpon/main.nf @@ -0,0 +1,48 @@ +def VERSION = '0.3.2' // Version information not provided by tool on CLI + +process ICHORCNA_CREATEPON { + label 'process_low' + + conda (params.enable_conda ? "bioconda::r-ichorcna=0.3.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--r41hdfd78af_0' : + 'quay.io/biocontainers/r-ichorcna:0.3.2--r41hdfd78af_0' }" + + input: + path wigs + path gc_wig + path map_wig + path centromere + + output: + path "*.rds" , emit: rds + path "*.txt" , emit: txt + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def centro = centromere ? "--centromere ${centromere}" : '' + def prefix = task.ext.prefix ?: "PoN" + + """ + echo ${wigs} | tr " " "\\n" > wig_files.txt + + createPanelOfNormals.R \\ + --filelist wig_files.txt \\ + --gcWig ${gc_wig} \\ + --mapWig ${map_wig} \\ + ${centro} \\ + ${args} \\ + --outfile ${prefix} + + rm wig_files.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ichorcna: $VERSION + END_VERSIONS + """ +} diff --git a/modules/ichorcna/createpon/meta.yml b/modules/ichorcna/createpon/meta.yml new file mode 100644 index 00000000..77b99915 --- /dev/null +++ b/modules/ichorcna/createpon/meta.yml @@ -0,0 +1,57 @@ +name: ichorcna_createpon +description: ichorCNA is an R package for calculating copy number alteration from (low-pass) whole genome sequencing, particularly for use in cell-free DNA. This module generates a panel of normals +keywords: + - ichorcna + - cnv + - cna + - cfDNA + - wgs + - panel_of_normals +tools: + - ichorcna: + description: Estimating tumor fraction in cell-free DNA from ultra-low-pass whole genome sequencing. + homepage: https://github.com/broadinstitute/ichorCNA + documentation: https://github.com/broadinstitute/ichorCNA/wiki + tool_dev_url: https://github.com/broadinstitute/ichorCNA + doi: "10.1038/s41467-017-00965-y" + licence: ["GPL v3"] + +input: + - wigs: + type: file + description: Any number of hmmcopy/readCounter processed .wig files giving the number of reads in the sample, in each genomic window. These will be averaged over to generate the panel of normals. + pattern: "*.{wig}" + + - gc_wig: + type: file + description: hmmcopy/gcCounter processed .wig file giving the gc content in the reference fasta, in each genomic window + pattern: "*.{wig}" + + - map_wig: + type: file + description: hmmcopy/mapCounter processed .wig file giving the mapability in the reference fasta, in each genomic window + pattern: "*.{wig}" + + - centromere: + type: file + description: Text file giving centromere locations of each genome, to exclude these windows + pattern: "*.{txt}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - rds: + type: file + description: R data file (.rds) containing panel of normals data, medians of each bin. + pattern: "*.rds" + + - txt: + type: file + description: Text file containing panel of normals data, medians of each bin. + pattern: "*.txt" + +authors: + - "@sppearce" diff --git a/modules/ichorcna/run/main.nf b/modules/ichorcna/run/main.nf new file mode 100644 index 00000000..cc72adc9 --- /dev/null +++ b/modules/ichorcna/run/main.nf @@ -0,0 +1,50 @@ +def VERSION = '0.3.2' // Version information not provided by tool on CLI + +process ICHORCNA_RUN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::r-ichorcna=0.3.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--r41hdfd78af_0' : + 'quay.io/biocontainers/r-ichorcna:0.3.2--r41hdfd78af_0' }" + + input: + tuple val(meta), path(wig) + path gc_wig + path map_wig + path panel_of_normals + path centromere + + output: + tuple val(meta), path("*.cna.seg") , emit: cna_seg + tuple val(meta), path("*.params.txt") , emit: ichorcna_params + path "**/*genomeWide.pdf" , emit: genome_plot + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def pon = panel_of_normals ? "--normalPanel ${panel_of_normals}" : '' + def centro = centromere ? "--centromere ${centromere}" : '' + + """ + runIchorCNA.R --id ${prefix} \\ + $args \\ + --WIG ${wig} \\ + --id ${meta.id} \\ + --gcWig ${gc_wig} \\ + --mapWig ${map_wig} \\ + ${pon} \\ + ${centro} \\ + --outDir . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ichorcna: $VERSION + END_VERSIONS + """ +} diff --git a/modules/ichorcna/run/meta.yml b/modules/ichorcna/run/meta.yml new file mode 100644 index 00000000..9b487997 --- /dev/null +++ b/modules/ichorcna/run/meta.yml @@ -0,0 +1,72 @@ +name: ichorcna_run +description: ichorCNA is an R package for calculating copy number alteration from (low-pass) whole genome sequencing, particularly for use in cell-free DNA +keywords: + - ichorcna + - cnv + - cna + - cfDNA + - wgs +tools: + - ichorcna: + description: Estimating tumor fraction in cell-free DNA from ultra-low-pass whole genome sequencing. + homepage: https://github.com/broadinstitute/ichorCNA + documentation: https://github.com/broadinstitute/ichorCNA/wiki + tool_dev_url: https://github.com/broadinstitute/ichorCNA + doi: "10.1038/s41467-017-00965-y" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - wig: + type: file + description: hmmcopy/readCounter processed .wig file giving the number of reads in the sample, in each genomic window + pattern: "*.{wig}" + + - gc_wig: + type: file + description: hmmcopy/gcCounter processed .wig file giving the gc content in the reference fasta, in each genomic window + pattern: "*.{wig}" + + - map_wig: + type: file + description: hmmcopy/mapCounter processed .wig file giving the mapability in the reference fasta, in each genomic window + pattern: "*.{wig}" + + - panel_of_normals: + type: file + description: Panel of normals data, generated by calling ichorCNA on a set of normal samples with the same window size etc. + pattern: "*.{rds}" + + - centromere: + type: file + description: Text file giving centromere locations of each genome, to exclude these windows + pattern: "*.{txt}" + +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" + - cna_seg: + type: file + description: Predicted copy number variation per segment + pattern: "*.{cng.seg}" + - ichorcna_params: + type: file + description: A text file showing the values that ichorCNA has estimated for tumour fraction, ploidy etc + pattern: "*.{params.txt}" + - genome_plot: + type: file + description: A plot with the best-fit genome-wide CNV data + pattern: "*.{genomeWide.pdf}" +authors: + - "@sppearce" diff --git a/modules/idr/meta.yml b/modules/idr/meta.yml index c89e72a4..7442c25a 100644 --- a/modules/idr/meta.yml +++ b/modules/idr/meta.yml @@ -17,7 +17,7 @@ tools: documentation: None tool_dev_url: https://github.com/kundajelab/idr doi: "" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - peaks: type: tuple of two files diff --git a/modules/iqtree/meta.yml b/modules/iqtree/meta.yml index 0a3b4e4c..2c34a3da 100644 --- a/modules/iqtree/meta.yml +++ b/modules/iqtree/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://www.iqtree.org/doc tool_dev_url: https://github.com/iqtree/iqtree2 doi: doi.org/10.1093/molbev/msaa015 - licence: ['GPL v2-or-later'] + licence: ["GPL v2-or-later"] input: - alignment: diff --git a/modules/ismapper/meta.yml b/modules/ismapper/meta.yml index 810c1674..5b0be8d3 100644 --- a/modules/ismapper/meta.yml +++ b/modules/ismapper/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/jhawkey/IS_mapper tool_dev_url: https://github.com/jhawkey/IS_mapper doi: "https://doi.org/10.1186/s12864-015-1860-2" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - meta: diff --git a/modules/isoseq3/cluster/meta.yml b/modules/isoseq3/cluster/meta.yml index 4086ab05..84631978 100644 --- a/modules/isoseq3/cluster/meta.yml +++ b/modules/isoseq3/cluster/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://github.com/PacificBiosciences/IsoSeq/blob/master/isoseq-clustering.md tool_dev_url: https://github.com/PacificBiosciences/IsoSeq/blob/master/isoseq-clustering.md doi: "" - licence: ['BSD-3-Clause-Clear'] + licence: ["BSD-3-Clause-Clear"] input: - meta: diff --git a/modules/isoseq3/refine/meta.yml b/modules/isoseq3/refine/meta.yml index eefd015b..2e9e4092 100644 --- a/modules/isoseq3/refine/meta.yml +++ b/modules/isoseq3/refine/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/PacificBiosciences/IsoSeq/blob/master/isoseq-clustering.md tool_dev_url: https://github.com/PacificBiosciences/IsoSeq/blob/master/isoseq-clustering.md doi: "" - licence: ['BSD-3-Clause-Clear'] + licence: ["BSD-3-Clause-Clear"] input: - meta: diff --git a/modules/ivar/consensus/meta.yml b/modules/ivar/consensus/meta.yml index aa08ad98..fb562603 100644 --- a/modules/ivar/consensus/meta.yml +++ b/modules/ivar/consensus/meta.yml @@ -1,56 +1,56 @@ name: ivar_consensus description: Generate a consensus sequence from a BAM file using iVar keywords: - - amplicon sequencing - - consensus - - fasta + - amplicon sequencing + - consensus + - fasta tools: - - ivar: - description: | - iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. - homepage: https://github.com/andersen-lab/ivar - documentation: https://andersen-lab.github.io/ivar/html/manualpage.html - licence: ['GPL-3.0-or-later'] + - ivar: + description: | + iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. + homepage: https://github.com/andersen-lab/ivar + documentation: https://andersen-lab.github.io/ivar/html/manualpage.html + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: A sorted (with samtools sort) and trimmed (with iVar trim) bam file - pattern: "*.bam" - - fasta: - type: file - description: The reference sequence used for mapping and generating the BAM file - pattern: "*.fa" - - save_mpileup: - type: boolean - description: Save mpileup file generated by ivar consensus - patter: "*.mpileup" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: A sorted (with samtools sort) and trimmed (with iVar trim) bam file + pattern: "*.bam" + - fasta: + type: file + description: The reference sequence used for mapping and generating the BAM file + pattern: "*.fa" + - save_mpileup: + type: boolean + description: Save mpileup file generated by ivar consensus + patter: "*.mpileup" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: iVar generated consensus sequence - pattern: "*.fa" - - qual: - type: file - description: iVar generated quality file - pattern: "*.qual.txt" - - mpileup: - type: file - description: mpileup output from samtools mpileup [OPTIONAL] - pattern: "*.mpileup" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: iVar generated consensus sequence + pattern: "*.fa" + - qual: + type: file + description: iVar generated quality file + pattern: "*.qual.txt" + - mpileup: + type: file + description: mpileup output from samtools mpileup [OPTIONAL] + pattern: "*.mpileup" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@andersgs" - - "@drpatelh" + - "@andersgs" + - "@drpatelh" diff --git a/modules/ivar/trim/meta.yml b/modules/ivar/trim/meta.yml index 44bc742e..d01dd1a2 100644 --- a/modules/ivar/trim/meta.yml +++ b/modules/ivar/trim/meta.yml @@ -1,52 +1,52 @@ name: ivar_trim description: Trim primer sequences rom a BAM file with iVar keywords: - - amplicon sequencing - - trimming - - fasta + - amplicon sequencing + - trimming + - fasta tools: - - ivar: - description: | - iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. - homepage: https://github.com/andersen-lab/ivar - documentation: https://andersen-lab.github.io/ivar/html/manualpage.html - licence: ['GPL-3.0-or-later'] + - ivar: + description: | + iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. + homepage: https://github.com/andersen-lab/ivar + documentation: https://andersen-lab.github.io/ivar/html/manualpage.html + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Co-ordinate sorted BAM file - pattern: "*.bam" - - bai: - type: file - description: Index file for co-ordinate sorted BAM file - pattern: "*.bai" - - bed: - type: file - description: BED file with primer labels and positions - pattern: "*.bed" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Co-ordinate sorted BAM file + pattern: "*.bam" + - bai: + type: file + description: Index file for co-ordinate sorted BAM file + pattern: "*.bai" + - bed: + type: file + description: BED file with primer labels and positions + pattern: "*.bed" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: iVar generated trimmed bam file (unsorted) - pattern: "*.bam" - - log: - type: file - description: Log file generated by iVar for use with MultiQC - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: iVar generated trimmed bam file (unsorted) + pattern: "*.bam" + - log: + type: file + description: Log file generated by iVar for use with MultiQC + pattern: "*.log" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@andersgs" - - "@drpatelh" + - "@andersgs" + - "@drpatelh" diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index 85c4cacd..b86042f0 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -10,6 +10,7 @@ process IVAR_VARIANTS { input: tuple val(meta), path(bam) path fasta + path fai path gff val save_mpileup diff --git a/modules/ivar/variants/meta.yml b/modules/ivar/variants/meta.yml index 29cbd958..4d09e449 100644 --- a/modules/ivar/variants/meta.yml +++ b/modules/ivar/variants/meta.yml @@ -1,56 +1,60 @@ name: ivar_variants description: Call variants from a BAM file using iVar keywords: - - amplicon sequencing - - variants - - fasta + - amplicon sequencing + - variants + - fasta tools: - - ivar: - description: | - iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. - homepage: https://github.com/andersen-lab/ivar - documentation: https://andersen-lab.github.io/ivar/html/manualpage.html - licence: ['GPL-3.0-or-later'] + - ivar: + description: | + iVar - a computational package that contains functions broadly useful for viral amplicon-based sequencing. + homepage: https://github.com/andersen-lab/ivar + documentation: https://andersen-lab.github.io/ivar/html/manualpage.html + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: A sorted (with samtools sort) and trimmed (with iVar trim) bam file - pattern: "*.bam" - - fasta: - type: file - description: The reference sequence used for mapping and generating the BAM file - pattern: "*.fa" - - gff: - type: file - description: A GFF file in the GFF3 format can be supplied to specify coordinates of open reading frames (ORFs). In absence of GFF file, amino acid translation will not be done. - patter: "*.gff" - - save_mpileup: - type: boolean - description: Save mpileup file generated by ivar variants - patter: "*.mpileup" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: A sorted (with samtools sort) and trimmed (with iVar trim) bam file + pattern: "*.bam" + - fasta: + type: file + description: The reference sequence used for mapping and generating the BAM file + pattern: "*.fa" + - fai: + type: file + description: The index for the reference sequence used for mapping and generating the BAM file + pattern: "*.fai" + - gff: + type: file + description: A GFF file in the GFF3 format can be supplied to specify coordinates of open reading frames (ORFs). In absence of GFF file, amino acid translation will not be done. + patter: "*.gff" + - save_mpileup: + type: boolean + description: Save mpileup file generated by ivar variants + patter: "*.mpileup" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tsv: - type: file - description: iVar generated TSV file with the variants - pattern: "*.tsv" - - mpileup: - type: file - description: mpileup output from samtools mpileup [OPTIONAL] - pattern: "*.mpileup" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tsv: + type: file + description: iVar generated TSV file with the variants + pattern: "*.tsv" + - mpileup: + type: file + description: mpileup output from samtools mpileup [OPTIONAL] + pattern: "*.mpileup" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@andersgs" - - "@drpatelh" + - "@andersgs" + - "@drpatelh" diff --git a/modules/kaiju/kaiju/main.nf b/modules/kaiju/kaiju/main.nf new file mode 100644 index 00000000..ae8f99e6 --- /dev/null +++ b/modules/kaiju/kaiju/main.nf @@ -0,0 +1,41 @@ +process KAIJU_KAIJU { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': + 'quay.io/biocontainers/kaiju:1.8.2--h5b5514e_1' }" + + input: + tuple val(meta), path(reads) + path(db) + + output: + tuple val(meta), path('*.tsv'), emit: results + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input = meta.single_end ? "-i ${reads}" : "-i ${reads[0]} -j ${reads[1]}" + """ + dbnodes=`find -L ${db} -name "*nodes.dmp"` + dbname=`find -L ${db} -name "*.fmi" -not -name "._*"` + kaiju \\ + $args \\ + -z $task.cpus \\ + -t \$dbnodes \\ + -f \$dbname \\ + -o ${prefix}.tsv \\ + $input + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ +} diff --git a/modules/kaiju/kaiju/meta.yml b/modules/kaiju/kaiju/meta.yml new file mode 100644 index 00000000..e24c8efc --- /dev/null +++ b/modules/kaiju/kaiju/meta.yml @@ -0,0 +1,53 @@ +name: kaiju_kaiju +description: Taxonomic classification of metagenomic sequence data using a protein reference database +keywords: + - classify + - metagenomics + - fastq + - taxonomic profiling +tools: + - kaiju: + description: Fast and sensitive taxonomic classification for metagenomics + homepage: https://kaiju.binf.ku.dk/ + documentation: https://github.com/bioinformatics-centre/kaiju/blob/master/README.md + tool_dev_url: https://github.com/bioinformatics-centre/kaiju + doi: "10.1038/ncomms11257" + licence: ["GNU GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq/fasta files of size 1 and 2 for single-end and paired-end data, + respectively. + pattern: "*.{fastq,fq,fasta,fa,fsa,fas,fna,fastq.gz,fq.gz,fasta.gz,fa.gz,fsa.gz,fas.gz,fna.gz}" + - db: + type: files + description: | + List containing the database and nodes files for Kaiju + e.g. [ 'database.fmi', 'nodes.dmp' ] + +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" + - results: + type: file + description: Results with taxonomic classification of each read + pattern: "*.tsv" + +authors: + - "@talnor" + - "@sofstam" + - "@jfy133" diff --git a/modules/kaiju/kaiju2table/main.nf b/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..00739d1e --- /dev/null +++ b/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,40 @@ +process KAIJU_KAIJU2TABLE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': + 'quay.io/biocontainers/kaiju:1.8.2--h2e03b76_0' }" + + input: + tuple val(meta), path(results) + path db + val taxon_rank + + output: + tuple val(meta), path('*.txt'), emit: summary + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + dbnodes=`find -L ${db} -name "*nodes.dmp"` + dbname=`find -L ${db} -name "*.fmi" -not -name "._*"` + kaiju2table $args \\ + -t \$dbnodes \\ + -n \$dbname \\ + -r ${taxon_rank} \\ + -o ${prefix}.txt \\ + ${results} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ +} diff --git a/modules/kaiju/kaiju2table/meta.yml b/modules/kaiju/kaiju2table/meta.yml new file mode 100644 index 00000000..bc3e85d7 --- /dev/null +++ b/modules/kaiju/kaiju2table/meta.yml @@ -0,0 +1,50 @@ +name: "kaiju_kaiju2table" +description: write your description here +keywords: + - classify + - metagenomics +tools: + - kaiju: + description: Fast and sensitive taxonomic classification for metagenomics + homepage: https://kaiju.binf.ku.dk/ + documentation: https://github.com/bioinformatics-centre/kaiju/blob/master/README.md + tool_dev_url: https://github.com/bioinformatics-centre/kaiju + doi: "10.1038/ncomms11257" + licence: ["GNU GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: file + description: File containing the kaiju classification results + pattern: "*.{txt}" + - taxon_rank: + type: string + description: | + Taxonomic rank to display in report + pattern: "phylum|class|order|family|genus|species" + +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" + - results: + type: file + description: | + Summary table for a given taxonomic rank + pattern: "*.{tsv}" + +authors: + - "@sofstam" + - "@talnor" + - "@jfy133" diff --git a/modules/kallisto/index/meta.yml b/modules/kallisto/index/meta.yml index dd952e33..307650b2 100644 --- a/modules/kallisto/index/meta.yml +++ b/modules/kallisto/index/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://pachterlab.github.io/kallisto/manual tool_dev_url: https://github.com/pachterlab/kallisto doi: "" - licence: ['BSD-2-Clause'] + licence: ["BSD-2-Clause"] input: - fasta: diff --git a/modules/khmer/normalizebymedian/meta.yml b/modules/khmer/normalizebymedian/meta.yml index 2227750f..5bd2b205 100644 --- a/modules/khmer/normalizebymedian/meta.yml +++ b/modules/khmer/normalizebymedian/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://khmer.readthedocs.io/en/latest/ tool_dev_url: https://github.com/dib-lab/khmer doi: "https://doi.org/10.12688/f1000research.6924.1" - licence: ['BSD License'] + licence: ["BSD License"] input: - pe_reads: diff --git a/modules/kleborate/meta.yml b/modules/kleborate/meta.yml index eaf837e7..92ab08c8 100644 --- a/modules/kleborate/meta.yml +++ b/modules/kleborate/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/katholt/Kleborate/wiki tool_dev_url: https://github.com/katholt/Kleborate doi: 10.1038/s41467-021-24448-3 - licence: ['GPL v3 or later (GPL v3+)'] + licence: ["GPL v3 or later (GPL v3+)"] input: - meta: diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index 3ec5df52..d4000233 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -10,12 +10,15 @@ process KRAKEN2_KRAKEN2 { input: tuple val(meta), path(reads) path db + val save_output_fastqs + val save_reads_assignment output: - tuple val(meta), path('*classified*') , emit: classified - tuple val(meta), path('*unclassified*'), emit: unclassified - tuple val(meta), path('*report.txt') , emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*classified*') , optional:true, emit: classified_reads_fastq + tuple val(meta), path('*unclassified*') , optional:true, emit: unclassified_reads_fastq + tuple val(meta), path('*classifiedreads*'), optional:true, emit: classified_reads_assignment + tuple val(meta), path('*report.txt') , emit: report + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -26,19 +29,25 @@ process KRAKEN2_KRAKEN2 { def paired = meta.single_end ? "" : "--paired" def classified = meta.single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq" def unclassified = meta.single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq" + def classified_command = save_output_fastqs ? "--classified-out ${classified}" : "" + def unclassified_command = save_output_fastqs ? "--unclassified-out ${unclassified}" : "" + def readclassification_command = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : "" + def compress_reads_command = save_output_fastqs ? "pigz -p $task.cpus *.fastq" : "" + """ kraken2 \\ --db $db \\ --threads $task.cpus \\ - --unclassified-out $unclassified \\ - --classified-out $classified \\ --report ${prefix}.kraken2.report.txt \\ --gzip-compressed \\ + $unclassified_command \\ + $classified_command \\ + $readclassification_command \\ $paired \\ $args \\ $reads - pigz -p $task.cpus *.fastq + $compress_reads_command cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/kraken2/kraken2/meta.yml b/modules/kraken2/kraken2/meta.yml index 4b894705..7129fe3a 100644 --- a/modules/kraken2/kraken2/meta.yml +++ b/modules/kraken2/kraken2/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://ccb.jhu.edu/software/kraken2/ documentation: https://github.com/DerrickWood/kraken2/wiki/Manual doi: 10.1186/s13059-019-1891-0 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map @@ -27,25 +27,40 @@ input: - db: type: directory description: Kraken2 database + - save_output_fastqs: + type: boolean + description: | + If true, optional commands are added to save classified and unclassified reads + as fastq files + - save_reads_assignment: + type: boolean + description: | + If true, an optional command is added to save a file reporting the taxonomic + classification of each input read output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - classified: + - classified_reads_fastq: type: file description: | - Reads classified to belong to any of the taxa + Reads classified as belonging to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - unclassified: + - unclassified_reads_fastq: type: file description: | - Reads not classified to belong to any of the taxa + Reads not classified to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - txt: + - classified_reads_assignment: + type: file + description: | + Kraken2 output file indicating the taxonomic assignment of + each input read + - report: type: file description: | Kraken2 report containing stats about classified diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index afcb0694..eaab43f0 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -18,7 +18,9 @@ process KRONA_KRONADB { script: def args = task.ext.args ?: '' """ - ktUpdateTaxonomy.sh taxonomy + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 7837bb87..bc78c6ba 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -23,7 +23,10 @@ process KRONA_KTIMPORTTAXONOMY { script: def args = task.ext.args ?: '' """ - ktImportTaxonomy "$report" -tax taxonomy + ktImportTaxonomy \\ + $args \\ + -tax taxonomy/ \\ + "$report" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/ktimporttaxonomy/meta.yml b/modules/krona/ktimporttaxonomy/meta.yml index b65919f8..df0ad1c9 100644 --- a/modules/krona/ktimporttaxonomy/meta.yml +++ b/modules/krona/ktimporttaxonomy/meta.yml @@ -23,8 +23,11 @@ input: Groovy Map containing sample information e.g. [ id:'test'] - database: - type: path - description: "Path to the taxonomy database downloaded by krona/kronadb" + type: file + description: | + Path to the taxonomy database .tab file downloaded by krona/ktUpdateTaxonomy + The file will be saved under a folder named "taxonomy" as "taxonomy/taxonomy.tab". + The parent folder will be passed as argument to ktImportTaxonomy. - report: type: file description: "A tab-delimited file with taxonomy IDs and (optionally) query IDs, magnitudes, and scores. Query IDs are taken from column 1, taxonomy IDs from column 2, and scores from column 3. Lines beginning with # will be ignored." diff --git a/modules/krona/ktimporttext/main.nf b/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..de0cfc22 --- /dev/null +++ b/modules/krona/ktimporttext/main.nf @@ -0,0 +1,34 @@ +process KRONA_KTIMPORTTEXT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.8.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1': + 'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }" + + input: + tuple val(meta), path(report) + + output: + tuple val(meta), path ('*.html'), emit: html + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + ktImportText \\ + $args \\ + -o ${prefix}.html \\ + $report + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g') + END_VERSIONS + """ +} diff --git a/modules/krona/ktimporttext/meta.yml b/modules/krona/ktimporttext/meta.yml new file mode 100644 index 00000000..a7108e0d --- /dev/null +++ b/modules/krona/ktimporttext/meta.yml @@ -0,0 +1,47 @@ +name: "krona_ktimporttext" +description: Creates a Krona chart from text files listing quantities and lineages. +keywords: + - plot + - taxonomy + - interactive + - html + - visualisation + - krona chart + - metagenomics +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: http://manpages.ubuntu.com/manpages/impish/man1/ktImportTaxonomy.1.html + tool_dev_url: https://github.com/marbl/Krona + doi: 10.1186/1471-2105-12-385 + licence: https://raw.githubusercontent.com/marbl/Krona/master/KronaTools/LICENSE.txt + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - report: + type: file + description: "Tab-delimited text file. Each line should be a number followed by a list of wedges to contribute to (starting from the highest level). If no wedges are listed (and just a quantity is given), it will contribute to the top level. If the same lineage is listed more than once, the values will be added. Quantities can be omitted if -q is specified. Lines beginning with '#' will be ignored." + pattern: "*.{txt}" + +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" + - html: + type: file + description: A html file containing an interactive krona plot. + pattern: "*.{html}" + +authors: + - "@jianhong" diff --git a/modules/krona/ktupdatetaxonomy/main.nf b/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..8326f219 --- /dev/null +++ b/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,30 @@ +def VERSION='2.7.1' // Version information not provided by tool on CLI + +process KRONA_KTUPDATETAXONOMY { + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' : + 'quay.io/biocontainers/krona:2.7.1--pl526_5' }" + + output: + path 'taxonomy/taxonomy.tab', emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: $VERSION + END_VERSIONS + """ +} diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml new file mode 100644 index 00000000..945b5062 --- /dev/null +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -0,0 +1,31 @@ +name: krona_ktupdatetaxonomy +description: KronaTools Update Taxonomy downloads a taxonomy database +keywords: + - database + - taxonomy + - krona + - visualisation +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: https://github.com/marbl/Krona/wiki/Installing + tool_dev_url: + doi: https://doi.org/10.1186/1471-2105-12-385 + licence: + +input: + - none: There is no input. This module downloads a pre-built taxonomy database for use with Krona Tools. + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: A TAB separated file that contains a taxonomy database. + pattern: "*.{tab}" + +authors: + - "@mjakobs" diff --git a/modules/last/dotplot/meta.yml b/modules/last/dotplot/meta.yml index 2ec94f58..3f718179 100644 --- a/modules/last/dotplot/meta.yml +++ b/modules/last/dotplot/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-dotplot.rst tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: diff --git a/modules/last/lastal/meta.yml b/modules/last/lastal/meta.yml index 94e76878..60d3a746 100644 --- a/modules/last/lastal/meta.yml +++ b/modules/last/lastal/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-train.rst tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL v3-or-later'] + licence: ["GPL v3-or-later"] input: - index: diff --git a/modules/last/lastdb/meta.yml b/modules/last/lastdb/meta.yml index e576fa18..53842b0a 100644 --- a/modules/last/lastdb/meta.yml +++ b/modules/last/lastdb/meta.yml @@ -12,19 +12,19 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/lastdb.rst tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fastx: type: file description: > - Sequence file in FASTA or FASTQ format. - May be compressed with gzip. + Sequence file in FASTA or FASTQ format. + May be compressed with gzip. pattern: "*.{fasta,fasta.gz,fastq,fastq.gz}" output: diff --git a/modules/last/mafconvert/meta.yml b/modules/last/mafconvert/meta.yml index 3336f315..f41506d4 100644 --- a/modules/last/mafconvert/meta.yml +++ b/modules/last/mafconvert/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/ tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL v3-or-later'] + licence: ["GPL v3-or-later"] input: - meta: diff --git a/modules/last/mafswap/meta.yml b/modules/last/mafswap/meta.yml index ce97fe97..1abfbfc5 100644 --- a/modules/last/mafswap/meta.yml +++ b/modules/last/mafswap/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/ tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: diff --git a/modules/last/postmask/meta.yml b/modules/last/postmask/meta.yml index 02e602f6..eacc96d8 100644 --- a/modules/last/postmask/meta.yml +++ b/modules/last/postmask/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-postmask.rst tool_dev_url: https://gitlab.com/mcfrith/last doi: "10.1371/journal.pone.0028819" - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: diff --git a/modules/last/split/meta.yml b/modules/last/split/meta.yml index bc16fe9a..490e0bb5 100644 --- a/modules/last/split/meta.yml +++ b/modules/last/split/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/ tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL v3-or-later'] + licence: ["GPL v3-or-later"] input: - meta: diff --git a/modules/last/train/meta.yml b/modules/last/train/meta.yml index 20c5780d..d564ec4b 100644 --- a/modules/last/train/meta.yml +++ b/modules/last/train/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-train.rst tool_dev_url: https://gitlab.com/mcfrith/last doi: "" - licence: ['GPL v3-or-later'] + licence: ["GPL v3-or-later"] input: - index: diff --git a/modules/leehom/meta.yml b/modules/leehom/meta.yml index b0d6092a..05a52743 100644 --- a/modules/leehom/meta.yml +++ b/modules/leehom/meta.yml @@ -16,7 +16,7 @@ tools: documentation: "https://github.com/grenaud/leeHom" tool_dev_url: "https://github.com/grenaud/leeHom" doi: "10.1093/nar/gku699" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -61,17 +61,16 @@ output: pattern: "*.r1.fail.fq.gz" - unmerged_r2_fq_pass: type: file - description: Passed unmerged R1 FASTQs + description: Passed unmerged R2 FASTQs pattern: "*.r2.fq.gz" - unmerged_r2_fq_pass: type: file - description: Failed unmerged R1 FASTQs + description: Failed unmerged R2 FASTQs pattern: "*.r2.fail.fq.gz" - log: type: file description: Log file of command pattern: "*.log" - authors: - "@jfy133" diff --git a/modules/legsta/main.nf b/modules/legsta/main.nf new file mode 100644 index 00000000..8e2a3ae3 --- /dev/null +++ b/modules/legsta/main.nf @@ -0,0 +1,33 @@ +process LEGSTA { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::legsta=0.5.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/legsta%3A0.5.1--hdfd78af_2': + 'quay.io/biocontainers/legsta:0.5.1--hdfd78af_2' }" + + input: + tuple val(meta), path(seqs) + + output: + tuple val(meta), path("*.tsv"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + legsta \\ + $args \\ + $seqs > ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + legsta: \$(echo \$(legsta --version 2>&1) | sed 's/^.*legsta //; s/ .*\$//;') + END_VERSIONS + """ +} diff --git a/modules/legsta/meta.yml b/modules/legsta/meta.yml new file mode 100644 index 00000000..e9ca3b43 --- /dev/null +++ b/modules/legsta/meta.yml @@ -0,0 +1,42 @@ +name: legsta +description: Typing of clinical and environmental isolates of Legionella pneumophila +keywords: + - bacteria + - legionella +tools: + - legsta: + description: In silico Legionella pneumophila Sequence Based Typing + homepage: https://github.com/tseemann/legsta + documentation: https://github.com/tseemann/legsta + tool_dev_url: https://github.com/tseemann/legsta + doi: "" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - seqs: + type: file + description: FASTA, GenBank or EMBL formatted files + pattern: "*.{fasta,gbk,embl}" + +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: Tab-delimited summary of the results + pattern: "*.{tsv}" + +authors: + - "@rpetit3" diff --git a/modules/lima/meta.yml b/modules/lima/meta.yml index 567632df..18770ef4 100644 --- a/modules/lima/meta.yml +++ b/modules/lima/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://lima.how/ tool_dev_url: https://github.com/pacificbiosciences/barcoding/ doi: "" - licence: ['BSD-3-Clause-Clear'] + licence: ["BSD-3-Clause-Clear"] input: - meta: diff --git a/modules/lissero/meta.yml b/modules/lissero/meta.yml index d4fb38df..990e2587 100644 --- a/modules/lissero/meta.yml +++ b/modules/lissero/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/MDU-PHL/LisSero/blob/master/README.md tool_dev_url: https://github.com/MDU-PHL/lissero doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -41,4 +41,3 @@ output: authors: - "@rpetit3" - diff --git a/modules/lofreq/call/meta.yml b/modules/lofreq/call/meta.yml index 97607663..972e286e 100644 --- a/modules/lofreq/call/meta.yml +++ b/modules/lofreq/call/meta.yml @@ -11,7 +11,7 @@ tools: homepage: https://csb5.github.io/lofreq/ documentation: https://csb5.github.io/lofreq/commands/ doi: "10.1093/nar/gks918 " - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/lofreq/callparallel/meta.yml b/modules/lofreq/callparallel/meta.yml index a7dbd637..cd9d9fa6 100644 --- a/modules/lofreq/callparallel/meta.yml +++ b/modules/lofreq/callparallel/meta.yml @@ -9,7 +9,7 @@ tools: homepage: https://csb5.github.io/lofreq/ documentation: https://csb5.github.io/lofreq/ doi: "10.1093/nar/gks918" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/lofreq/filter/meta.yml b/modules/lofreq/filter/meta.yml index fceee6f5..c530a092 100644 --- a/modules/lofreq/filter/meta.yml +++ b/modules/lofreq/filter/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://csb5.github.io/lofreq/ documentation: https://csb5.github.io/lofreq/commands/ doi: "10.1093/nar/gks918 " - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/lofreq/indelqual/meta.yml b/modules/lofreq/indelqual/meta.yml index a6ec7dc2..b98bf2c4 100644 --- a/modules/lofreq/indelqual/meta.yml +++ b/modules/lofreq/indelqual/meta.yml @@ -9,7 +9,7 @@ tools: description: Lofreq is a fast and sensitive variant-caller for inferring SNVs and indels from next-generation sequencing data. It's indelqual programme inserts indel qualities in a BAM file homepage: https://csb5.github.io/lofreq/ doi: "10.1093/nar/gks918" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/macrel/contigs/meta.yml b/modules/macrel/contigs/meta.yml index e0b2fabd..25473470 100644 --- a/modules/macrel/contigs/meta.yml +++ b/modules/macrel/contigs/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://macrel.readthedocs.io/en/latest/ tool_dev_url: https://github.com/BigDataBiology/macrel doi: "10.7717/peerj.10555" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/macs2/callpeak/meta.yml b/modules/macs2/callpeak/meta.yml index afb949ec..982bc5b2 100644 --- a/modules/macs2/callpeak/meta.yml +++ b/modules/macs2/callpeak/meta.yml @@ -1,10 +1,10 @@ name: macs2_callpeak description: Peak calling of enriched genomic regions of ChIP-seq and ATAC-seq experiments keywords: - - alignment - - atac-seq - - chip-seq - - peak-calling + - alignment + - atac-seq + - chip-seq + - peak-calling tools: - macs2: description: Model Based Analysis for ChIP-Seq data @@ -12,7 +12,7 @@ tools: documentation: https://docs.csc.fi/apps/macs2/ tool_dev_url: https://github.com/macs3-project/MACS doi: "https://doi.org/10.1101/496521" - licence: ['BSD'] + licence: ["BSD"] input: - meta: diff --git a/modules/mafft/main.nf b/modules/mafft/main.nf new file mode 100644 index 00000000..99485b61 --- /dev/null +++ b/modules/mafft/main.nf @@ -0,0 +1,35 @@ +process MAFFT { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::mafft=7.490" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mafft:7.490--h779adbc_0': + 'quay.io/biocontainers/mafft:7.490--h779adbc_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.fas"), emit: fas + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mafft \\ + --thread ${task.cpus} \\ + ${args} \\ + ${fasta} \\ + > ${prefix}.fas + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mafft: \$(mafft --version 2>&1 | sed 's/^v//' | sed 's/ (.*)//') + END_VERSIONS + """ +} diff --git a/modules/mafft/meta.yml b/modules/mafft/meta.yml new file mode 100644 index 00000000..66bb10b9 --- /dev/null +++ b/modules/mafft/meta.yml @@ -0,0 +1,42 @@ +name: mafft +description: Multiple sequence alignment using MAFFT +keywords: + - msa + - multiple sequence alignment +tools: + - mafft: + description: Multiple alignment program for amino acid or nucleotide sequences based on fast Fourier transform + homepage: https://mafft.cbrc.jp/alignment/software/ + documentation: https://mafft.cbrc.jp/alignment/software/manual/manual.html + tool_dev_url: https://mafft.cbrc.jp/alignment/software/source.html + doi: "10.1093/nar/gkf436" + licence: ["BSD"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file containing the sequences to align + pattern: "*.{fa,fasta}" + +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" + - fas: + type: file + description: Aligned sequences in FASTA format + pattern: "*.{fas}" + +authors: + - "@MillironX" diff --git a/modules/malt/build/meta.yml b/modules/malt/build/meta.yml index 9985d834..c8fe06f6 100644 --- a/modules/malt/build/meta.yml +++ b/modules/malt/build/meta.yml @@ -17,7 +17,7 @@ tools: documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf tool_dev_url: None doi: "10.1038/s41559-017-0446-6" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - fastas: diff --git a/modules/malt/run/main.nf b/modules/malt/run/main.nf index 99657305..4e2e50c9 100644 --- a/modules/malt/run/main.nf +++ b/modules/malt/run/main.nf @@ -1,4 +1,5 @@ process MALT_RUN { + tag "$meta.id" label 'process_high' conda (params.enable_conda ? "bioconda::malt=0.53" : null) @@ -7,21 +8,22 @@ process MALT_RUN { 'quay.io/biocontainers/malt:0.53--hdfd78af_0' }" input: - path fastqs + tuple val(meta), path(fastqs) val mode path index output: - path "*.rma6" , emit: rma6 - path "*.{tab,text,sam}", optional:true, emit: alignments - path "*.log" , emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("*.rma6") , emit: rma6 + tuple val(meta), path("*.{tab,text,sam}"), optional:true, emit: alignments + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 6 if (!task.memory) { log.info '[MALT_RUN] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.' @@ -38,7 +40,7 @@ process MALT_RUN { $args \\ --inFile ${fastqs.join(' ')} \\ -m $mode \\ - --index $index/ |&tee malt-run.log + --index $index/ |&tee ${prefix}-malt-run.log cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/malt/run/meta.yml b/modules/malt/run/meta.yml index 740ab8a5..66f2d7a9 100644 --- a/modules/malt/run/meta.yml +++ b/modules/malt/run/meta.yml @@ -16,9 +16,14 @@ tools: documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf tool_dev_url: None doi: "10.1038/s41559-017-0446-6" - licence: ['GPL v3'] + licence: ["GPL v3"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fastqs: type: file description: Input FASTQ files @@ -26,11 +31,11 @@ input: - mode: type: string description: Program mode - pattern: 'Unknown|BlastN|BlastP|BlastX|Classifier' + pattern: "Unknown|BlastN|BlastP|BlastX|Classifier" - index: type: directory description: Index/database directory from malt-build - pattern: '*/' + pattern: "*/" output: - versions: type: file @@ -47,7 +52,7 @@ output: - log: type: file description: Log of verbose MALT stdout - pattern: "malt-run.log" + pattern: "*-malt-run.log" authors: - "@jfy133" diff --git a/modules/maltextract/meta.yml b/modules/maltextract/meta.yml index 8f257100..843c1555 100644 --- a/modules/maltextract/meta.yml +++ b/modules/maltextract/meta.yml @@ -21,7 +21,7 @@ tools: documentation: https://github.com/rhuebler/hops tool_dev_url: https://github.com/rhuebler/hops doi: "https://doi.org/10.1186/s13059-019-1903-0" - licence: ['GPL 3'] + licence: ["GPL 3"] input: - rma6: diff --git a/modules/manta/germline/main.nf b/modules/manta/germline/main.nf index fab789ec..c680dc9d 100644 --- a/modules/manta/germline/main.nf +++ b/modules/manta/germline/main.nf @@ -8,11 +8,10 @@ process MANTA_GERMLINE { 'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }" input: - tuple val(meta), path(input), path(input_index) + //Matching the target bed with the input sample allows to parallelize the same sample run across different intervals or a single bed file + tuple val(meta), path(input), path(index), path(target_bed), path(target_bed_tbi) path fasta - path fai - path target_bed - path target_bed_tbi + path fasta_fai output: tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf @@ -29,13 +28,15 @@ process MANTA_GERMLINE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" + def input_files = input.collect{"--bam ${it}"}.join(' ') + def options_manta = target_bed ? "--callRegions $target_bed" : "" """ configManta.py \ - --bam $input \ + ${input_files} \ --reference $fasta \ + --runDir manta \ $options_manta \ - --runDir manta + $args python manta/runWorkflow.py -m local -j $task.cpus @@ -57,4 +58,20 @@ process MANTA_GERMLINE { manta: \$( configManta.py --version ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.candidate_small_indels.vcf.gz + touch ${prefix}.candidate_small_indels.vcf.gz.tbi + touch ${prefix}.candidate_sv.vcf.gz + touch ${prefix}.candidate_sv.vcf.gz.tbi + touch ${prefix}.diploid_sv.vcf.gz + touch ${prefix}.diploid_sv.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + manta: \$( configManta.py --version ) + END_VERSIONS + """ } diff --git a/modules/manta/germline/meta.yml b/modules/manta/germline/meta.yml index 3bdb8264..b719f075 100644 --- a/modules/manta/germline/meta.yml +++ b/modules/manta/germline/meta.yml @@ -15,7 +15,7 @@ tools: documentation: https://github.com/Illumina/manta/blob/v1.6.0/docs/userGuide/README.md tool_dev_url: https://github.com/Illumina/manta doi: "10.1093/bioinformatics/btv710" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -25,20 +25,12 @@ input: e.g. [ id:'test', single_end:false ] - input: type: file - description: BAM/CRAM/SAM file + description: BAM/CRAM/SAM file. For joint calling use a list of files. pattern: "*.{bam,cram,sam}" - - input_index: + - index: type: file - description: BAM/CRAM/SAM index file + description: BAM/CRAM/SAM index file. For joint calling use a list of files. pattern: "*.{bai,crai,sai}" - - fasta: - type: file - description: Genome reference FASTA file - pattern: "*.{fa,fasta}" - - fai: - type: file - description: Genome reference FASTA index file - pattern: "*.{fa.fai,fasta.fai}" - target_bed: type: file description: BED file containing target regions for variant calling @@ -47,6 +39,14 @@ input: type: file description: Index for BED file containing target regions for variant calling pattern: "*.{bed.tbi}" + - fasta: + type: file + description: Genome reference FASTA file + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: Genome reference FASTA index file + pattern: "*.{fa.fai,fasta.fai}" output: - meta: @@ -85,3 +85,4 @@ output: authors: - "@maxulysse" + - "@ramprasadn" diff --git a/modules/manta/somatic/main.nf b/modules/manta/somatic/main.nf index 886a8fb9..6313c38b 100644 --- a/modules/manta/somatic/main.nf +++ b/modules/manta/somatic/main.nf @@ -8,11 +8,9 @@ process MANTA_SOMATIC { 'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }" input: - tuple val(meta), path(input_normal), path(input_index_normal), path(input_tumor), path(input_index_tumor) + tuple val(meta), path(input_normal), path(input_index_normal), path(input_tumor), path(input_index_tumor), path(target_bed), path(target_bed_tbi) path fasta path fai - path target_bed - path target_bed_tbi output: tuple val(meta), path("*.candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf diff --git a/modules/manta/somatic/meta.yml b/modules/manta/somatic/meta.yml index ddd0eafe..457d66a5 100644 --- a/modules/manta/somatic/meta.yml +++ b/modules/manta/somatic/meta.yml @@ -15,7 +15,7 @@ tools: documentation: https://github.com/Illumina/manta/blob/v1.6.0/docs/userGuide/README.md tool_dev_url: https://github.com/Illumina/manta doi: "10.1093/bioinformatics/btv710" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -39,14 +39,6 @@ input: type: file description: BAM/CRAM/SAM index file pattern: "*.{bai,crai,sai}" - - fasta: - type: file - description: Genome reference FASTA file - pattern: "*.{fa,fasta}" - - fai: - type: file - description: Genome reference FASTA index file - pattern: "*.{fa.fai,fasta.fai}" - target_bed: type: file description: BED file containing target regions for variant calling @@ -55,6 +47,14 @@ input: type: file description: Index for BED file containing target regions for variant calling pattern: "*.{bed.tbi}" + - fasta: + type: file + description: Genome reference FASTA file + pattern: "*.{fa,fasta}" + - fai: + type: file + description: Genome reference FASTA index file + pattern: "*.{fa.fai,fasta.fai}" output: - meta: diff --git a/modules/manta/tumoronly/main.nf b/modules/manta/tumoronly/main.nf index 3d52b16e..3361cf82 100644 --- a/modules/manta/tumoronly/main.nf +++ b/modules/manta/tumoronly/main.nf @@ -8,11 +8,9 @@ process MANTA_TUMORONLY { 'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }" input: - tuple val(meta), path(input), path(input_index) + tuple val(meta), path(input), path(input_index), path(target_bed), path(target_bed_tbi) path fasta path fai - path target_bed - path target_bed_tbi output: tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf diff --git a/modules/manta/tumoronly/meta.yml b/modules/manta/tumoronly/meta.yml index 86d1c6c0..398d6843 100644 --- a/modules/manta/tumoronly/meta.yml +++ b/modules/manta/tumoronly/meta.yml @@ -15,7 +15,7 @@ tools: documentation: https://github.com/Illumina/manta/blob/v1.6.0/docs/userGuide/README.md tool_dev_url: https://github.com/Illumina/manta doi: "10.1093/bioinformatics/btv710" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -31,14 +31,6 @@ input: type: file description: BAM/CRAM/SAM index file pattern: "*.{bai,crai,sai}" - - fasta: - type: file - description: Genome reference FASTA file - pattern: "*.{fa,fasta}" - - fai: - type: file - description: Genome reference FASTA index file - pattern: "*.{fa.fai,fasta.fai}" - target_bed: type: file description: BED file containing target regions for variant calling @@ -47,6 +39,14 @@ input: type: file description: Index for BED file containing target regions for variant calling pattern: "*.{bed.tbi}" + - fasta: + type: file + description: Genome reference FASTA file + pattern: "*.{fa,fasta}" + - fai: + type: file + description: Genome reference FASTA index file + pattern: "*.{fa.fai,fasta.fai}" output: - meta: diff --git a/modules/mapdamage2/meta.yml b/modules/mapdamage2/meta.yml index e511a0a6..561a3960 100644 --- a/modules/mapdamage2/meta.yml +++ b/modules/mapdamage2/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://ginolhac.github.io/mapDamage/ tool_dev_url: https://github.com/ginolhac/mapDamage doi: "10.1093/bioinformatics/btt193" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -30,85 +30,85 @@ input: pattern: "*.{fasta}" 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" - - runtime_log: - type: file - description: Log file with a summary of command lines used and timestamps. - pattern: "Runtime_log.txt" - - fragmisincorporation_plot: - type: file - description: A pdf file that displays both fragmentation and misincorporation patterns. - pattern: "Fragmisincorporation_plot.pdf" - - length_plot: - type: file - description: A pdf file that displays length distribution of singleton reads per strand and cumulative frequencies of C->T at 5'-end and G->A at 3'-end are also displayed per strand. - pattern: "Length_plot.pdf" - - misincorporation: - type: file - description: Contains a table with occurrences for each type of mutations and relative positions from the reads ends. - pattern: "misincorporation.txt" - - pctot_freq: - type: file - description: Contains frequencies of Cytosine to Thymine mutations per position from the 5'-ends. - pattern: "5pCtoT_freq.txt" - - pgtoa_freq: - type: file - description: Contains frequencies of Guanine to Adenine mutations per position from the 3'-ends. - pattern: "3pGtoA_freq.txt" - - dnacomp: - type: file - description: Contains a table of the reference genome base composition per position, inside reads and adjacent regions. - pattern: "dnacomp.txt" - - lgdistribution: - type: file - description: Contains a table with read length distributions per strand. - pattern: "lgdistribution.txt" - - stats_out_mcmc_hist: - type: file - description: A MCMC histogram for the damage parameters and log likelihood. - pattern: "Stats_out_MCMC_hist.pdf" - - stats_out_mcmc_iter: - type: file - description: Values for the damage parameters and log likelihood in each MCMC iteration. - pattern: "Stats_out_MCMC_iter.csv" - - stats_out_mcmc_trace: - type: file - description: A MCMC trace plot for the damage parameters and log likelihood. - pattern: "Stats_out_MCMC_trace.pdf" - - stats_out_mcmc_iter_summ_stat: - type: file - description: Summary statistics for the damage parameters estimated posterior distributions. - pattern: "Stats_out_MCMC_iter_summ_stat.csv" - - stats_out_mcmc_post_pred: - type: file - description: Empirical misincorporation frequency and posterior predictive intervals from the fitted model. - pattern: "Stats_out_MCMC_post_pred.pdf" - - stats_out_mcmc_correct_prob: - type: file - description: Position specific probability of a C->T and G->A misincorporation is due to damage. - pattern: "Stats_out_MCMC_correct_prob.csv" - - dnacomp_genome: - type: file - description: Contains the global reference genome base composition (computed by seqtk). - pattern: "dnacomp_genome.csv" - - rescaled: - type: file - description: Rescaled BAM file, where likely post-mortem damaged bases have downscaled quality scores. - pattern: "*.{bam}" - - fasta: - type: file - description: Allignments in a FASTA file, only if flagged by -d. - pattern: "*.{fasta}" - - folder: - type: folder - description: Folder created when --plot-only, --rescale and --stats-only flags are passed. - pattern: "*/" + - 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" + - runtime_log: + type: file + description: Log file with a summary of command lines used and timestamps. + pattern: "Runtime_log.txt" + - fragmisincorporation_plot: + type: file + description: A pdf file that displays both fragmentation and misincorporation patterns. + pattern: "Fragmisincorporation_plot.pdf" + - length_plot: + type: file + description: A pdf file that displays length distribution of singleton reads per strand and cumulative frequencies of C->T at 5'-end and G->A at 3'-end are also displayed per strand. + pattern: "Length_plot.pdf" + - misincorporation: + type: file + description: Contains a table with occurrences for each type of mutations and relative positions from the reads ends. + pattern: "misincorporation.txt" + - pctot_freq: + type: file + description: Contains frequencies of Cytosine to Thymine mutations per position from the 5'-ends. + pattern: "5pCtoT_freq.txt" + - pgtoa_freq: + type: file + description: Contains frequencies of Guanine to Adenine mutations per position from the 3'-ends. + pattern: "3pGtoA_freq.txt" + - dnacomp: + type: file + description: Contains a table of the reference genome base composition per position, inside reads and adjacent regions. + pattern: "dnacomp.txt" + - lgdistribution: + type: file + description: Contains a table with read length distributions per strand. + pattern: "lgdistribution.txt" + - stats_out_mcmc_hist: + type: file + description: A MCMC histogram for the damage parameters and log likelihood. + pattern: "Stats_out_MCMC_hist.pdf" + - stats_out_mcmc_iter: + type: file + description: Values for the damage parameters and log likelihood in each MCMC iteration. + pattern: "Stats_out_MCMC_iter.csv" + - stats_out_mcmc_trace: + type: file + description: A MCMC trace plot for the damage parameters and log likelihood. + pattern: "Stats_out_MCMC_trace.pdf" + - stats_out_mcmc_iter_summ_stat: + type: file + description: Summary statistics for the damage parameters estimated posterior distributions. + pattern: "Stats_out_MCMC_iter_summ_stat.csv" + - stats_out_mcmc_post_pred: + type: file + description: Empirical misincorporation frequency and posterior predictive intervals from the fitted model. + pattern: "Stats_out_MCMC_post_pred.pdf" + - stats_out_mcmc_correct_prob: + type: file + description: Position specific probability of a C->T and G->A misincorporation is due to damage. + pattern: "Stats_out_MCMC_correct_prob.csv" + - dnacomp_genome: + type: file + description: Contains the global reference genome base composition (computed by seqtk). + pattern: "dnacomp_genome.csv" + - rescaled: + type: file + description: Rescaled BAM file, where likely post-mortem damaged bases have downscaled quality scores. + pattern: "*.{bam}" + - fasta: + type: file + description: Allignments in a FASTA file, only if flagged by -d. + pattern: "*.{fasta}" + - folder: + type: folder + description: Folder created when --plot-only, --rescale and --stats-only flags are passed. + pattern: "*/" authors: -- "@darcy220606" + - "@darcy220606" diff --git a/modules/mash/dist/meta.yml b/modules/mash/dist/meta.yml index 8cbaa63c..5ca9373e 100644 --- a/modules/mash/dist/meta.yml +++ b/modules/mash/dist/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://mash.readthedocs.io/en/latest/sketches.html tool_dev_url: https://github.com/marbl/Mash doi: "10.1186/s13059-016-0997-x" - licence: ['https://github.com/marbl/Mash/blob/master/LICENSE.txt'] + licence: ["https://github.com/marbl/Mash/blob/master/LICENSE.txt"] input: - meta: diff --git a/modules/mash/sketch/meta.yml b/modules/mash/sketch/meta.yml index fba0e000..d5c0f3a1 100644 --- a/modules/mash/sketch/meta.yml +++ b/modules/mash/sketch/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://mash.readthedocs.io/en/latest/sketches.html tool_dev_url: https://github.com/marbl/Mash doi: "10.1186/s13059-016-0997-x" - licence: ['https://github.com/marbl/Mash/blob/master/LICENSE.txt'] + licence: ["https://github.com/marbl/Mash/blob/master/LICENSE.txt"] input: - meta: diff --git a/modules/mashtree/meta.yml b/modules/mashtree/meta.yml index 3cf74772..ec5ea338 100644 --- a/modules/mashtree/meta.yml +++ b/modules/mashtree/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/lskatz/mashtree tool_dev_url: https://github.com/lskatz/mashtree doi: "https://doi.org/10.21105/joss.01762" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/maxbin2/main.nf b/modules/maxbin2/main.nf index 7b818d00..a48df43f 100644 --- a/modules/maxbin2/main.nf +++ b/modules/maxbin2/main.nf @@ -29,8 +29,9 @@ process MAXBIN2 { def prefix = task.ext.prefix ?: "${meta.id}" def associate_files = reads ? "-reads $reads" : "-abund $abund" """ + mkdir input/ && mv $contigs input/ run_MaxBin.pl \\ - -contig $contigs \\ + -contig input/$contigs \\ $associate_files \\ -thread $task.cpus \\ $args \\ diff --git a/modules/maxbin2/meta.yml b/modules/maxbin2/meta.yml index 358f8323..7971d481 100644 --- a/modules/maxbin2/meta.yml +++ b/modules/maxbin2/meta.yml @@ -16,7 +16,7 @@ tools: documentation: https://sourceforge.net/projects/maxbin/ tool_dev_url: https://sourceforge.net/projects/maxbin/ doi: "10.1093/bioinformatics/btv638" - licence: ['BSD 3-clause'] + licence: ["BSD 3-clause"] input: - meta: diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf new file mode 100644 index 00000000..2b516f1b --- /dev/null +++ b/modules/md5sum/main.nf @@ -0,0 +1,35 @@ +process MD5SUM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.md5"), emit: checksum + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + md5sum \\ + $args \\ + ${file} \\ + > ${file}.md5 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + md5sum: \$(echo \$(md5sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/md5sum/meta.yml b/modules/md5sum/meta.yml new file mode 100644 index 00000000..d4f1939d --- /dev/null +++ b/modules/md5sum/meta.yml @@ -0,0 +1,39 @@ +name: "md5sum" +description: Create an MD5 (128-bit) checksum +keywords: + - checksum +tools: + - "md5sum": + description: Create an MD5 (128-bit) checksum + homepage: "https://www.gnu.org" + documentation: "https://man7.org/linux/man-pages/man1/md5sum.1.html" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + 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" + - checksum: + type: file + description: File containing checksum + pattern: "*.md5" + +authors: + - "@matthdsm" diff --git a/modules/medaka/meta.yml b/modules/medaka/meta.yml index d194464f..66557460 100644 --- a/modules/medaka/meta.yml +++ b/modules/medaka/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://nanoporetech.github.io/medaka/index.html tool_dev_url: https://github.com/nanoporetech/medaka doi: "" - licence: ['Mozilla Public License 2.0'] + licence: ["Mozilla Public License 2.0"] input: - meta: diff --git a/modules/megahit/meta.yml b/modules/megahit/meta.yml index e4b2181b..f9572ab4 100644 --- a/modules/megahit/meta.yml +++ b/modules/megahit/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/voutcn/megahit tool_dev_url: https://github.com/voutcn/megahit doi: "10.1093/bioinformatics/btv033" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -24,8 +24,8 @@ input: - reads: type: file description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively in gzipped or uncompressed FASTQ or FASTA format. + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively in gzipped or uncompressed FASTQ or FASTA format. output: - meta: diff --git a/modules/megan/rma2info/main.nf b/modules/megan/rma2info/main.nf new file mode 100644 index 00000000..80d1975d --- /dev/null +++ b/modules/megan/rma2info/main.nf @@ -0,0 +1,38 @@ +process MEGAN_RMA2INFO { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::megan=6.21.7" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/megan:6.21.7--h9ee0642_0': + 'quay.io/biocontainers/megan:6.21.7--h9ee0642_0' }" + + input: + tuple val(meta), path(rma6) + val(megan_summary) + + output: + tuple val(meta), path("*.txt.gz") , emit: txt + tuple val(meta), path("*.megan"), optional: true, emit: megan_summary + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def summary = megan_summary ? "-es ${prefix}.megan" : "" + """ + rma2info \\ + -i ${rma6} \\ + -o ${prefix}.txt.gz \\ + ${summary} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + megan: \$(echo \$(rma2info 2>&1) | grep version | sed 's/.*version //g;s/, built.*//g') + END_VERSIONS + """ +} diff --git a/modules/megan/rma2info/meta.yml b/modules/megan/rma2info/meta.yml new file mode 100644 index 00000000..0f2d5a9b --- /dev/null +++ b/modules/megan/rma2info/meta.yml @@ -0,0 +1,51 @@ +name: "megan_rma2info" +description: Analyses an RMA file and exports information in text format +keywords: + - megan + - rma6 + - classification + - conversion +tools: + - "megan": + description: "A tool for studying the taxonomic content of a set of DNA reads" + homepage: "https://uni-tuebingen.de/fakultaeten/mathematisch-naturwissenschaftliche-fakultaet/fachbereiche/informatik/lehrstuehle/algorithms-in-bioinformatics/software/megan6/" + documentation: "https://software-ab.informatik.uni-tuebingen.de/download/megan6/welcome.html" + tool_dev_url: "https://github.com/husonlab/megan-ce" + doi: "10.1371/journal.pcbi.1004957" + licence: "['GPL >=3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - rma6: + type: file + description: RMA6 file from MEGAN or MALT + pattern: "*.rma6" + - megan_summary: + type: boolean + description: Specify whether to generate an MEGAN summary file + +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: Compressed text file + pattern: "*.txt.gz" + - megan_summary: + type: file + description: Optionally generated MEGAN summary file + pattern: "*.megan" + +authors: + - "@jfy133" diff --git a/modules/meningotype/meta.yml b/modules/meningotype/meta.yml index 07c2ff5e..fdef2836 100644 --- a/modules/meningotype/meta.yml +++ b/modules/meningotype/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/MDU-PHL/meningotype tool_dev_url: https://github.com/MDU-PHL/meningotype doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/meryl/count/main.nf b/modules/meryl/count/main.nf new file mode 100644 index 00000000..f7a2811d --- /dev/null +++ b/modules/meryl/count/main.nf @@ -0,0 +1,37 @@ +process MERYL_COUNT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::meryl=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1': + 'quay.io/biocontainers/meryl:1.3--h87f3376_1' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.meryldb"), emit: meryl_db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + for READ in $reads; do + meryl count \\ + threads=$task.cpus \\ + $args \\ + $reads \\ + output read.\${READ%.f*}.meryldb + done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml new file mode 100644 index 00000000..854f8759 --- /dev/null +++ b/modules/meryl/count/meta.yml @@ -0,0 +1,43 @@ +name: "meryl_count" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - count +tools: + - "meryl": + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" + doi: "" + licence: "['GPL']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + +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" + - meryl_db: + type: directory + description: A Meryl k-mer database + pattern: "*.meryldb" + +authors: + - "@mahesh-panchal" diff --git a/modules/meryl/histogram/main.nf b/modules/meryl/histogram/main.nf new file mode 100644 index 00000000..a1f18f05 --- /dev/null +++ b/modules/meryl/histogram/main.nf @@ -0,0 +1,34 @@ +process MERYL_HISTOGRAM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::meryl=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1': + 'quay.io/biocontainers/meryl:1.3--h87f3376_1' }" + + input: + tuple val(meta), path(meryl_db) + + output: + tuple val(meta), path("*.hist"), emit: hist + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + meryl histogram \\ + threads=$task.cpus \\ + $args \\ + $meryl_db > ${prefix}.hist + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/histogram/meta.yml b/modules/meryl/histogram/meta.yml new file mode 100644 index 00000000..b786e076 --- /dev/null +++ b/modules/meryl/histogram/meta.yml @@ -0,0 +1,41 @@ +name: "meryl_histogram" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - histogram +tools: + - "meryl": + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" + doi: "" + licence: "['GPL']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - meryl_dbs: + type: directory + description: Meryl k-mer database + +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" + - hist: + type: file + description: Histogram of k-mers + pattern: "*.hist" + +authors: + - "@mahesh-panchal" diff --git a/modules/meryl/unionsum/main.nf b/modules/meryl/unionsum/main.nf new file mode 100644 index 00000000..98baa870 --- /dev/null +++ b/modules/meryl/unionsum/main.nf @@ -0,0 +1,35 @@ +process MERYL_UNIONSUM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::meryl=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1': + 'quay.io/biocontainers/meryl:1.3--h87f3376_1' }" + + input: + tuple val(meta), path(meryl_dbs) + + output: + tuple val(meta), path("*.unionsum.meryldb"), emit: meryl_db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + meryl union-sum \\ + threads=$task.cpus \\ + $args \\ + output ${prefix}.unionsum.meryldb \\ + $meryl_dbs + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/unionsum/meta.yml b/modules/meryl/unionsum/meta.yml new file mode 100644 index 00000000..cea7f0f6 --- /dev/null +++ b/modules/meryl/unionsum/meta.yml @@ -0,0 +1,41 @@ +name: "meryl_unionsum" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - unionsum +tools: + - "meryl": + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" + doi: "" + licence: "['GPL']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - meryl_dbs: + type: directory + description: Meryl k-mer databases + +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" + - meryl_db: + type: directory + description: A Meryl k-mer database that is the union sum of the input databases + pattern: "*.unionsum.meryldb" + +authors: + - "@mahesh-panchal" diff --git a/modules/metabat2/jgisummarizebamcontigdepths/meta.yml b/modules/metabat2/jgisummarizebamcontigdepths/meta.yml index 351a4701..ff0ab40e 100644 --- a/modules/metabat2/jgisummarizebamcontigdepths/meta.yml +++ b/modules/metabat2/jgisummarizebamcontigdepths/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://bitbucket.org/berkeleylab/metabat/src/master/ tool_dev_url: https://bitbucket.org/berkeleylab/metabat/src/master/ doi: "10.7717/peerj.7359" - licence: ['BSD-3-clause-LBNL'] + licence: ["BSD-3-clause-LBNL"] input: - meta: diff --git a/modules/metabat2/metabat2/meta.yml b/modules/metabat2/metabat2/meta.yml index 0ec07b02..04b8df4f 100644 --- a/modules/metabat2/metabat2/meta.yml +++ b/modules/metabat2/metabat2/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://bitbucket.org/berkeleylab/metabat/src/master/ tool_dev_url: https://bitbucket.org/berkeleylab/metabat/src/master/ doi: "10.7717/peerj.7359" - licence: ['BSD-3-clause-LBNL'] + licence: ["BSD-3-clause-LBNL"] input: - meta: @@ -28,8 +28,8 @@ input: - depth: type: file description: | - Optional text file listing the coverage per contig pre-generated - by metabat2_jgisummarizebamcontigdepths + Optional text file listing the coverage per contig pre-generated + by metabat2_jgisummarizebamcontigdepths pattern: "*.txt" output: @@ -63,7 +63,6 @@ output: description: cluster memberships as a matrix format. pattern: "*.tsv.gz" - authors: - "@maxibor" - "@jfy133" diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 3fc6b277..bff0eb9a 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -23,7 +23,7 @@ process METAPHLAN3 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_type = ("$input".endsWith(".fastq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" + def input_type = ("$input".endsWith(".fastq.gz") || "$input".endsWith(".fq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" diff --git a/modules/metaphlan3/meta.yml b/modules/metaphlan3/meta.yml index 0d3c6f85..d10a27d7 100644 --- a/modules/metaphlan3/meta.yml +++ b/modules/metaphlan3/meta.yml @@ -8,11 +8,11 @@ keywords: - fasta tools: - metaphlan3: - description: Identify clades (phyla to species) present in the metagenome obtained from a microbiome sample and their relative abundance + description: Identify clades (phyla to species) present in the metagenome obtained from a microbiome sample and their relative abundance homepage: https://huttenhower.sph.harvard.edu/metaphlan/ documentation: https://github.com/biobakery/MetaPhlAn doi: "10.7554/eLife.65088" - licence: ['MIT License'] + licence: ["MIT License"] input: - meta: diff --git a/modules/methyldackel/extract/meta.yml b/modules/methyldackel/extract/meta.yml index 3c1dfb2a..810f2456 100644 --- a/modules/methyldackel/extract/meta.yml +++ b/modules/methyldackel/extract/meta.yml @@ -1,58 +1,58 @@ name: methyldackel_extract description: Extracts per-base methylation metrics from alignments keywords: - - methylation - - 5mC - - methylseq - - bisulphite - - consensus - - bedGraph - - bam - - cram + - methylation + - 5mC + - methylseq + - bisulphite + - consensus + - bedGraph + - bam + - cram tools: - - methyldackel: - description: | - A (mostly) universal methylation extractor - for BS-seq experiments. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 - licence: ['MIT'] + - methyldackel: + description: | + A (mostly) universal methylation extractor + for BS-seq experiments. + homepage: https://github.com/brentp/bwa-meth + documentation: https://github.com/brentp/bwa-meth + arxiv: arXiv:1401.1129 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file - pattern: "*.{fasta,fa}" - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" - - bam: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: BAM/CRAM index file - pattern: "*.{bai,crai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file + pattern: "*.{fasta,fa}" + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bedgraph: - type: file - description: bedGraph file containing per-base methylation metrics - pattern: "*.{bedGraph}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bedgraph: + type: file + description: bedGraph file containing per-base methylation metrics + pattern: "*.{bedGraph}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/methyldackel/mbias/meta.yml b/modules/methyldackel/mbias/meta.yml index e66cde50..a83ca106 100644 --- a/modules/methyldackel/mbias/meta.yml +++ b/modules/methyldackel/mbias/meta.yml @@ -1,59 +1,59 @@ name: methyldackel_mbias description: Generates methylation bias plots from alignments keywords: - - methylation - - 5mC - - methylseq - - bisulphite - - methylation bias - - mbias - - qc - - bam - - cram + - methylation + - 5mC + - methylseq + - bisulphite + - methylation bias + - mbias + - qc + - bam + - cram tools: - - methyldackel: - description: | - A (mostly) universal methylation extractor - for BS-seq experiments. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 - licence: ['MIT'] + - methyldackel: + description: | + A (mostly) universal methylation extractor + for BS-seq experiments. + homepage: https://github.com/brentp/bwa-meth + documentation: https://github.com/brentp/bwa-meth + arxiv: arXiv:1401.1129 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file - pattern: "*.{fasta,fa}" - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" - - bam: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: BAM/CRAM index file - pattern: "*.{bai,crai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file + pattern: "*.{fasta,fa}" + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - txt: - type: file - description: Text file containing methylation bias - pattern: "*.{txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - txt: + type: file + description: Text file containing methylation bias + pattern: "*.{txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/minia/meta.yml b/modules/minia/meta.yml index 397a1d49..ae86f75c 100644 --- a/modules/minia/meta.yml +++ b/modules/minia/meta.yml @@ -9,7 +9,7 @@ tools: a human genome on a desktop computer in a day. The output of Minia is a set of contigs. homepage: https://github.com/GATB/minia documentation: https://github.com/GATB/minia - licence: ['AGPL-3.0-or-later'] + licence: ["AGPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/miniasm/meta.yml b/modules/miniasm/meta.yml index e8aedb9a..59865945 100644 --- a/modules/miniasm/meta.yml +++ b/modules/miniasm/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/lh3/miniasm tool_dev_url: https://github.com/lh3/miniasm doi: "10.1093/bioinformatics/btw152" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index fe06f14d..08ac6eef 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -2,18 +2,22 @@ process MINIMAP2_ALIGN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::minimap2=2.21' : null) + conda (params.enable_conda ? 'bioconda::minimap2=2.21 bioconda::samtools=1.12' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.21--h5bf99c6_0' : - 'quay.io/biocontainers/minimap2:2.21--h5bf99c6_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" input: tuple val(meta), path(reads) path reference + val bam_format + val cigar_paf_format + val cigar_bam output: - tuple val(meta), path("*.paf"), emit: paf - path "versions.yml" , emit: versions + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,13 +26,19 @@ process MINIMAP2_ALIGN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" + def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' """ minimap2 \\ $args \\ -t $task.cpus \\ $reference \\ $input_reads \\ - > ${prefix}.paf + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/minimap2/align/meta.yml b/modules/minimap2/align/meta.yml index 9994fb05..991b39a0 100644 --- a/modules/minimap2/align/meta.yml +++ b/modules/minimap2/align/meta.yml @@ -1,47 +1,65 @@ name: minimap2_align description: A versatile pairwise aligner for genomic and spliced nucleotide sequences keywords: - - align - - fasta - - fastq - - genome - - paf - - reference + - align + - fasta + - fastq + - genome + - paf + - reference tools: - - minimap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lh3/minimap2 - documentation: https://github.com/lh3/minimap2#uguide - licence: ['MIT'] + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FASTA or FASTQ files of size 1 and 2 for single-end - and paired-end data, respectively. - - reference: - type: file - description: | - Reference database in FASTA format. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FASTA or FASTQ files of size 1 and 2 for single-end + and paired-end data, respectively. + - reference: + type: file + description: | + Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - paf: - type: file - description: Alignment in PAF format - pattern: "*.paf" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: Alignment in PAF format + pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/modules/minimap2/index/meta.yml b/modules/minimap2/index/meta.yml index 78a39bdd..3bf9f043 100644 --- a/modules/minimap2/index/meta.yml +++ b/modules/minimap2/index/meta.yml @@ -1,30 +1,30 @@ name: minimap2_index description: Provides fasta index required by minimap2 alignment. keywords: - - index - - fasta - - reference + - index + - fasta + - reference tools: - - minimap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lh3/minimap2 - documentation: https://github.com/lh3/minimap2#uguide - licence: ['MIT'] + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] input: - - fasta: - type: file - description: | - Reference database in FASTA format. + - fasta: + type: file + description: | + Reference database in FASTA format. output: - - mmi: - type: file - description: Minimap2 fasta index. - pattern: "*.mmi" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - mmi: + type: file + description: Minimap2 fasta index. + pattern: "*.mmi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" - - "@drpatelh" + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/mlst/meta.yml b/modules/mlst/meta.yml index e9d2a09f..63667f96 100644 --- a/modules/mlst/meta.yml +++ b/modules/mlst/meta.yml @@ -9,7 +9,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: diff --git a/modules/mobsuite/recon/main.nf b/modules/mobsuite/recon/main.nf new file mode 100644 index 00000000..9ca7e180 --- /dev/null +++ b/modules/mobsuite/recon/main.nf @@ -0,0 +1,45 @@ +process MOBSUITE_RECON { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::mob_suite=3.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mob_suite%3A3.0.3--pyhdfd78af_0': + 'quay.io/biocontainers/mob_suite:3.0.3--pyhdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("results/chromosome.fasta") , emit: chromosome + tuple val(meta), path("results/contig_report.txt") , emit: contig_report + tuple val(meta), path("results/plasmid_*.fasta") , emit: plasmids , optional: true + tuple val(meta), path("results/mobtyper_results.txt"), emit: mobtyper_results, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def is_compressed = fasta.getName().endsWith(".gz") ? true : false + def fasta_name = fasta.getName().replace(".gz", "") + """ + if [ "$is_compressed" == "true" ]; then + gzip -c -d $fasta > $fasta_name + fi + + mob_recon \\ + --infile $fasta_name \\ + $args \\ + --num_threads $task.cpus \\ + --outdir results \\ + --sample_id $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mobsuite: \$(echo \$(mob_recon --version 2>&1) | sed 's/^.*mob_recon //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/mobsuite/recon/meta.yml b/modules/mobsuite/recon/meta.yml new file mode 100644 index 00000000..ef77e1e0 --- /dev/null +++ b/modules/mobsuite/recon/meta.yml @@ -0,0 +1,54 @@ +name: mobsuite_recon +description: A tool to reconstruct plasmids in bacterial assemblies +keywords: + - bacteria + - plasmid +tools: + - mobsuite: + description: Software tools for clustering, reconstruction and typing of plasmids from draft assemblies. + homepage: https://github.com/phac-nml/mob-suite + documentation: https://github.com/phac-nml/mob-suite + tool_dev_url: https://github.com/phac-nml/mob-suite + doi: "10.1099/mgen.0.000435" + licence: ["Apache License, Version 2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: A bacterial genome assembly in FASTA format + pattern: "*.{fasta,fa,fna}" + +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" + - chromosome: + type: file + description: FASTA file of all contigs found to belong to the chromosome + pattern: "chromosome.fasta" + - contig_report: + type: file + description: Assignment of the contig to chromosome or a particular plasmid grouping + pattern: "contig_report.txt" + - plasmids: + type: file + description: Each plasmid group is written to an individual FASTA + pattern: "plasmid_*.fasta" + - mobtyper_results: + type: file + description: Aggregate MOB-typer report files for all identified plasmid + pattern: "mobtyper_results.txt" + +authors: + - "@rpetit3" diff --git a/modules/mosdepth/main.nf b/modules/mosdepth/main.nf index cc7bc86b..ff91e06f 100644 --- a/modules/mosdepth/main.nf +++ b/modules/mosdepth/main.nf @@ -2,10 +2,10 @@ process MOSDEPTH { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::mosdepth=0.3.2' : null) + conda (params.enable_conda ? 'bioconda::mosdepth=0.3.3' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.2--h01d7912_0' : - 'quay.io/biocontainers/mosdepth:0.3.2--h01d7912_0' }" + 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.3--hdfd78af_1' : + 'quay.io/biocontainers/mosdepth:0.3.3--hdfd78af_1'}" input: tuple val(meta), path(bam), path(bai) @@ -14,12 +14,13 @@ process MOSDEPTH { output: tuple val(meta), path('*.global.dist.txt') , emit: global_txt - tuple val(meta), path('*.region.dist.txt') , emit: regions_txt + tuple val(meta), path('*.region.dist.txt') , emit: regions_txt , optional:true tuple val(meta), path('*.summary.txt') , emit: summary_txt - tuple val(meta), path('*.per-base.bed.gz') , emit: per_base_bed - tuple val(meta), path('*.per-base.bed.gz.csi'), emit: per_base_csi - tuple val(meta), path('*.regions.bed.gz') , emit: regions_bed - tuple val(meta), path('*.regions.bed.gz.csi') , emit: regions_csi + tuple val(meta), path('*.per-base.d4') , emit: d4 , optional:true + tuple val(meta), path('*.per-base.bed.gz') , emit: per_base_bed, optional:true + tuple val(meta), path('*.per-base.bed.gz.csi'), emit: per_base_csi, optional:true + tuple val(meta), path('*.regions.bed.gz') , emit: regions_bed , optional:true + tuple val(meta), path('*.regions.bed.gz.csi') , emit: regions_csi , optional:true path "versions.yml" , emit: versions when: @@ -28,7 +29,13 @@ process MOSDEPTH { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def interval = window_size ? "--by ${window_size}" : "--by ${bed}" + if (window_size) { + interval = "--by ${window_size}" + } else if ( bed ) { + interval = "--by ${bed}" + } else { + interval = "" + } """ mosdepth \\ $interval \\ @@ -40,4 +47,22 @@ process MOSDEPTH { mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.global.dist.txt + touch ${prefix}.region.dist.txt + touch ${prefix}.summary.txt + touch ${prefix}.per-base.d4 + touch ${prefix}.per-base.bed.gz + touch ${prefix}.per-base.bed.gz.csi + touch ${prefix}.regions.bed.gz + touch ${prefix}.regions.bed.gz.csi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/mosdepth/meta.yml b/modules/mosdepth/meta.yml index be568aa6..636e966b 100644 --- a/modules/mosdepth/meta.yml +++ b/modules/mosdepth/meta.yml @@ -11,7 +11,7 @@ tools: Fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing. documentation: https://github.com/brentp/mosdepth doi: 10.1093/bioinformatics/btx699 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map @@ -73,5 +73,6 @@ output: description: File containing software versions pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" + - "@ramprasadn" diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..317624b5 --- /dev/null +++ b/modules/motus/downloaddb/main.nf @@ -0,0 +1,39 @@ +process MOTUS_DOWNLOADDB { + label 'process_low' + + conda (params.enable_conda ? "bioconda::motus=3.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" + + input: + path motus_downloaddb_script + + output: + path "db_mOTU/" , emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def software = "${motus_downloaddb_script.simpleName}_copy.py" + """ + ## must copy script file to working directory, + ## otherwise the reference_db will be download to bin folder + ## other than current directory + cp $motus_downloaddb_script ${software} + python ${software} \\ + $args \\ + -t $task.cpus + + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + END_VERSIONS + """ +} diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml new file mode 100644 index 00000000..64df5ee0 --- /dev/null +++ b/modules/motus/downloaddb/meta.yml @@ -0,0 +1,39 @@ +name: "motus_downloaddb" +description: Download the mOTUs database +keywords: + - classify + - metagenomics + - fastq + - taxonomic profiling + - database + - download +tools: + - "motus": + description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." + homepage: "None" + documentation: "https://github.com/motu-tool/mOTUs/wiki" + tool_dev_url: "https://github.com/motu-tool/mOTUs" + doi: "10.1038/s41467-019-08844-4" + licence: "['GPL v3']" + +input: + - motus_downloaddb: + type: directory + description: | + The mOTUs downloadDB script source file. + It is the source file installed or + remote source in github such as https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py + pattern: "downloadDB.py" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: directory + description: The mOTUs database directory + pattern: "db_mOTU" + +authors: + - "@jianhong" diff --git a/modules/msisensor/msi/meta.yml b/modules/msisensor/msi/meta.yml index e3f13e2e..5f291994 100644 --- a/modules/msisensor/msi/meta.yml +++ b/modules/msisensor/msi/meta.yml @@ -10,7 +10,7 @@ tools: documentation: None tool_dev_url: None doi: "10.1093/bioinformatics/btt755" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/msisensor/scan/meta.yml b/modules/msisensor/scan/meta.yml index 4900f8cc..5976166d 100644 --- a/modules/msisensor/scan/meta.yml +++ b/modules/msisensor/scan/meta.yml @@ -10,7 +10,7 @@ tools: documentation: None tool_dev_url: None doi: "10.1093/bioinformatics/btt755" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/msisensorpro/msi_somatic/main.nf b/modules/msisensorpro/msi_somatic/main.nf new file mode 100644 index 00000000..e2da70de --- /dev/null +++ b/modules/msisensorpro/msi_somatic/main.nf @@ -0,0 +1,47 @@ +process MSISENSORPRO_MSI_SOMATIC { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::msisensor-pro=1.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/msisensor-pro:1.2.0--hfc31af2_0' : + 'quay.io/biocontainers/msisensor-pro:1.2.0--hfc31af2_0' }" + + input: + tuple val(meta), path(normal), path(normal_index), path(tumor), path(tumor_index), path(intervals) + path (fasta) + path (msisensor_scan) + + output: + tuple val(meta), path("${prefix}") , emit: output_report + tuple val(meta), path("${prefix}_dis") , emit: output_dis + tuple val(meta), path("${prefix}_germline"), emit: output_germline + tuple val(meta), path("${prefix}_somatic") , emit: output_somatic + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def fasta = fasta ? "-g ${fasta}" : "" + def intervals = intervals ? " -e ${intervals} " : "" + """ + msisensor-pro \\ + msi \\ + -d ${msisensor_scan} \\ + -n ${normal} \\ + -t ${tumor} \\ + ${fasta} \\ + -o $prefix \\ + -b ${task.cpus} \\ + ${intervals} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\sv([0-9]\\.[0-9])/\\1/ p') + END_VERSIONS + """ +} diff --git a/modules/msisensorpro/msi_somatic/meta.yml b/modules/msisensorpro/msi_somatic/meta.yml new file mode 100644 index 00000000..7caa1c1a --- /dev/null +++ b/modules/msisensorpro/msi_somatic/meta.yml @@ -0,0 +1,80 @@ +name: msisensorpro_msi_somatic +description: MSIsensor-pro evaluates Microsatellite Instability (MSI) for cancer patients with next generation sequencing data. It accepts the whole genome sequencing, whole exome sequencing and target region (panel) sequencing data as input +keywords: + - micro-satellite-scan + - msisensor-pro + - msi + - somatic +tools: + - msisensorpro: + description: Microsatellite Instability (MSI) detection using high-throughput sequencing data. + homepage: https://github.com/xjtu-omics/msisensor-pro + documentation: https://github.com/xjtu-omics/msisensor-pro/wiki + tool_dev_url: https://github.com/xjtu-omics/msisensor-pro + doi: "doi.org/10.1016/j.gpb.2020.02.001" + licence: ["Custom Licence"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - normal: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - normal_index: + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + - tumor: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - tumor_index: + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + - intervals: + type: file + description: bed file containing interval information, optional + pattern: "*.{bed}" + - fasta: + type: file + description: Reference genome + pattern: "*.{fasta}" + - msisensor_scan: + type: file + description: Output from msisensor-pro/scan, conaining list of msi regions + pattern: "*.list" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - output_report: + type: file + description: File containing final report with all detected microsatellites, unstable somatic microsatellites, msi score + - output_dis: + type: file + description: File containing distribution results + - output_germline: + type: file + description: File containing germline results + - output_somatic: + type: file + description: File containing somatic results + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - list: + type: file + description: File containing microsatellite list + pattern: "*.{list}" + +authors: + - "@FriederikeHanssen" diff --git a/modules/msisensorpro/scan/main.nf b/modules/msisensorpro/scan/main.nf new file mode 100644 index 00000000..752606d6 --- /dev/null +++ b/modules/msisensorpro/scan/main.nf @@ -0,0 +1,35 @@ +process MSISENSORPRO_SCAN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::msisensor-pro=1.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/msisensor-pro:1.2.0--hfc31af2_0' : + 'quay.io/biocontainers/msisensor-pro:1.2.0--hfc31af2_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.list"), emit: list + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + msisensor-pro \\ + scan \\ + -d $fasta \\ + -o ${prefix}.msisensor_scan.list \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\sv([0-9]\\.[0-9])/\\1/ p') + END_VERSIONS + """ +} diff --git a/modules/msisensorpro/scan/meta.yml b/modules/msisensorpro/scan/meta.yml new file mode 100644 index 00000000..27f5bc0f --- /dev/null +++ b/modules/msisensorpro/scan/meta.yml @@ -0,0 +1,43 @@ +name: msisensorpro_scan +description: MSIsensor-pro evaluates Microsatellite Instability (MSI) for cancer patients with next generation sequencing data. It accepts the whole genome sequencing, whole exome sequencing and target region (panel) sequencing data as input +keywords: + - micro-satellite-scan + - msisensor-pro + - scan +tools: + - msisensorpro: + description: Microsatellite Instability (MSI) detection using high-throughput sequencing data. + homepage: https://github.com/xjtu-omics/msisensor-pro + documentation: https://github.com/xjtu-omics/msisensor-pro/wiki + tool_dev_url: https://github.com/xjtu-omics/msisensor-pro + doi: "doi.org/10.1016/j.gpb.2020.02.001" + licence: ["Custom Licence"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference genome + pattern: "*.{fasta}" + +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" + - list: + type: file + description: File containing microsatellite list + pattern: "*.{list}" + +authors: + - "@FriederikeHanssen" diff --git a/modules/mtnucratio/meta.yml b/modules/mtnucratio/meta.yml index 824af397..b8cdef36 100644 --- a/modules/mtnucratio/meta.yml +++ b/modules/mtnucratio/meta.yml @@ -15,7 +15,7 @@ tools: documentation: https://github.com/apeltzer/MTNucRatioCalculator tool_dev_url: https://github.com/apeltzer/MTNucRatioCalculator doi: "10.1186/s13059-016-0918-z" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index 0ff7cac1..ae019dbf 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_medium' - conda (params.enable_conda ? 'bioconda::multiqc=1.11' : null) + conda (params.enable_conda ? 'bioconda::multiqc=1.12' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.12--pyhdfd78af_0' }" input: path multiqc_files @@ -28,4 +28,16 @@ process MULTIQC { multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) END_VERSIONS """ + + stub: + """ + touch multiqc_data + touch multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ } diff --git a/modules/multiqc/meta.yml b/modules/multiqc/meta.yml index 63c75a45..6fa891ef 100644 --- a/modules/multiqc/meta.yml +++ b/modules/multiqc/meta.yml @@ -1,40 +1,40 @@ name: MultiQC description: Aggregate results from bioinformatics analyses across many samples into a single report keywords: - - QC - - bioinformatics tools - - Beautiful stand-alone HTML report + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report tools: - - multiqc: - description: | - MultiQC searches a given directory for analysis logs and compiles a HTML report. - It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. - homepage: https://multiqc.info/ - documentation: https://multiqc.info/docs/ - licence: ['GPL-3.0-or-later'] + - multiqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ + licence: ["GPL-3.0-or-later"] input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC output: - - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - type: dir - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - report: + type: file + description: MultiQC report file + pattern: "multiqc_report.html" + - data: + type: dir + description: MultiQC data dir + pattern: "multiqc_data" + - plots: + type: file + description: Plots created by MultiQC + pattern: "*_data" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@abhi18av" - - "@bunop" - - "@drpatelh" + - "@abhi18av" + - "@bunop" + - "@drpatelh" diff --git a/modules/mummer/meta.yml b/modules/mummer/meta.yml index 5f7a983c..ec4f0c86 100644 --- a/modules/mummer/meta.yml +++ b/modules/mummer/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://mummer.sourceforge.net/ tool_dev_url: http://mummer.sourceforge.net/ doi: https://doi.org/10.1186/gb-2004-5-2-r12 - licence: ['The Artistic License'] + licence: ["The Artistic License"] input: - meta: diff --git a/modules/muscle/meta.yml b/modules/muscle/meta.yml index d28afa72..274cc68d 100644 --- a/modules/muscle/meta.yml +++ b/modules/muscle/meta.yml @@ -1,15 +1,15 @@ name: muscle description: MUSCLE is a program for creating multiple alignments of amino acid or nucleotide sequences. A range of options are provided that give you the choice of optimizing accuracy, speed, or some compromise between the two keywords: - - msa - - multiple sequence alignment + - msa + - multiple sequence alignment tools: - muscle: - description: MUSCLE is a multiple sequence alignment tool with high accuracy and throughput - homepage: https://www.drive5.com/muscle - documentation: http://www.drive5.com/muscle/muscle.html#_Toc81224840 - doi: "https://pubmed.ncbi.nlm.nih.gov/15034147/" - licence: ['http://www.drive5.com/muscle/manual/license.html'] + description: MUSCLE is a multiple sequence alignment tool with high accuracy and throughput + homepage: https://www.drive5.com/muscle + documentation: http://www.drive5.com/muscle/muscle.html#_Toc81224840 + doi: "https://pubmed.ncbi.nlm.nih.gov/15034147/" + licence: ["http://www.drive5.com/muscle/manual/license.html"] input: - fasta: type: file diff --git a/modules/nanolyse/meta.yml b/modules/nanolyse/meta.yml index 326fc221..c5562a04 100644 --- a/modules/nanolyse/meta.yml +++ b/modules/nanolyse/meta.yml @@ -1,47 +1,47 @@ name: nanolyse description: DNA contaminant removal using NanoLyse keywords: - - contaminant_removal + - contaminant_removal tools: - - nanolyse: - description: | - DNA contaminant removal using NanoLyse - homepage: https://github.com/wdecoster/nanolyse - documentation: https://github.com/wdecoster/nanolyse#nanolyse - licence: ['GPL-3.0-or-later'] + - nanolyse: + description: | + DNA contaminant removal using NanoLyse + homepage: https://github.com/wdecoster/nanolyse + documentation: https://github.com/wdecoster/nanolyse#nanolyse + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fastq: - type: file - description: | - Basecalled reads in FASTQ.GZ format - pattern: "*.fastq.gz" - - fasta: - type: file - description: | - A reference fasta file against which to filter. - pattern: "*.fasta" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: | + Basecalled reads in FASTQ.GZ format + pattern: "*.fastq.gz" + - fasta: + type: file + description: | + A reference fasta file against which to filter. + pattern: "*.fasta" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fastq: - type: file - description: Reads with contaminants removed in FASTQ format - pattern: "*.fastq.gz" - - log: - type: file - description: Log of the Nanolyse run. - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: Reads with contaminants removed in FASTQ format + pattern: "*.fastq.gz" + - log: + type: file + description: Log of the Nanolyse run. + pattern: "*.log" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" + - "@yuukiiwa" diff --git a/modules/nanoplot/meta.yml b/modules/nanoplot/meta.yml index 52ebb622..28c8c2d3 100644 --- a/modules/nanoplot/meta.yml +++ b/modules/nanoplot/meta.yml @@ -1,59 +1,59 @@ name: nanoplot description: Run NanoPlot on nanopore-sequenced reads keywords: - - quality control - - qc - - fastq - - sequencing summary - - nanopore + - quality control + - qc + - fastq + - sequencing summary + - nanopore tools: - - nanoplot: - description: | - NanoPlot is a tool for ploting long-read sequencing data and - alignment. - homepage: http://nanoplot.bioinf.be - documentation: https://github.com/wdecoster/NanoPlot - licence: ['GPL-3.0-or-later'] + - nanoplot: + description: | + NanoPlot is a tool for ploting long-read sequencing data and + alignment. + homepage: http://nanoplot.bioinf.be + documentation: https://github.com/wdecoster/NanoPlot + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fastq: - type: file - description: | - List of input basecalled-FastQ files. - - summary_txt: - type: file - description: | - List of sequencing_summary.txt files from running basecalling. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: | + List of input basecalled-FastQ files. + - summary_txt: + type: file + description: | + List of sequencing_summary.txt files from running basecalling. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - html: - type: file - description: NanoPlot report - pattern: "*{.html}" - - png: - type: file - description: Plots generated by NanoPlot - pattern: "*{.png}" - - txt: - type: file - description: Stats from NanoPlot - pattern: "*{.txt}" - - log: - type: file - description: log file of NanoPlot run - pattern: "*{.log}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - html: + type: file + description: NanoPlot report + pattern: "*{.html}" + - png: + type: file + description: Plots generated by NanoPlot + pattern: "*{.png}" + - txt: + type: file + description: Stats from NanoPlot + pattern: "*{.txt}" + - log: + type: file + description: log file of NanoPlot run + pattern: "*{.log}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@yuukiiwa" + - "@drpatelh" + - "@yuukiiwa" diff --git a/modules/ncbigenomedownload/meta.yml b/modules/ncbigenomedownload/meta.yml index fd9e0a45..b4ff842a 100644 --- a/modules/ncbigenomedownload/meta.yml +++ b/modules/ncbigenomedownload/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/kblin/ncbi-genome-download tool_dev_url: https://github.com/kblin/ncbi-genome-download doi: "" - licence: ['Apache Software License'] + licence: ["Apache Software License"] input: - meta: diff --git a/modules/nextclade/datasetget/meta.yml b/modules/nextclade/datasetget/meta.yml index 1246d918..d5f65cda 100644 --- a/modules/nextclade/datasetget/meta.yml +++ b/modules/nextclade/datasetget/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/nextstrain/nextclade tool_dev_url: https://github.com/nextstrain/nextclade doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - dataset: diff --git a/modules/nextclade/run/meta.yml b/modules/nextclade/run/meta.yml index 40a863e6..d8f1eb37 100644 --- a/modules/nextclade/run/meta.yml +++ b/modules/nextclade/run/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/nextstrain/nextclade tool_dev_url: https://github.com/nextstrain/nextclade doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/ngmaster/meta.yml b/modules/ngmaster/meta.yml index 1dbb02a0..ec796965 100644 --- a/modules/ngmaster/meta.yml +++ b/modules/ngmaster/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/MDU-PHL/ngmaster/blob/master/README.md tool_dev_url: https://github.com/MDU-PHL/ngmaster doi: "10.1099/mgen.0.000076" - licence: ['GPL v3 only'] + licence: ["GPL v3 only"] input: - meta: diff --git a/modules/ngscheckmate/ncm/main.nf b/modules/ngscheckmate/ncm/main.nf new file mode 100644 index 00000000..2712c984 --- /dev/null +++ b/modules/ngscheckmate/ncm/main.nf @@ -0,0 +1,49 @@ +process NGSCHECKMATE_NCM { + label 'process_low' + + conda (params.enable_conda ? "bioconda::ngscheckmate=1.0.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ngscheckmate:1.0.0--py27r41hdfd78af_3': + 'quay.io/biocontainers/ngscheckmate:1.0.0--py27r41hdfd78af_3' }" + + input: + path files + path snp_bed + path fasta + + output: + path "*.pdf" , emit: pdf + path "*_corr_matrix.txt", emit: corr_matrix + path "*_matched.txt" , emit: matched + path "*_all.txt" , emit: all + path "*.vcf" , emit: vcfs, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "output" + def unzip = files.any { it.toString().endsWith(".vcf.gz") } + """ + if $unzip + then + for VCFGZ in *.vcf.gz; do + gunzip -cdf \$VCFGZ > \$( basename \$VCFGZ .gz ); + done + fi + + NCM_REF="./"${fasta} ncm.py -d . -bed ${snp_bed} -O . -N ${prefix} $args + + if $unzip + then + rm -f *.vcf # clean up decompressed vcfs + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ngscheckmate: \$(ncm.py --help | sed "7!d;s/ *Ensuring Sample Identity v//g") + END_VERSIONS + """ +} diff --git a/modules/ngscheckmate/ncm/meta.yml b/modules/ngscheckmate/ncm/meta.yml new file mode 100644 index 00000000..7f91f387 --- /dev/null +++ b/modules/ngscheckmate/ncm/meta.yml @@ -0,0 +1,64 @@ +name: ngscheckmate_ncm +description: Determining whether sequencing data comes from the same individual by using SNP matching. Designed for humans on vcf or bam files. +keywords: + - ngscheckmate + - matching + - snp +tools: + - ngscheckmate: + description: NGSCheckMate is a software package for identifying next generation sequencing (NGS) data files from the same individual, including matching between DNA and RNA. + homepage: https://github.com/parklab/NGSCheckMate + documentation: https://github.com/parklab/NGSCheckMate + tool_dev_url: https://github.com/parklab/NGSCheckMate + doi: "doi:/10.1093/nar/gkx193" + licence: ["MIT"] + +input: + - files: + type: file + description: VCF or BAM files for each sample, in a merged channel (possibly gzipped). BAM files require an index too. + pattern: "*.{vcf,vcf.gz,bam,bai}" + + - snp_bed: + type: file + description: BED file containing the SNPs to analyse + pattern: "*.{bed}" + + - fasta: + type: file + description: fasta file for the genome, only used in the bam mode + pattern: "*.{bed}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - pdf: + type: file + description: A pdf containing a dendrogram showing how the samples match up + pattern: "*.{pdf}" + + - corr_matrix: + type: file + description: A text file containing the correlation matrix between each sample + pattern: "*corr_matrix.txt" + + - matched: + type: file + description: A txt file containing only the samples that match with each other + pattern: "*matched.txt" + + - all: + type: file + description: A txt file containing all the sample comparisons, whether they match or not + pattern: "*all.txt" + + - vcfs: + type: file + description: If ran in bam mode, vcf files for each sample giving the SNP calls + pattern: "*.vcf" + +authors: + - "@sppearce" diff --git a/modules/nucmer/meta.yml b/modules/nucmer/meta.yml index cccf723f..e9108ef2 100644 --- a/modules/nucmer/meta.yml +++ b/modules/nucmer/meta.yml @@ -10,7 +10,7 @@ tools: documentation: http://mummer.sourceforge.net/ tool_dev_url: http://mummer.sourceforge.net/ doi: "https://doi.org/10.1186/gb-2004-5-2-r12" - licence: ['The Artistic License'] + licence: ["The Artistic License"] input: - meta: diff --git a/modules/optitype/main.nf b/modules/optitype/main.nf index 984d4669..b6a3e200 100644 --- a/modules/optitype/main.nf +++ b/modules/optitype/main.nf @@ -8,7 +8,7 @@ process OPTITYPE { 'quay.io/biocontainers/optitype:1.3.5--0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai) output: tuple val(meta), path("${prefix}"), emit: output diff --git a/modules/optitype/meta.yml b/modules/optitype/meta.yml index 37654463..9ca10774 100644 --- a/modules/optitype/meta.yml +++ b/modules/optitype/meta.yml @@ -10,7 +10,7 @@ tools: homepage: https://github.com/FRED-2/OptiType documentation: https://github.com/FRED-2/OptiType doi: "10.1093/bioinformatics/btu548" - licence: ['BSD-3-Clause'] + licence: ["BSD-3-Clause"] input: - meta: @@ -22,6 +22,10 @@ input: type: file description: BAM file pattern: "*.{bam}" + - bai: + type: file + description: BAM index file + pattern: "*.{bai}" output: - meta: diff --git a/modules/pairix/meta.yml b/modules/pairix/meta.yml index 45577065..05f03f01 100644 --- a/modules/pairix/meta.yml +++ b/modules/pairix/meta.yml @@ -1,7 +1,7 @@ name: pairix description: | - a tool for indexing and querying on a block-compressed text file - containing pairs of genomic coordinates + a tool for indexing and querying on a block-compressed text file + containing pairs of genomic coordinates keywords: - index tools: @@ -11,7 +11,7 @@ tools: documentation: "https://github.com/4dn-dcic/pairix" tool_dev_url: "https://github.com/4dn-dcic/pairix" doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/dedup/meta.yml b/modules/pairtools/dedup/meta.yml index 288b421e..00b0393c 100644 --- a/modules/pairtools/dedup/meta.yml +++ b/modules/pairtools/dedup/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/flip/meta.yml b/modules/pairtools/flip/meta.yml index 0d7aa082..2fe584e6 100644 --- a/modules/pairtools/flip/meta.yml +++ b/modules/pairtools/flip/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/parse/meta.yml b/modules/pairtools/parse/meta.yml index 8c9c30dc..c2f7691d 100644 --- a/modules/pairtools/parse/meta.yml +++ b/modules/pairtools/parse/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/restrict/meta.yml b/modules/pairtools/restrict/meta.yml index 0ab3b420..6b82f033 100644 --- a/modules/pairtools/restrict/meta.yml +++ b/modules/pairtools/restrict/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/select/meta.yml b/modules/pairtools/select/meta.yml index 5e45129b..667c6d0d 100644 --- a/modules/pairtools/select/meta.yml +++ b/modules/pairtools/select/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/pairtools/sort/meta.yml b/modules/pairtools/sort/meta.yml index 6db2f9e2..f439c2ac 100644 --- a/modules/pairtools/sort/meta.yml +++ b/modules/pairtools/sort/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://pairtools.readthedocs.io/ tool_dev_url: https://github.com/mirnylab/pairtools doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/panaroo/run/main.nf b/modules/panaroo/run/main.nf new file mode 100644 index 00000000..d8be0c1e --- /dev/null +++ b/modules/panaroo/run/main.nf @@ -0,0 +1,36 @@ +process PANAROO_RUN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::panaroo=1.2.9" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/panaroo:1.2.9--pyhdfd78af_0': + 'quay.io/biocontainers/panaroo:1.2.9--pyhdfd78af_0' }" + + input: + tuple val(meta), path(gff) + + output: + tuple val(meta), path("results/*") , emit: results + tuple val(meta), path("results/core_gene_alignment.aln"), optional: true, emit: aln + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + panaroo \\ + $args \\ + -t $task.cpus \\ + -o results \\ + -i $gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + panaroo: \$(echo \$(panaroo --version 2>&1) | sed 's/^.*panaroo //' )) + END_VERSIONS + """ +} diff --git a/modules/panaroo/run/meta.yml b/modules/panaroo/run/meta.yml new file mode 100644 index 00000000..eaeb41d0 --- /dev/null +++ b/modules/panaroo/run/meta.yml @@ -0,0 +1,47 @@ +name: "panaroo_run" +description: A fast and scalable tool for bacterial pangenome analysis +keywords: + - gff + - pan-genome + - alignment +tools: + - "panaroo": + description: "panaroo - an updated pipeline for pangenome investigation" + homepage: "https://gtonkinhill.github.io/panaroo/#/" + documentation: "https://gtonkinhill.github.io/panaroo/#/gettingstarted/quickstart" + tool_dev_url: "https://github.com/gtonkinhill/panaroo" + doi: "10.1186/s13059-020-02090-4" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gff: + type: file + description: A set of GFF3 formatted files + pattern: "*.{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" + - results: + type: directory + description: Directory containing Panaroo result files + pattern: "*/*" + - aln: + type: file + description: Core-genome alignment produced by Panaroo (Optional) + pattern: "*.{fasta}" + +authors: + - "@rpetit3" diff --git a/modules/pangolin/main.nf b/modules/pangolin/main.nf index 9fbc69b8..5af557ac 100644 --- a/modules/pangolin/main.nf +++ b/modules/pangolin/main.nf @@ -2,10 +2,10 @@ process PANGOLIN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::pangolin=3.1.19' : null) + conda (params.enable_conda ? 'bioconda::pangolin=3.1.20' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pangolin:3.1.19--pyhdfd78af_0' : - 'quay.io/biocontainers/pangolin:3.1.19--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/pangolin:3.1.20--pyhdfd78af_0' : + 'quay.io/biocontainers/pangolin:3.1.20--pyhdfd78af_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/pangolin/meta.yml b/modules/pangolin/meta.yml index a2c0979a..93c25a75 100644 --- a/modules/pangolin/meta.yml +++ b/modules/pangolin/meta.yml @@ -1,34 +1,34 @@ name: pangolin description: Phylogenetic Assignment of Named Global Outbreak LINeages keywords: - - covid - - pangolin - - lineage + - covid + - pangolin + - lineage tools: - - star: - description: | - Phylogenetic Assignment of Named Global Outbreak LINeages - homepage: https://github.com/cov-lineages/pangolin#pangolearn-description - manual: https://github.com/cov-lineages/pangolin#pangolearn-description - licence: ['GPL-3.0-or-later'] + - star: + description: | + Phylogenetic Assignment of Named Global Outbreak LINeages + homepage: https://github.com/cov-lineages/pangolin#pangolearn-description + manual: https://github.com/cov-lineages/pangolin#pangolearn-description + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - - fasta: - type: file - description: | - The genome assembly to be evaluated + - meta: + type: map + description: | + Groovy Map containing sample information + - fasta: + type: file + description: | + The genome assembly to be evaluated output: - - report: - type: file - description: Pangolin lineage report - pattern: "*.{csv}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - report: + type: file + description: Pangolin lineage report + pattern: "*.{csv}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@kevinmenden" - - "@drpatelh" + - "@kevinmenden" + - "@drpatelh" diff --git a/modules/paraclu/meta.yml b/modules/paraclu/meta.yml index a3424c57..38043742 100644 --- a/modules/paraclu/meta.yml +++ b/modules/paraclu/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://gitlab.com/mcfrith/paraclu tool_dev_url: https://gitlab.com/mcfrith/paraclu doi: "" - licence: ['GPL v3-or-later'] + licence: ["GPL v3-or-later"] input: - meta: diff --git a/modules/pbbam/pbmerge/meta.yml b/modules/pbbam/pbmerge/meta.yml index 7042d86b..64b8d641 100644 --- a/modules/pbbam/pbmerge/meta.yml +++ b/modules/pbbam/pbmerge/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://pbbam.readthedocs.io/en/latest/tools/pbmerge.html tool_dev_url: https://github.com/pacificbiosciences/pbbam/ doi: "" - licence: ['BSD-3-Clause-Clear'] + licence: ["BSD-3-Clause-Clear"] input: - meta: diff --git a/modules/pbccs/meta.yml b/modules/pbccs/meta.yml index f55c0d71..5f3e1777 100644 --- a/modules/pbccs/meta.yml +++ b/modules/pbccs/meta.yml @@ -9,7 +9,7 @@ tools: documentation: https://ccs.how/ tool_dev_url: https://github.com/PacificBiosciences/ccs doi: "" - licence: ['BSD-3-Clause-Clear'] + licence: ["BSD-3-Clause-Clear"] input: - meta: diff --git a/modules/peddy/meta.yml b/modules/peddy/meta.yml index 7c3fcf45..b3f40bb5 100644 --- a/modules/peddy/meta.yml +++ b/modules/peddy/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://peddy.readthedocs.io/en/latest/ tool_dev_url: https://github.com/brentp/peddy doi: "https://doi.org/10.1016/j.ajhg.2017.01.017" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index c8325b05..d8f73342 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -22,11 +22,12 @@ process PHANTOMPEAKQUALTOOLS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ RUN_SPP=`which run_spp.R` - Rscript -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus + Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/phantompeakqualtools/meta.yml b/modules/phantompeakqualtools/meta.yml new file mode 100644 index 00000000..6488500d --- /dev/null +++ b/modules/phantompeakqualtools/meta.yml @@ -0,0 +1,60 @@ +name: "phantompeakqualtools" + +description: +keywords: + - "ChIP-Seq" + - "QC" + - "phantom peaks" +tools: + - "phantompeakqualtools": + description: | + "This package computes informative enrichment and quality measures + for ChIP-seq/DNase-seq/FAIRE-seq/MNase-seq data. It can also be used + to obtain robust estimates of the predominant fragment length or + characteristic tag shift values in these assays." + homepage: "None" + documentation: "https://github.com/kundajelab/phantompeakqualtools" + tool_dev_url: "https://github.com/kundajelab/phantompeakqualtools" + doi: "https://doi.org/10.1101/gr.136184.111" + licence: "['BSD-3-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +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" + - spp: + type: file + description: | + A ChIP-Seq Processing Pipeline file containing + peakshift/phantomPeak results + pattern: "*.{out}" + - pdf: + type: file + description: A pdf containing save cross-correlation plots + pattern: "*.{pdf}" + - rdata: + type: file + description: Rdata file containing the R session + pattern: "*.{Rdata}" + +authors: + - "@drpatelh" + - "@Emiller88" + - "@JoseEspinosa" diff --git a/modules/phyloflash/meta.yml b/modules/phyloflash/meta.yml index 3ed7a9fa..d44001da 100644 --- a/modules/phyloflash/meta.yml +++ b/modules/phyloflash/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://hrgv.github.io/phyloFlash/usage.html tool_dev_url: https://github.com/HRGV/phyloFlash doi: "10.1128/mSystems.00920-20" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf new file mode 100644 index 00000000..fd102f67 --- /dev/null +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -0,0 +1,53 @@ +process PICARD_ADDORREPLACEREADGROUPS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def ID = task.ext.id ?: "id" + def LIBRARY= task.ext.library ?: "library" + def PLATFORM= task.ext.platform ?: "illumina" + def BARCODE= task.ext.barcode ?: "barcode" + def SAMPLE= task.ext.sample ?: "sample" + def INDEX= task.ext.index ?: "index" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard AddOrReplaceReadGroups] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + AddOrReplaceReadGroups \\ + -Xmx${avail_mem}g \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam \\ + --RGID ${ID} \\ + --RGLB ${LIBRARY} \\ + --RGPL ${PLATFORM} \\ + --RGPU ${BARCODE} \\ + --RGSM ${SAMPLE} \\ + --CREATE_INDEX true + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard AddOrReplaceReadGroups --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/addorreplacereadgroups/meta.yml b/modules/picard/addorreplacereadgroups/meta.yml new file mode 100644 index 00000000..e013bf4b --- /dev/null +++ b/modules/picard/addorreplacereadgroups/meta.yml @@ -0,0 +1,46 @@ +name: picard_addorreplacereadgroups +description: Assigns all the reads in a file to a single new read-group +keywords: + - add + - replace + - read-group +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037226472-AddOrReplaceReadGroups-Picard- + tool_dev_url: https://github.com/broadinstitute/picard + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" + +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" + - bam: + type: file + description: Output BAM file + pattern: "*.{bam}" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf new file mode 100644 index 00000000..62989565 --- /dev/null +++ b/modules/picard/cleansam/main.nf @@ -0,0 +1,42 @@ +process PICARD_CLEANSAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard CleanSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + -Xmx${avail_mem}g \\ + CleanSam \\ + ${args} \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard CleanSam --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/cleansam/meta.yml b/modules/picard/cleansam/meta.yml new file mode 100644 index 00000000..11d8b7c4 --- /dev/null +++ b/modules/picard/cleansam/meta.yml @@ -0,0 +1,45 @@ +name: picard_cleansam +description: Cleans the provided BAM, soft-clipping beyond-end-of-reference alignments and setting MAPQ to 0 for unmapped reads +keywords: + - clean + - bam +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360036491452-CleanSam-Picard- + tool_dev_url: https://github.com/broadinstitute/picard + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sam: + type: file + description: BAM file + pattern: "*.{bam}" + +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" + - sam: + type: file + description: Cleaned BAM file + pattern: "*.{bam}" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 07e8504f..317aff4b 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -15,8 +15,8 @@ process PICARD_COLLECTHSMETRICS { path target_intervals output: - tuple val(meta), path("*collecthsmetrics.txt"), emit: hs_metrics - path "versions.yml" , emit: versions + tuple val(meta), path("*_metrics") , emit: metrics + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -38,10 +38,22 @@ process PICARD_COLLECTHSMETRICS { CollectHsMetrics \\ $args \\ $reference \\ - -BAIT_INTERVALS $bait_intervals \\ - -TARGET_INTERVALS $target_intervals \\ - -INPUT $bam \\ - -OUTPUT ${prefix}_collecthsmetrics.txt + --BAIT_INTERVALS $bait_intervals \\ + --TARGET_INTERVALS $target_intervals \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(echo \$(picard CollectHsMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.CollectHsMetrics.coverage_metrics cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/meta.yml b/modules/picard/collecthsmetrics/meta.yml index 4b94909f..dc9d647a 100644 --- a/modules/picard/collecthsmetrics/meta.yml +++ b/modules/picard/collecthsmetrics/meta.yml @@ -57,10 +57,11 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - hs_metrics: + - metrics: type: file - description: The metrics file. - pattern: "*_collecthsmetrics.txt" + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" authors: - "@projectoriented" + - "@matthdsm" diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index e023ea3c..a653b549 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -33,13 +33,33 @@ process PICARD_COLLECTMULTIPLEMETRICS { -Xmx${avail_mem}g \\ CollectMultipleMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectMultipleMetrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": picard: \$(picard CollectMultipleMetrics --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.CollectMultipleMetrics.alignment_summary_metrics + touch ${prefix}.CollectMultipleMetrics.insert_size_metrics + touch ${prefix}.CollectMultipleMetrics.quality_distribution.pdf + touch ${prefix}.CollectMultipleMetrics.base_distribution_by_cycle_metrics + touch ${prefix}.CollectMultipleMetrics.quality_by_cycle_metrics + touch ${prefix}.CollectMultipleMetrics.read_length_histogram.pdf + touch ${prefix}.CollectMultipleMetrics.base_distribution_by_cycle.pdf + touch ${prefix}.CollectMultipleMetrics.quality_by_cycle.pdf + touch ${prefix}.CollectMultipleMetrics.insert_size_histogram.pdf + touch ${prefix}.CollectMultipleMetrics.quality_distribution_metrics + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(echo \$(picard CollectMultipleMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ } diff --git a/modules/picard/collectmultiplemetrics/meta.yml b/modules/picard/collectmultiplemetrics/meta.yml index 613afc62..68b5c65e 100644 --- a/modules/picard/collectmultiplemetrics/meta.yml +++ b/modules/picard/collectmultiplemetrics/meta.yml @@ -1,50 +1,50 @@ name: picard_collectmultiplemetrics description: Collect multiple metrics from a BAM file keywords: - - alignment - - metrics - - statistics - - insert - - quality - - bam + - alignment + - metrics + - statistics + - insert + - quality + - bam tools: - - picard: - description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. - homepage: https://broadinstitute.github.io/picard/ - documentation: https://broadinstitute.github.io/picard/ - licence: ['MIT'] + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" - - fasta: - type: file - description: Genome fasta file + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + - fasta: + type: file + description: Genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - metrics: - type: file - description: Alignment metrics files generated by picard - pattern: "*_{metrics}" - - pdf: - type: file - description: PDF plots of metrics - pattern: "*.{pdf}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - metrics: + type: file + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" + - pdf: + type: file + description: PDF plots of metrics + pattern: "*.{pdf}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" + - "@drpatelh" diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..e6dd49e9 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,13 +2,13 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) + tuple val(meta), path(bam) path fasta output: @@ -32,9 +32,10 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE $fasta + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collectwgsmetrics/meta.yml b/modules/picard/collectwgsmetrics/meta.yml index 5b4d8139..d6c3d012 100644 --- a/modules/picard/collectwgsmetrics/meta.yml +++ b/modules/picard/collectwgsmetrics/meta.yml @@ -1,47 +1,47 @@ name: picard_collectwgsmetrics description: Collect metrics about coverage and performance of whole genome sequencing (WGS) experiments. keywords: - - alignment - - metrics - - statistics - - quality - - bam + - alignment + - metrics + - statistics + - quality + - bam tools: - - picard: - description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. - homepage: https://broadinstitute.github.io/picard/ - documentation: https://broadinstitute.github.io/picard/ - licence: ['MIT'] + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" - - fasta: - type: file - description: Genome fasta file + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + - fasta: + type: file + description: Genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - metrics: - type: file - description: Alignment metrics files generated by picard - pattern: "*_{metrics}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - metrics: + type: file + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@flowuenne" - - "@lassefolkersen" + - "@drpatelh" + - "@flowuenne" + - "@lassefolkersen" diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf new file mode 100644 index 00000000..2348c496 --- /dev/null +++ b/modules/picard/createsequencedictionary/main.nf @@ -0,0 +1,42 @@ +process PICARD_CREATESEQUENCEDICTIONARY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.dict"), emit: reference_dict + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard CreateSequenceDictionary] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + -Xmx${avail_mem}g \\ + CreateSequenceDictionary \\ + $args \\ + --REFERENCE $fasta \\ + --OUTPUT ${prefix}.dict + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard CreateSequenceDictionary --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/createsequencedictionary/meta.yml b/modules/picard/createsequencedictionary/meta.yml new file mode 100644 index 00000000..9510c590 --- /dev/null +++ b/modules/picard/createsequencedictionary/meta.yml @@ -0,0 +1,45 @@ +name: picard_createsequencedictionary +description: Creates a sequence dictionary for a reference sequence. +keywords: + - sequence + - dictionary + - picard +tools: + - picard: + description: | + Creates a sequence dictionary file (with ".dict" extension) from a reference sequence provided in FASTA format, which is required by many processing and analysis tools. The output file contains a header but no SAMRecords, and the header contains only sequence records. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360036712531-CreateSequenceDictionary-Picard- + tool_dev_url: https://github.com/broadinstitute/picard + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + +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" + - dict: + type: file + description: picard dictionary file + pattern: "*.{dict}" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" diff --git a/modules/picard/crosscheckfingerprints/main.nf b/modules/picard/crosscheckfingerprints/main.nf new file mode 100644 index 00000000..d3b59402 --- /dev/null +++ b/modules/picard/crosscheckfingerprints/main.nf @@ -0,0 +1,51 @@ +process PICARD_CROSSCHECKFINGERPRINTS { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(input1) + path input2 + path haplotype_map + + output: + tuple val(meta), path("*.crosscheck_metrics.txt"), emit: crosscheck_metrics + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def input1_string = input1.join(" --INPUT ") + def input2_string = input2 ? "--SECOND_INPUT " + input2.join(" --SECOND_INPUT ") : "" + + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard CrosscheckFingerprints] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + -Xmx${avail_mem}g \\ + CrosscheckFingerprints \\ + $args \\ + --NUM_THREADS ${task.cpus} \\ + --INPUT $input1_string \\ + $input2_string \\ + --HAPLOTYPE_MAP ${haplotype_map} \\ + --OUTPUT ${prefix}.crosscheck_metrics.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$( picard CrosscheckFingerprints --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d: ) + END_VERSIONS + """ +} diff --git a/modules/picard/crosscheckfingerprints/meta.yml b/modules/picard/crosscheckfingerprints/meta.yml new file mode 100644 index 00000000..4f2aff5d --- /dev/null +++ b/modules/picard/crosscheckfingerprints/meta.yml @@ -0,0 +1,53 @@ +name: "picard_crosscheckfingerprints" +description: Checks that all data in the set of input files appear to come from the same individual +keywords: + - alignment + - metrics + - statistics + - fingerprint + - bam +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + tool_dev_url: https://github.com/broadinstitute/picard/ + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input1: + type: file + description: List containing 1 or more bam/vcf files or a file containing filepaths + pattern: "*.{bam,vcf,vcf.gz,txt,fofn}" + - input2: + type: file + description: Optional list containing 1 or more bam/vcf files or a file containing filepaths + pattern: "*.{bam,vcf,vcf.gz,txt,fofn}" + - haplotype_map: + type: file + description: Haplotype map file + pattern: "*.{txt,vcf,vcf.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" + - crosscheck_metrics: + type: file + description: Metrics created by crosscheckfingerprints + pattern: "*.{crosscheck_metrics.txt}" + +authors: + - "@matthdsm" diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index ab75abfa..adedcdc2 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(readlist) diff --git a/modules/picard/filtersamreads/meta.yml b/modules/picard/filtersamreads/meta.yml index d63ebcf0..4a8bec5c 100644 --- a/modules/picard/filtersamreads/meta.yml +++ b/modules/picard/filtersamreads/meta.yml @@ -6,46 +6,46 @@ keywords: tools: - picard: description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/ tool_dev_url: https://github.com/broadinstitute/picard doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: List of BAM files. If filtering without read list must be sorted by queryname with picard sortsam - pattern: "*.{bam}" - - filter: - type: value - description: Picard filter type - pattern: "includeAligned|excludeAligned|includeReadList|excludeReadList" - - readlist: - type: file - description: Optional text file containing reads IDs to include or exclude + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM files. If filtering without read list must be sorted by queryname with picard sortsam + pattern: "*.{bam}" + - filter: + type: value + description: Picard filter type + pattern: "includeAligned|excludeAligned|includeReadList|excludeReadList" + - readlist: + type: file + description: Optional text file containing reads IDs to include or exclude output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Filtered BAM file - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Filtered BAM file + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jfy133" diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf new file mode 100644 index 00000000..539b1082 --- /dev/null +++ b/modules/picard/fixmateinformation/main.nf @@ -0,0 +1,43 @@ +process PICARD_FIXMATEINFORMATION { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def STRINGENCY = task.ext.stringency ?: "STRICT" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard FixMateInformation] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + FixMateInformation \\ + -Xmx${avail_mem}g \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam \\ + --VALIDATION_STRINGENCY ${STRINGENCY} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard FixMateInformation --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/fixmateinformation/meta.yml b/modules/picard/fixmateinformation/meta.yml new file mode 100644 index 00000000..67dedcfa --- /dev/null +++ b/modules/picard/fixmateinformation/meta.yml @@ -0,0 +1,44 @@ +name: picard_fixmateinformation +description: Verify mate-pair information between mates and fix if needed +keywords: + - mate-pair +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360036713471-FixMateInformation-Picard- + tool_dev_url: https://github.com/broadinstitute/picard + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + +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" + - bam: + type: file + description: mate-pair verified BAM file + pattern: "*.{bam}" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf new file mode 100644 index 00000000..c92abfeb --- /dev/null +++ b/modules/picard/liftovervcf/main.nf @@ -0,0 +1,49 @@ +process PICARD_LIFTOVERVCF { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(input_vcf) + path dict + path chain + path fasta + + output: + tuple val(meta), path("*lifted.vcf.gz") , emit: vcf_lifted + tuple val(meta), path("*unlifted.vcf.gz"), emit: vcf_unlifted + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def avail_mem = 1 + if (!task.memory) { + log.info '[Picard LiftoverVcf] Available memory not known - defaulting to 1GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + -Xmx${avail_mem}g \\ + LiftoverVcf \\ + $args \\ + --INPUT $input_vcf \\ + --OUTPUT ${prefix}.lifted.vcf.gz \\ + --CHAIN $chain \\ + --REJECT ${prefix}.unlifted.vcf.gz \\ + --REFERENCE_SEQUENCE $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard LiftoverVcf --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/liftovervcf/meta.yml b/modules/picard/liftovervcf/meta.yml new file mode 100644 index 00000000..55f04963 --- /dev/null +++ b/modules/picard/liftovervcf/meta.yml @@ -0,0 +1,55 @@ +name: picard_liftovervcf +description: convert between genome builds +keywords: + - liftOver + - picard +tools: + - picard: + description: Move annotations from one assembly to another + homepage: https://gatk.broadinstitute.org/hc/en-us/articles/360037060932-LiftoverVcf-Picard + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037060932-LiftoverVcf-Picard + tool_dev_url: https://github.com/broadinstitute/picard + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input_vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" + - chain: + type: file + description: The liftover chain file + - fasta: + type: file + description: fasta file + pattern: "*.fasta" + - dict: + type: file + description: dictionary for fasta file + pattern: "*.{dict}" + +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" + - vcf_lifted: + type: file + description: VCF file containing successfully lifted variants + pattern: "*.{lifted.vcf.gz}" + - vcf_unlifted: + type: file + description: VCF file containing unsuccessfully lifted variants + pattern: "*.{unlifted.vcf.gz}" + +authors: + - "@lucpen" diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index 5196b6ed..1565c647 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -33,9 +33,22 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - I=$bam \\ - O=${prefix}.bam \\ - M=${prefix}.MarkDuplicates.metrics.txt + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(echo \$(picard MarkDuplicates --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.bam.bai + touch ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/meta.yml b/modules/picard/markduplicates/meta.yml index c9a08b36..842817bc 100644 --- a/modules/picard/markduplicates/meta.yml +++ b/modules/picard/markduplicates/meta.yml @@ -14,7 +14,7 @@ tools: data and formats such as SAM/BAM/CRAM and VCF. homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/ - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index ef5c3980..1e32c63a 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bams) @@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES { -Xmx${avail_mem}g \\ MergeSamFiles \\ $args \\ - ${'INPUT='+bam_files.join(' INPUT=')} \\ - OUTPUT=${prefix}.bam + ${'--INPUT '+bam_files.join(' --INPUT ')} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) diff --git a/modules/picard/mergesamfiles/meta.yml b/modules/picard/mergesamfiles/meta.yml index 3d010c3c..5f07ecd0 100644 --- a/modules/picard/mergesamfiles/meta.yml +++ b/modules/picard/mergesamfiles/meta.yml @@ -1,41 +1,41 @@ name: picard_mergesamfiles description: Merges multiple BAM files into a single file keywords: - - merge - - alignment - - bam - - sam + - merge + - alignment + - bam + - sam tools: - - picard: - description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. - homepage: https://broadinstitute.github.io/picard/ - documentation: https://broadinstitute.github.io/picard/ - licence: ['MIT'] + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: List of BAM files - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM files + pattern: "*.{bam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Merged BAM file - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Merged BAM file + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" + - "@drpatelh" diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index adec17cb..cee60fd1 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTSAM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/sortsam/meta.yml b/modules/picard/sortsam/meta.yml index aa90e456..3e34225d 100644 --- a/modules/picard/sortsam/meta.yml +++ b/modules/picard/sortsam/meta.yml @@ -1,17 +1,17 @@ name: picard_sortsam description: Sorts BAM/SAM files based on a variety of picard specific criteria keywords: - - sort - - bam - - sam + - sort + - bam + - sam tools: - - picard: - description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. - homepage: https://broadinstitute.github.io/picard/ - documentation: https://broadinstitute.github.io/picard/ - licence: ['MIT'] + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + licence: ["MIT"] input: - meta: @@ -43,6 +43,5 @@ output: description: Sorted BAM/CRAM/SAM file pattern: "*.{bam}" - authors: - "@jfy133" diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf new file mode 100644 index 00000000..fb8dbb79 --- /dev/null +++ b/modules/picard/sortvcf/main.nf @@ -0,0 +1,62 @@ +process PICARD_SORTVCF { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" + + input: + tuple val(meta), path(vcf) + path reference + path sequence_dict + + output: + tuple val(meta), path("*_sorted.vcf.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : "" + def reference = reference ? "--REFERENCE_SEQUENCE $reference" : "" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + + """ + picard \\ + SortVcf \\ + -Xmx${avail_mem}g \\ + --INPUT $vcf \\ + $args \\ + $seq_dict \\ + $reference \\ + --OUTPUT ${prefix}_sorted.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard SortVcf --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_sorted.vcf.gz + touch ${prefix}.bam.bai + touch ${prefix}.MarkDuplicates.metrics.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard SortVcf --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ +} diff --git a/modules/picard/sortvcf/meta.yml b/modules/picard/sortvcf/meta.yml new file mode 100644 index 00000000..f75d3401 --- /dev/null +++ b/modules/picard/sortvcf/meta.yml @@ -0,0 +1,40 @@ +name: picard_sortvcf +description: Sorts vcf files +keywords: + - sort + - vcf +tools: + - picard: + description: Java tools for working with NGS data in the BAM/CRAM/SAM and VCF format + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/command-line-overview.html#SortVcf + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.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" + - vcf: + type: file + description: Sorted VCF file + pattern: "*.{vcf}" + +authors: + - "@ramprasadn" diff --git a/modules/pirate/main.nf b/modules/pirate/main.nf index 20544a1b..ebef5b37 100644 --- a/modules/pirate/main.nf +++ b/modules/pirate/main.nf @@ -2,10 +2,10 @@ process PIRATE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::pirate=1.0.4" : null) + conda (params.enable_conda ? "bioconda::pirate=1.0.4 bioconda::perl-bioperl=1.7.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pirate:1.0.4--hdfd78af_1' : - 'quay.io/biocontainers/pirate:1.0.4--hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/pirate:1.0.4--hdfd78af_2' : + 'quay.io/biocontainers/pirate:1.0.4--hdfd78af_2' }" input: tuple val(meta), path(gff) diff --git a/modules/pirate/meta.yml b/modules/pirate/meta.yml index 296dd11d..d67a91e9 100644 --- a/modules/pirate/meta.yml +++ b/modules/pirate/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/SionBayliss/PIRATE/wiki tool_dev_url: https://github.com/SionBayliss/PIRATE doi: "https://doi.org/10.1093/gigascience/giz119" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/plasmidid/meta.yml b/modules/plasmidid/meta.yml index 8cde23c5..4887cb9a 100644 --- a/modules/plasmidid/meta.yml +++ b/modules/plasmidid/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/BU-ISCIII/plasmidID#readme tool_dev_url: https://github.com/BU-ISCIII/plasmidID doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/plink/extract/meta.yml b/modules/plink/extract/meta.yml index 3978fbb4..7fc2d116 100644 --- a/modules/plink/extract/meta.yml +++ b/modules/plink/extract/meta.yml @@ -10,7 +10,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['GPL'] + licence: ["GPL"] input: - meta: diff --git a/modules/plink/vcf/meta.yml b/modules/plink/vcf/meta.yml index d39892b7..bd8ab133 100644 --- a/modules/plink/vcf/meta.yml +++ b/modules/plink/vcf/meta.yml @@ -12,7 +12,7 @@ tools: documentation: None tool_dev_url: "https://www.cog-genomics.org/plink/1.9/dev" doi: "" - licence: ['GPL'] + licence: ["GPL"] input: - meta: diff --git a/modules/plink2/extract/main.nf b/modules/plink2/extract/main.nf index 89cffdc3..15f9c038 100644 --- a/modules/plink2/extract/main.nf +++ b/modules/plink2/extract/main.nf @@ -23,11 +23,13 @@ process PLINK2_EXTRACT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" if( "$pgen" == "${prefix}.pgen" ) error "Input and output names are the same, use \"task.ext.prefix\" in modules.config to disambiguate!" + def mem_mb = task.memory.toMega() """ plink2 \\ + --threads $task.cpus \\ + --memory $mem_mb \\ --pfile ${pgen.baseName} \\ $args \\ - --threads $task.cpus \\ --extract $variants \\ --make-pgen vzs \\ --out ${prefix} diff --git a/modules/plink2/extract/meta.yml b/modules/plink2/extract/meta.yml index 2323dbc7..07c13ebc 100644 --- a/modules/plink2/extract/meta.yml +++ b/modules/plink2/extract/meta.yml @@ -6,13 +6,13 @@ keywords: tools: - plink2: description: | - Whole genome association analysis toolset, designed to perform a range - of basic, large-scale analyses in a computationally efficient manner + Whole genome association analysis toolset, designed to perform a range + of basic, large-scale analyses in a computationally efficient manner homepage: http://www.cog-genomics.org/plink/2.0/ documentation: http://www.cog-genomics.org/plink/2.0/general_usage tool_dev_url: None doi: "10.1186/s13742-015-0047-8" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/plink2/score/main.nf b/modules/plink2/score/main.nf new file mode 100644 index 00000000..6f561322 --- /dev/null +++ b/modules/plink2/score/main.nf @@ -0,0 +1,39 @@ +process PLINK2_SCORE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::plink2=2.00a2.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/plink2:2.00a2.3--h712d239_1' : + 'quay.io/biocontainers/plink2:2.00a2.3--h712d239_1' }" + + input: + tuple val(meta), path(pgen), path(psam), path(pvar) + path(scorefile) + + output: + tuple val(meta), path("*.sscore"), emit: score + path("versions.yml") , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def mem_mb = task.memory.toMega() // plink is greedy + """ + plink2 \\ + --threads $task.cpus \\ + --memory $mem_mb \\ + --pfile ${pgen.baseName} vzs \\ + --score ${scorefile} \\ + $args \\ + --out ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + plink2: \$(plink2 --version 2>&1 | sed 's/^PLINK v//; s/ 64.*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/plink2/score/meta.yml b/modules/plink2/score/meta.yml new file mode 100644 index 00000000..be5fdbee --- /dev/null +++ b/modules/plink2/score/meta.yml @@ -0,0 +1,56 @@ +name: plink2_score +description: Apply a scoring system to each sample in a plink 2 fileset +keywords: + - plink2 + - score +tools: + - plink2: + description: | + Whole genome association analysis toolset, designed to perform a range + of basic, large-scale analyses in a computationally efficient manner + homepage: http://www.cog-genomics.org/plink/2.0/ + documentation: http://www.cog-genomics.org/plink/2.0/general_usage + tool_dev_url: None + doi: "10.1186/s13742-015-0047-8" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pgen: + type: file + description: PLINK 2 binary genotype table + pattern: "*.{pgen}" + - psam: + type: file + description: PLINK 2 sample information file + pattern: "*.{psam}" + - pvar: + type: file + description: PLINK 2 variant information file + pattern: "*.{pvar}" + - scorefile: + type: file + description: A text file containing variant identifiers and weights + pattern: "*.{scores,txt,scorefile}" + +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" + - score: + type: file + description: A text file containing sample scores, in plink 2 .sscore format + pattern: "*.{sscore}" + +authors: + - "@nebfield" diff --git a/modules/plink2/vcf/main.nf b/modules/plink2/vcf/main.nf index 041cb4b9..090851a8 100644 --- a/modules/plink2/vcf/main.nf +++ b/modules/plink2/vcf/main.nf @@ -11,10 +11,10 @@ process PLINK2_VCF { tuple val(meta), path(vcf) output: - tuple val(meta), path("*.pgen"), emit: pgen - tuple val(meta), path("*.psam"), emit: psam - tuple val(meta), path("*.pvar"), emit: pvar - path "versions.yml" , emit: versions + tuple val(meta), path("*.pgen") , emit: pgen + tuple val(meta), path("*.psam") , emit: psam + tuple val(meta), path("*.pvar.zst"), emit: pvar + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,10 +22,14 @@ process PLINK2_VCF { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def mem_mb = task.memory.toMega() """ plink2 \\ + --threads $task.cpus \\ + --memory $mem_mb \\ $args \\ --vcf $vcf \\ + --make-pgen vzs \\ --out ${prefix} cat <<-END_VERSIONS > versions.yml diff --git a/modules/plink2/vcf/meta.yml b/modules/plink2/vcf/meta.yml index 1b2f3a9b..3c776daf 100644 --- a/modules/plink2/vcf/meta.yml +++ b/modules/plink2/vcf/meta.yml @@ -6,13 +6,13 @@ keywords: tools: - plink2: description: | - Whole genome association analysis toolset, designed to perform a range - of basic, large-scale analyses in a computationally efficient manner + Whole genome association analysis toolset, designed to perform a range + of basic, large-scale analyses in a computationally efficient manner homepage: http://www.cog-genomics.org/plink/2.0/ documentation: http://www.cog-genomics.org/plink/2.0/general_usage tool_dev_url: None doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: @@ -46,7 +46,7 @@ output: - pvar: type: file description: PLINK 2 variant information file - pattern: "*.{psam}" + pattern: "*.{pvar.zst}" authors: - "@nebfield" diff --git a/modules/pmdtools/filter/meta.yml b/modules/pmdtools/filter/meta.yml index 72abbfdc..58d562bf 100644 --- a/modules/pmdtools/filter/meta.yml +++ b/modules/pmdtools/filter/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/pontussk/PMDtools tool_dev_url: https://github.com/pontussk/PMDtools doi: "10.1073/pnas.1318934111" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/preseq/ccurve/main.nf b/modules/preseq/ccurve/main.nf new file mode 100644 index 00000000..febf83cc --- /dev/null +++ b/modules/preseq/ccurve/main.nf @@ -0,0 +1,40 @@ +process PRESEQ_CCURVE { + tag "$meta.id" + label 'process_medium' + label 'error_ignore' + + conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2': + 'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.c_curve.txt"), emit: c_curve + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def paired_end = meta.single_end ? '' : '-pe' + """ + preseq \\ + c_curve \\ + $args \\ + $paired_end \\ + -output ${prefix}.c_curve.txt \\ + $bam + cp .command.err ${prefix}.command.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//') + END_VERSIONS + """ +} diff --git a/modules/preseq/ccurve/meta.yml b/modules/preseq/ccurve/meta.yml new file mode 100644 index 00000000..86ed6296 --- /dev/null +++ b/modules/preseq/ccurve/meta.yml @@ -0,0 +1,48 @@ +name: preseq_ccurve +description: Software for predicting library complexity and genome coverage in high-throughput sequencing +keywords: + - preseq + - library + - complexity +tools: + - preseq: + description: Software for predicting library complexity and genome coverage in high-throughput sequencing + homepage: http://smithlabresearch.org/software/preseq/ + documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf + tool_dev_url: https://github.com/smithlabcode/preseq + doi: "" + licence: ["GPL"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +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" + - ccurve: + type: file + description: File containing output of Preseq c curve + pattern: "*.{c_curve.txt}" + - log: + type: file + description: Log file containing stderr produced by Preseq + pattern: "*.{log}" + +authors: + - "@drpatelh" + - "@Emiller88" diff --git a/modules/preseq/lcextrap/main.nf b/modules/preseq/lcextrap/main.nf index d6dd19e2..97261557 100644 --- a/modules/preseq/lcextrap/main.nf +++ b/modules/preseq/lcextrap/main.nf @@ -5,16 +5,16 @@ process PRESEQ_LCEXTRAP { conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h06ef8b0_1' : - 'quay.io/biocontainers/preseq:3.1.2--h06ef8b0_1' }" + 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2': + 'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }" input: tuple val(meta), path(bam) output: - tuple val(meta), path("*.ccurve.txt"), emit: ccurve - tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("*.lc_extrap.txt"), emit: lc_extrap + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -28,7 +28,7 @@ process PRESEQ_LCEXTRAP { lc_extrap \\ $args \\ $paired_end \\ - -output ${prefix}.ccurve.txt \\ + -output ${prefix}.lc_extrap.txt \\ $bam cp .command.err ${prefix}.command.log diff --git a/modules/preseq/lcextrap/meta.yml b/modules/preseq/lcextrap/meta.yml index bdc61228..f1be05a2 100755 --- a/modules/preseq/lcextrap/meta.yml +++ b/modules/preseq/lcextrap/meta.yml @@ -8,10 +8,10 @@ tools: - preseq: description: Software for predicting library complexity and genome coverage in high-throughput sequencing homepage: http://smithlabresearch.org/software/preseq/ - documentation: None - tool_dev_url: None + documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf + tool_dev_url: https://github.com/smithlabcode/preseq doi: "" - licence: ['GPL'] + licence: ["GPL"] input: - meta: @@ -34,10 +34,10 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - ccurve: + - lc_extrap: type: file description: File containing output of Preseq lcextrap - pattern: "*.{ccurve.txt}" + pattern: "*.{lc_extrap.txt}" - log: type: file description: Log file containing stderr produced by Preseq @@ -45,3 +45,4 @@ output: authors: - "@drpatelh" + - "@Emiller88" diff --git a/modules/prinseqplusplus/main.nf b/modules/prinseqplusplus/main.nf new file mode 100644 index 00000000..ebd8c58c --- /dev/null +++ b/modules/prinseqplusplus/main.nf @@ -0,0 +1,61 @@ +process PRINSEQPLUSPLUS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::prinseq-plus-plus=1.2.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/prinseq-plus-plus:1.2.3--hc90279e_1': + 'quay.io/biocontainers/prinseq-plus-plus:1.2.3--hc90279e_1' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*_good_out*.fastq.gz") , emit: good_reads + tuple val(meta), path("*_single_out*.fastq.gz"), optional: true, emit: single_reads + tuple val(meta), path("*_bad_out*.fastq.gz") , optional: true, emit: bad_reads + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + if (meta.single_end) { + """ + prinseq++ \\ + -threads $task.cpus \\ + -fastq ${reads} \\ + -out_name ${prefix} \\ + -out_gz \\ + -VERBOSE 1 \\ + $args \\ + | tee ${prefix}.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + prinseqplusplus: \$(echo \$(prinseq++ --version | cut -f 2 -d ' ' )) + END_VERSIONS + """ + } else { + """ + prinseq++ \\ + -threads $task.cpus \\ + -fastq ${reads[0]} \\ + -fastq2 ${reads[1]} \\ + -out_name ${prefix} \\ + -out_gz \\ + -VERBOSE 1 \\ + $args \\ + | tee ${prefix}.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + prinseqplusplus: \$(echo \$(prinseq++ --version | cut -f 2 -d ' ' )) + END_VERSIONS + """ + } +} diff --git a/modules/prinseqplusplus/meta.yml b/modules/prinseqplusplus/meta.yml new file mode 100644 index 00000000..8155df93 --- /dev/null +++ b/modules/prinseqplusplus/meta.yml @@ -0,0 +1,60 @@ +name: "prinseqplusplus" +description: PRINSEQ++ is a C++ implementation of the prinseq-lite.pl program. It can be used to filter, reformat or trim genomic and metagenomic sequence data +keywords: + - fastq + - fasta + - filter + - trim +tools: + - "prinseqplusplus": + description: "PRINSEQ++ - Multi-threaded C++ sequence cleaning" + homepage: "https://github.com/Adrian-Cantu/PRINSEQ-plus-plus" + documentation: "https://github.com/Adrian-Cantu/PRINSEQ-plus-plus" + tool_dev_url: "https://github.com/Adrian-Cantu/PRINSEQ-plus-plus" + doi: "10.7287/peerj.preprints.27553v1" + licence: "['GPL v2']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end + data, respectively. + +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" + - good_reads: + type: file + description: Reads passing filter(s) in gzipped FASTQ format + pattern: "*_good_out_{R1,R2}.fastq.gz" + - single_reads: + type: file + description: | + Single reads without the pair passing filter(s) in gzipped FASTQ format + pattern: "*_single_out_{R1,R2}.fastq.gz" + - bad_reads: + type: file + description: | + Reads without not passing filter(s) in gzipped FASTQ format + pattern: "*_bad_out_{R1,R2}.fastq.gz" + - log: + type: file + description: | + Verbose level 2 STDOUT information in a log file + pattern: "*.log" + +authors: + - "@jfy133" diff --git a/modules/prokka/meta.yml b/modules/prokka/meta.yml index 87446694..7fc9e185 100644 --- a/modules/prokka/meta.yml +++ b/modules/prokka/meta.yml @@ -9,7 +9,7 @@ tools: description: Rapid annotation of prokaryotic genomes homepage: https://github.com/tseemann/prokka doi: "10.1093/bioinformatics/btu153" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: diff --git a/modules/pycoqc/meta.yml b/modules/pycoqc/meta.yml index 33bd6b07..83748855 100644 --- a/modules/pycoqc/meta.yml +++ b/modules/pycoqc/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://tleonardi.github.io/pycoQC/ tool_dev_url: https://github.com/tleonardi/pycoQC doi: "10.21105/joss.01236" - licence: ['GNU General Public v3 (GPL v3)'] + licence: ["GNU General Public v3 (GPL v3)"] input: - meta: diff --git a/modules/pydamage/analyze/main.nf b/modules/pydamage/analyze/main.nf index 39e01fa1..3463b0e5 100644 --- a/modules/pydamage/analyze/main.nf +++ b/modules/pydamage/analyze/main.nf @@ -2,10 +2,10 @@ process PYDAMAGE_ANALYZE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::pydamage=0.62" : null) + conda (params.enable_conda ? "bioconda::pydamage=0.70" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pydamage:0.62--pyhdfd78af_0' : - 'quay.io/biocontainers/pydamage:0.62--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/pydamage:0.70--pyhdfd78af_0' : + 'quay.io/biocontainers/pydamage:0.70--pyhdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/pydamage/analyze/meta.yml b/modules/pydamage/analyze/meta.yml index 918fbce9..09dd25eb 100644 --- a/modules/pydamage/analyze/meta.yml +++ b/modules/pydamage/analyze/meta.yml @@ -19,7 +19,7 @@ tools: homepage: https://github.com/maxibor/pydamage documentation: https://pydamage.readthedocs.io/ tool_dev_url: https://github.com/maxibor/pydamage - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/pydamage/filter/main.nf b/modules/pydamage/filter/main.nf index a748875a..14fbf1c5 100644 --- a/modules/pydamage/filter/main.nf +++ b/modules/pydamage/filter/main.nf @@ -2,10 +2,10 @@ process PYDAMAGE_FILTER { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::pydamage=0.62" : null) + conda (params.enable_conda ? "bioconda::pydamage=0.70" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pydamage:0.62--pyhdfd78af_0' : - 'quay.io/biocontainers/pydamage:0.62--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/pydamage:0.70--pyhdfd78af_0' : + 'quay.io/biocontainers/pydamage:0.70--pyhdfd78af_0' }" input: tuple val(meta), path(csv) diff --git a/modules/pydamage/filter/meta.yml b/modules/pydamage/filter/meta.yml index 706e38b0..c732ab9b 100644 --- a/modules/pydamage/filter/meta.yml +++ b/modules/pydamage/filter/meta.yml @@ -19,7 +19,7 @@ tools: homepage: https://github.com/maxibor/pydamage documentation: https://pydamage.readthedocs.io/ tool_dev_url: https://github.com/maxibor/pydamage - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/qcat/meta.yml b/modules/qcat/meta.yml index e0ab6a0f..97b9b884 100644 --- a/modules/qcat/meta.yml +++ b/modules/qcat/meta.yml @@ -1,40 +1,40 @@ name: qcat description: Demultiplexer for Nanopore samples keywords: - - demultiplex + - demultiplex tools: - - qcat: - description: | - A demultiplexer for Nanopore samples - homepage: https://github.com/nanoporetech/qcat - documentation: https://github.com/nanoporetech/qcat#qcat - licence: ['MPL-2.0'] + - qcat: + description: | + A demultiplexer for Nanopore samples + homepage: https://github.com/nanoporetech/qcat + documentation: https://github.com/nanoporetech/qcat#qcat + licence: ["MPL-2.0"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - Non-demultiplexed fastq files + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + Non-demultiplexed fastq files output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Demultiplexed fastq samples - pattern: "*.fastq.gz" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Demultiplexed fastq samples + pattern: "*.fastq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" - - "@drpatelh" + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/qualimap/bamqc/main.nf b/modules/qualimap/bamqc/main.nf index 4bff0254..3bfcb4c1 100644 --- a/modules/qualimap/bamqc/main.nf +++ b/modules/qualimap/bamqc/main.nf @@ -10,7 +10,6 @@ process QUALIMAP_BAMQC { input: tuple val(meta), path(bam) path gff - val use_gff output: tuple val(meta), path("${prefix}"), emit: results @@ -25,7 +24,7 @@ process QUALIMAP_BAMQC { def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs' def memory = task.memory.toGiga() + "G" - def regions = use_gff ? "--gff $gff" : '' + def regions = gff ? "--gff $gff" : '' def strandedness = 'non-strand-specific' if (meta.strandedness == 'forward') { @@ -53,4 +52,72 @@ process QUALIMAP_BAMQC { qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//') END_VERSIONS """ + + stub: + prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + """ + mkdir -p $prefix/css + mkdir $prefix/images_qualimapReport + mkdir $prefix/raw_data_qualimapReport + cd $prefix/css + touch agogo.css + touch basic.css + touch bgtop.png + touch comment-close.png + touch doctools.js + touch down-pressed.png + touch jquery.js + touch plus.png + touch qualimap_logo_small.png + touch searchtools.js + touch up.png + touch websupport.js + touch ajax-loader.gif + touch bgfooter.png + touch comment-bright.png + touch comment.png + touch down.png + touch file.png + touch minus.png + touch pygments.css + touch report.css + touch underscore.js + touch up-pressed.png + cd ../images_qualimapReport/ + touch genome_coverage_0to50_histogram.png + touch genome_coverage_quotes.png + touch genome_insert_size_across_reference.png + touch genome_mapping_quality_histogram.png + touch genome_uniq_read_starts_histogram.png + touch genome_coverage_across_reference.png + touch genome_gc_content_per_window.png + touch genome_insert_size_histogram.png + touch genome_reads_clipping_profile.png + touch genome_coverage_histogram.png + touch genome_homopolymer_indels.png + touch genome_mapping_quality_across_reference.png + touch genome_reads_content_per_read_position.png + cd ../raw_data_qualimapReport + touch coverage_across_reference.txt + touch genome_fraction_coverage.txt + touch insert_size_histogram.txt + touch mapped_reads_nucleotide_content.txt + touch coverage_histogram.txt + touch homopolymer_indels.txt + touch mapped_reads_clipping_profile.txt + touch mapping_quality_across_reference.txt + touch duplication_rate_histogram.txt + touch insert_size_across_reference.txt + touch mapped_reads_gc-content_distribution.txt + touch mapping_quality_histogram.txt + cd ../ + touch genome_results.txt + touch qualimapReport.html + cd ../ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//') + END_VERSIONS + """ } diff --git a/modules/qualimap/bamqc/meta.yml b/modules/qualimap/bamqc/meta.yml index 6888d30e..303532eb 100644 --- a/modules/qualimap/bamqc/meta.yml +++ b/modules/qualimap/bamqc/meta.yml @@ -1,50 +1,47 @@ name: qualimap_bamqc description: Evaluate alignment data keywords: - - quality control - - qc - - bam + - quality control + - qc + - bam tools: - - qualimap: - description: | - Qualimap 2 is a platform-independent application written in - Java and R that provides both a Graphical User Interface and - a command-line interface to facilitate the quality control of - alignment sequencing data and its derivatives like feature counts. - homepage: http://qualimap.bioinfo.cipf.es/ - documentation: http://qualimap.conesalab.org/doc_html/index.html - doi: 10.1093/bioinformatics/bts503 - licence: ['GPL-2.0-only'] + - qualimap: + description: | + Qualimap 2 is a platform-independent application written in + Java and R that provides both a Graphical User Interface and + a command-line interface to facilitate the quality control of + alignment sequencing data and its derivatives like feature counts. + homepage: http://qualimap.bioinfo.cipf.es/ + documentation: http://qualimap.conesalab.org/doc_html/index.html + doi: 10.1093/bioinformatics/bts503 + licence: ["GPL-2.0-only"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" - - gff: - type: file - description: Feature file with regions of interest - pattern: "*.{gff,gtf,bed}" - - use_gff: - type: boolean - description: Specifies if feature file should be used or not + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + - gff: + type: file + description: Feature file with regions of interest + pattern: "*.{gff,gtf,bed}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - results: - type: dir - description: Qualimap results dir - pattern: "*/*" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: dir + description: Qualimap results dir + pattern: "*/*" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@phue" + - "@phue" diff --git a/modules/qualimap/bamqccram/main.nf b/modules/qualimap/bamqccram/main.nf new file mode 100644 index 00000000..e136b8e2 --- /dev/null +++ b/modules/qualimap/bamqccram/main.nf @@ -0,0 +1,60 @@ +process QUALIMAP_BAMQCCRAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::qualimap=2.2.2d bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:61f6d4658ac88635fc37623af50bba77561988ab-0' : + 'quay.io/biocontainers/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:61f6d4658ac88635fc37623af50bba77561988ab-0' }" + + input: + tuple val(meta), path(cram), path(crai) + path gff + path fasta + path fasta_fai + + output: + tuple val(meta), path("${prefix}"), emit: results + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs' + def memory = task.memory.toGiga() + "G" + def regions = gff ? "--gff $gff" : '' + + def strandedness = 'non-strand-specific' + if (meta.strandedness == 'forward') { + strandedness = 'strand-specific-forward' + } else if (meta.strandedness == 'reverse') { + strandedness = 'strand-specific-reverse' + } + """ + unset DISPLAY + mkdir tmp + export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp + + samtools view -hb -T ${fasta} ${cram} | + qualimap \\ + --java-mem-size=$memory \\ + bamqc \\ + $args \\ + -bam /dev/stdin \\ + $regions \\ + -p $strandedness \\ + $collect_pairs \\ + -outdir $prefix \\ + -nt $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/qualimap/bamqccram/meta.yml b/modules/qualimap/bamqccram/meta.yml new file mode 100644 index 00000000..d72f203d --- /dev/null +++ b/modules/qualimap/bamqccram/meta.yml @@ -0,0 +1,51 @@ +name: qualimap_bamqccram +description: Evaluate alignment data +keywords: + - quality control + - qc + - bam +tools: + - qualimap: + description: | + Qualimap 2 is a platform-independent application written in + Java and R that provides both a Graphical User Interface and + a command-line interface to facilitate the quality control of + alignment sequencing data and its derivatives like feature counts. + homepage: http://qualimap.bioinfo.cipf.es/ + documentation: http://qualimap.conesalab.org/doc_html/index.html + doi: 10.1093/bioinformatics/bts503 + licence: ["GPL-2.0-only"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bacramm: + type: file + description: BAM file + pattern: "*.{bam}" + - gff: + type: file + description: Feature file with regions of interest + pattern: "*.{gff,gtf,bed}" + - fasta: + type: file + description: Reference file of cram file + pattern: "*.{fasta,fa,fna}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: dir + description: Qualimap results dir + pattern: "*/*" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@FriederikeHanssen" diff --git a/modules/quast/meta.yml b/modules/quast/meta.yml index 05faa8b8..f4bc38fc 100644 --- a/modules/quast/meta.yml +++ b/modules/quast/meta.yml @@ -10,7 +10,7 @@ tools: QUAST calculates quality metrics for genome assemblies homepage: http://bioinf.spbau.ru/quast doi: https://doi.org/10.1093/bioinformatics/btt086 - licence: ['GPL-2.0-only'] + licence: ["GPL-2.0-only"] input: - consensus: type: file diff --git a/modules/racon/meta.yml b/modules/racon/meta.yml index 2428f044..0cb3888e 100644 --- a/modules/racon/meta.yml +++ b/modules/racon/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/lbcb-sci/racon tool_dev_url: https://github.com/lbcb-sci/racon doi: https://doi.org/10.1101/gr.214270.116 - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/rapidnj/meta.yml b/modules/rapidnj/meta.yml index ead54e09..968baeb5 100644 --- a/modules/rapidnj/meta.yml +++ b/modules/rapidnj/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://birc.au.dk/software/rapidnj tool_dev_url: https://github.com/somme89/rapidNJ doi: "doi:10.1007/978-3-540-87361-7_10" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - alignment: diff --git a/modules/rasusa/meta.yml b/modules/rasusa/meta.yml index 610afd3f..86bce584 100644 --- a/modules/rasusa/meta.yml +++ b/modules/rasusa/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/mbhall88/rasusa/blob/master/README.md tool_dev_url: https://github.com/mbhall88/rasusa doi: "10.5281/zenodo.3731394" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -20,14 +20,14 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - reads: - type: file - description: List of input paired-end FastQ files + type: file + description: List of input paired-end FastQ files - genome_size: - type: string - description: Genome size of the species + type: string + description: Genome size of the species - depth_cutoff: - type: integer - description: Depth of coverage cutoff + type: integer + description: Depth of coverage cutoff output: - meta: diff --git a/modules/raven/meta.yml b/modules/raven/meta.yml index 644907a9..53917625 100644 --- a/modules/raven/meta.yml +++ b/modules/raven/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/lbcb-sci/raven#usage tool_dev_url: https://github.com/lbcb-sci/raven doi: doi.org/10.1038/s43588-021-00073-4 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/raxmlng/meta.yml b/modules/raxmlng/meta.yml index 3cc558f4..2a23537a 100644 --- a/modules/raxmlng/meta.yml +++ b/modules/raxmlng/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/amkozlov/raxml-ng/wiki tool_dev_url: https://github.com/amkozlov/raxml-ng doi: doi.org/10.1093/bioinformatics/btz305 - licence: ['GPL v2-or-later'] + licence: ["GPL v2-or-later"] input: - alignment: diff --git a/modules/rgi/main/main.nf b/modules/rgi/main/main.nf new file mode 100644 index 00000000..bf00d333 --- /dev/null +++ b/modules/rgi/main/main.nf @@ -0,0 +1,37 @@ +process RGI_MAIN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::rgi=5.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/rgi:5.2.1--pyha8f3691_2': + 'quay.io/biocontainers/rgi:5.2.1--pyha8f3691_2' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.json"), emit: json + tuple val(meta), path("*.txt") , emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + rgi \\ + main \\ + $args \\ + --num_threads $task.cpus \\ + --output_file $prefix \\ + --input_sequence $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + rgi: \$(rgi main --version) + END_VERSIONS + """ +} diff --git a/modules/rgi/main/meta.yml b/modules/rgi/main/meta.yml new file mode 100644 index 00000000..1f0cb10d --- /dev/null +++ b/modules/rgi/main/meta.yml @@ -0,0 +1,47 @@ +name: rgi_main +description: Predict antibiotic resistance from protein or nucleotide data +keywords: + - bacteria + - fasta + - 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 + 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"] + +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}" + +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}" + - tsv: + type: file + description: Tab-delimited file with RGI results + pattern: "*.{txt}" + +authors: + - "@rpetit3" diff --git a/modules/roary/meta.yml b/modules/roary/meta.yml index 4cf42bdf..a24ae558 100644 --- a/modules/roary/meta.yml +++ b/modules/roary/meta.yml @@ -11,7 +11,7 @@ tools: documentation: http://sanger-pathogens.github.io/Roary/ tool_dev_url: https://github.com/sanger-pathogens/Roary/ doi: "http://dx.doi.org/10.1093/bioinformatics/btv421" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/rsem/calculateexpression/main.nf b/modules/rsem/calculateexpression/main.nf index cf147a63..1ab3a635 100644 --- a/modules/rsem/calculateexpression/main.nf +++ b/modules/rsem/calculateexpression/main.nf @@ -2,10 +2,10 @@ process RSEM_CALCULATEEXPRESSION { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: tuple val(meta), path(reads) diff --git a/modules/rsem/calculateexpression/meta.yml b/modules/rsem/calculateexpression/meta.yml index fdfaa0c4..8b89c7d1 100644 --- a/modules/rsem/calculateexpression/meta.yml +++ b/modules/rsem/calculateexpression/meta.yml @@ -11,7 +11,7 @@ tools: homepage: https://github.com/deweylab/RSEM documentation: https://github.com/deweylab/RSEM doi: https://doi.org/10.1186/1471-2105-12-323 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map @@ -21,7 +21,7 @@ input: - reads: type: file description: Input reads for quantification - pattern: "*.fastq.gz"# + pattern: "*.fastq.gz" - index: type: file description: RSEM index diff --git a/modules/rsem/preparereference/main.nf b/modules/rsem/preparereference/main.nf index 2d2ca205..da11be45 100644 --- a/modules/rsem/preparereference/main.nf +++ b/modules/rsem/preparereference/main.nf @@ -2,10 +2,10 @@ process RSEM_PREPAREREFERENCE { tag "$fasta" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: path fasta, stageAs: "rsem/*" diff --git a/modules/rsem/preparereference/meta.yml b/modules/rsem/preparereference/meta.yml index 062f0256..fbe57b20 100644 --- a/modules/rsem/preparereference/meta.yml +++ b/modules/rsem/preparereference/meta.yml @@ -10,7 +10,7 @@ tools: homepage: https://github.com/deweylab/RSEM documentation: https://github.com/deweylab/RSEM doi: https://doi.org/10.1186/1471-2105-12-323 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - fasta: type: file diff --git a/modules/rseqc/bamstat/meta.yml b/modules/rseqc/bamstat/meta.yml index 561ba195..2d7fa799 100644 --- a/modules/rseqc/bamstat/meta.yml +++ b/modules/rseqc/bamstat/meta.yml @@ -12,7 +12,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/inferexperiment/meta.yml b/modules/rseqc/inferexperiment/meta.yml index 88eabc8a..b4162059 100644 --- a/modules/rseqc/inferexperiment/meta.yml +++ b/modules/rseqc/inferexperiment/meta.yml @@ -11,7 +11,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/innerdistance/meta.yml b/modules/rseqc/innerdistance/meta.yml index 27bcf242..d10a4c44 100644 --- a/modules/rseqc/innerdistance/meta.yml +++ b/modules/rseqc/innerdistance/meta.yml @@ -11,7 +11,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/junctionannotation/meta.yml b/modules/rseqc/junctionannotation/meta.yml index 56364232..a17b84e9 100644 --- a/modules/rseqc/junctionannotation/meta.yml +++ b/modules/rseqc/junctionannotation/meta.yml @@ -12,7 +12,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/junctionsaturation/meta.yml b/modules/rseqc/junctionsaturation/meta.yml index 05d814ad..340fec0d 100644 --- a/modules/rseqc/junctionsaturation/meta.yml +++ b/modules/rseqc/junctionsaturation/meta.yml @@ -12,7 +12,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/readdistribution/meta.yml b/modules/rseqc/readdistribution/meta.yml index 4c736878..94c64712 100644 --- a/modules/rseqc/readdistribution/meta.yml +++ b/modules/rseqc/readdistribution/meta.yml @@ -12,7 +12,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/readduplication/meta.yml b/modules/rseqc/readduplication/meta.yml index 3623de80..5a866643 100644 --- a/modules/rseqc/readduplication/meta.yml +++ b/modules/rseqc/readduplication/meta.yml @@ -11,7 +11,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rseqc/tin/main.nf b/modules/rseqc/tin/main.nf index da58fc06..67493371 100644 --- a/modules/rseqc/tin/main.nf +++ b/modules/rseqc/tin/main.nf @@ -1,6 +1,6 @@ process RSEQC_TIN { tag "$meta.id" - label 'process_medium' + label 'process_high' conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/rseqc/tin/meta.yml b/modules/rseqc/tin/meta.yml index 158b4033..6333ae14 100644 --- a/modules/rseqc/tin/meta.yml +++ b/modules/rseqc/tin/meta.yml @@ -12,7 +12,7 @@ tools: homepage: http://rseqc.sourceforge.net/ documentation: http://rseqc.sourceforge.net/ doi: 10.1093/bioinformatics/bts356 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf new file mode 100644 index 00000000..27a488f7 --- /dev/null +++ b/modules/rtgtools/vcfeval/main.nf @@ -0,0 +1,60 @@ +process RTGTOOLS_VCFEVAL { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::rtg-tools=3.12.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/rtg-tools:3.12.1--hdfd78af_0': + 'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }" + + input: + tuple val(meta), path(query_vcf), path(query_vcf_tbi) + tuple path(truth_vcf), path(truth_vcf_tbi) + path(truth_regions) + path(evaluation_regions) + path(sdf) + + output: + tuple val(meta), path("**results/{done,progress,*.log}") , emit: logs + tuple val(meta), path("**tp.vcf.gz"), path("**tp.vcf.gz.tbi") , emit: tp + tuple val(meta), path("**fn.vcf.gz"), path("**fn.vcf.gz.tbi") , emit: fn + tuple val(meta), path("**fp.vcf.gz"), path("**fp.vcf.gz.tbi") , emit: fp + tuple val(meta), path("**baseline.vcf.gz"), path("**baseline.vcf.gz.tbi") , emit: baseline + tuple val(meta), path("**.tsv.gz") , emit: roc + tuple val(meta), path("**results/summary.txt") , emit: summary + tuple val(meta), path("**results/phasing.txt") , emit: phasing + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def bed_regions = truth_regions ? "--bed-regions=$truth_regions" : "" + def eval_regions = evaluation_regions ? "--evaluation-regions=$evaluation_regions" : "" + def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" + def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" + def avail_mem = task.memory.toGiga() + "G" + + """ + $truth_index + $query_index + + rtg RTG_MEM=$avail_mem vcfeval \\ + $args \\ + --baseline=$truth_vcf \\ + $bed_regions \\ + $eval_regions \\ + --calls=$query_vcf \\ + --output=${prefix}_results \\ + --template=$sdf \\ + --threads=$task.cpus \\ + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + rtg-tools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}')) + END_VERSIONS + """ +} diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml new file mode 100644 index 00000000..5a5f452e --- /dev/null +++ b/modules/rtgtools/vcfeval/meta.yml @@ -0,0 +1,95 @@ +name: "rtgtools_vcfeval" +description: The VCFeval tool of RTG tools. It is used to evaluate called variants for agreement with a baseline variant set +keywords: + - benchmarking + - vcf + - rtg-tools +tools: + - "rtgtools": + description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation" + homepage: "https://www.realtimegenomics.com/products/rtg-tools" + documentation: "https://github.com/RealTimeGenomics/rtg-tools" + tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools" + doi: "" + licence: "['BSD']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - truth_vcf: + type: file + description: A standard VCF to compare against + pattern: "*.{vcf,vcf.gz}" + - truth_vcf_index: + type: file + description: The index of the standard VCF (optional) + pattern: "*.tbi" + - query_vcf: + type: file + description: A VCF with called variants to benchmark against the standard + pattern: "*.{vcf,vcf.gz}" + - query_vcf_index: + type: file + description: The index of the called VCF (optional) + pattern: "*.tbi" + - truth_regions: + type: file + description: A BED file containining the strict regions where VCFeval should only evaluate the fully overlapping variants (optional) + pattern: "*.bed" + - evaluation_regions: + type: file + description: A BED file containing the regions where VCFeval will evaluate every fully and partially overlapping variant (optional) + pattern: "*.bed" + - sdf: + type: file + description: The SDF (RTG Sequence Data File) folder of the reference genome + 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" + - logging: + type: file + description: Files containing logging from vcfeval + pattern: "*{done,progress,.log}" + - tp: + type: file + description: A tuple containing the VCF and TBI file for the true positive variants + pattern: "tp.vcf{.gz,.gz.tbi}" + - baseline: + type: file + description: A tuple containing the VCF and TBI file for the baseline true positive variants + pattern: "tp-baseline.vcf{.gz,.gz.tbi}" + - fp: + type: file + description: A tuple containing the VCF and TBI file for the false positive variants + pattern: "fp.vcf{.gz,.gz.tbi}" + - fn: + type: file + description: A tuple containing the VCF and TBI file for the false negative variants + pattern: "fn.vcf{.gz,.gz.tbi}" + - roc: + type: file + description: TSV files containing ROC data for the evaluated variants + pattern: "*.tsv.gz" + - summary: + type: file + description: A TXT file containing the summary of the evaluation + pattern: "summary.txt" + - phasing: + type: file + description: A TXT file containing the data on the phasing + pattern: "phasing.txt" + +authors: + - "@nvnieuwk" diff --git a/modules/salmon/index/meta.yml b/modules/salmon/index/meta.yml index 3b0cd853..53c64152 100644 --- a/modules/salmon/index/meta.yml +++ b/modules/salmon/index/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://salmon.readthedocs.io/en/latest/salmon.html manual: https://salmon.readthedocs.io/en/latest/salmon.html doi: 10.1038/nmeth.4197 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - genome_fasta: type: file diff --git a/modules/salmon/quant/meta.yml b/modules/salmon/quant/meta.yml index 223ca82b..109109d8 100644 --- a/modules/salmon/quant/meta.yml +++ b/modules/salmon/quant/meta.yml @@ -12,7 +12,7 @@ tools: homepage: https://salmon.readthedocs.io/en/latest/salmon.html manual: https://salmon.readthedocs.io/en/latest/salmon.html doi: 10.1038/nmeth.4197 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/samblaster/main.nf b/modules/samblaster/main.nf index c881389a..225c7152 100644 --- a/modules/samblaster/main.nf +++ b/modules/samblaster/main.nf @@ -2,10 +2,10 @@ process SAMBLASTER { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samblaster=0.1.26 bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samblaster=0.1.26 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-19fa9f1a5c3966b63a24166365e81da35738c5ab:ba4a02b56f3e524a6e006bcd99fe8cc1d7fe09eb-0' : - 'quay.io/biocontainers/mulled-v2-19fa9f1a5c3966b63a24166365e81da35738c5ab:ba4a02b56f3e524a6e006bcd99fe8cc1d7fe09eb-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-19fa9f1a5c3966b63a24166365e81da35738c5ab:fff03944e664bbf9a139f7b174b9cb2d4163271a-0' : + 'quay.io/biocontainers/mulled-v2-19fa9f1a5c3966b63a24166365e81da35738c5ab:fff03944e664bbf9a139f7b174b9cb2d4163271a-0' }" input: tuple val(meta), path(bam) diff --git a/modules/samblaster/meta.yml b/modules/samblaster/meta.yml index 4d51f4fe..776bef20 100644 --- a/modules/samblaster/meta.yml +++ b/modules/samblaster/meta.yml @@ -1,13 +1,13 @@ name: samblaster description: | - This module combines samtools and samblaster in order to use - samblaster capability to filter or tag SAM files, with the advantage - of maintaining both input and output in BAM format. - Samblaster input must contain a sequence header: for this reason it has been piped - with the "samtools view -h" command. - Additional desired arguments for samtools can be passed using: - options.args2 for the input bam file - options.args3 for the output bam file + This module combines samtools and samblaster in order to use + samblaster capability to filter or tag SAM files, with the advantage + of maintaining both input and output in BAM format. + Samblaster input must contain a sequence header: for this reason it has been piped + with the "samtools view -h" command. + Additional desired arguments for samtools can be passed using: + options.args2 for the input bam file + options.args3 for the output bam file keywords: - sort tools: @@ -21,7 +21,7 @@ tools: documentation: https://github.com/GregoryFaust/samblaster tool_dev_url: https://github.com/GregoryFaust/samblaster doi: "10.1093/bioinformatics/btu314" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/samtools/ampliconclip/main.nf b/modules/samtools/ampliconclip/main.nf index 69c2ff7b..2b90c953 100644 --- a/modules/samtools/ampliconclip/main.nf +++ b/modules/samtools/ampliconclip/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_AMPLICONCLIP { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) diff --git a/modules/samtools/ampliconclip/meta.yml b/modules/samtools/ampliconclip/meta.yml index 8959b98d..1107cbcd 100644 --- a/modules/samtools/ampliconclip/meta.yml +++ b/modules/samtools/ampliconclip/meta.yml @@ -7,15 +7,15 @@ keywords: - samtools ampliconclip - samtools tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - meta: diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 4b78a46e..9301d1d3 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_BAM2FQ { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(inputbam) @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam >${prefix}_interleaved.fq.gz + $inputbam | gzip --no-name > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/bam2fq/meta.yml b/modules/samtools/bam2fq/meta.yml index f35701c4..319a60cf 100644 --- a/modules/samtools/bam2fq/meta.yml +++ b/modules/samtools/bam2fq/meta.yml @@ -1,7 +1,7 @@ name: samtools_bam2fq description: | - The module uses bam2fq method from samtools to - convert a SAM, BAM or CRAM file to FASTQ format + The module uses bam2fq method from samtools to + convert a SAM, BAM or CRAM file to FASTQ format keywords: - bam2fq - samtools @@ -13,7 +13,7 @@ tools: documentation: http://www.htslib.org/doc/1.1/samtools.html tool_dev_url: None doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/samtools/collatefastq/main.nf b/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..3d9becda --- /dev/null +++ b/modules/samtools/collatefastq/main.nf @@ -0,0 +1,47 @@ +process SAMTOOLS_COLLATEFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input) + + output: + //TODO might be good to have ordered output of the fastq files, so we can + // make sure the we get the right files + tuple val(meta), path("*_{1,2}.fq.gz"), path("*_other.fq.gz"), path("*_singleton.fq.gz"), emit: reads + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + samtools collate \\ + $args \\ + --threads $task.cpus \\ + -O \\ + $input \\ + . | + + samtools fastq \\ + $args2 \\ + --threads $task.cpus \\ + -1 ${prefix}_1.fq.gz \\ + -2 ${prefix}_2.fq.gz \\ + -0 ${prefix}_other.fq.gz \\ + -s ${prefix}_singleton.fq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/collatefastq/meta.yml b/modules/samtools/collatefastq/meta.yml new file mode 100644 index 00000000..d3a2e3af --- /dev/null +++ b/modules/samtools/collatefastq/meta.yml @@ -0,0 +1,48 @@ +name: samtools_collatefastq +description: | + The module uses collate and then fastq methods from samtools to + convert a SAM, BAM or CRAM file to FASTQ format +keywords: + - bam2fq + - samtools + - fastq +tools: + - samtools: + description: Tools for dealing with SAM, BAM and CRAM files + homepage: None + documentation: http://www.htslib.org/doc/1.1/samtools.html + tool_dev_url: None + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + FASTQ files, which will be either a group of 4 files (read_1, read_2, other and singleton) + or a single interleaved .fq.gz file if the user chooses not to split the reads. + pattern: "*.fq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@lescai" + - "@maxulysse" diff --git a/modules/samtools/convert/main.nf b/modules/samtools/convert/main.nf new file mode 100644 index 00000000..e0e7d725 --- /dev/null +++ b/modules/samtools/convert/main.nf @@ -0,0 +1,42 @@ +process SAMTOOLS_CONVERT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input), path(index) + path fasta + path fai + + output: + tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: alignment_index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def output_extension = input.getExtension() == "bam" ? "cram" : "bam" + + """ + samtools view \\ + --threads ${task.cpus} \\ + --reference ${fasta} \\ + $args \\ + $input \\ + -o ${prefix}.${output_extension} + + samtools index -@${task.cpus} ${prefix}.${output_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/convert/meta.yml b/modules/samtools/convert/meta.yml new file mode 100644 index 00000000..937b1403 --- /dev/null +++ b/modules/samtools/convert/meta.yml @@ -0,0 +1,52 @@ +name: samtools_convert +description: convert and then index CRAM -> BAM or BAM -> CRAM file +keywords: + - view + - index + - bam + - cram +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - index: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" + - fasta: + type: file + description: Reference file to create the CRAM file + pattern: "*.{fasta,fa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - alignment_index: + type: file + description: filtered/converted BAM/CRAM file + index + pattern: "*{.bam/cram,.bai/crai}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/samtools/depth/main.nf b/modules/samtools/depth/main.nf index d68c5adf..e508a5f7 100644 --- a/modules/samtools/depth/main.nf +++ b/modules/samtools/depth/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_DEPTH { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) diff --git a/modules/samtools/depth/meta.yml b/modules/samtools/depth/meta.yml index a46fd332..861b04fa 100644 --- a/modules/samtools/depth/meta.yml +++ b/modules/samtools/depth/meta.yml @@ -12,7 +12,7 @@ tools: documentation: http://www.htslib.org/doc/samtools-depth.html tool_dev_url: https://github.com/samtools/samtools doi: "10.1093/bioinformatics/btp352" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index b83a4952..fdce7d9b 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FAIDX { tag "$fasta" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(fasta) @@ -29,4 +29,14 @@ process SAMTOOLS_FAIDX { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + """ + touch ${fasta}.fai + cat <<-END_VERSIONS > versions.yml + + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/faidx/meta.yml b/modules/samtools/faidx/meta.yml index bae97a39..e9767764 100644 --- a/modules/samtools/faidx/meta.yml +++ b/modules/samtools/faidx/meta.yml @@ -1,43 +1,43 @@ name: samtools_faidx description: Index FASTA file keywords: - - index - - fasta + - index + - fasta tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: FASTA file - pattern: "*.{fa,fasta}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@ewels" - - "@phue" + - "@drpatelh" + - "@ewels" + - "@phue" diff --git a/modules/samtools/fastq/main.nf b/modules/samtools/fastq/main.nf index 7eb60117..8d9b9d08 100644 --- a/modules/samtools/fastq/main.nf +++ b/modules/samtools/fastq/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FASTQ { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) diff --git a/modules/samtools/fastq/meta.yml b/modules/samtools/fastq/meta.yml index 91fd476d..41055cfb 100644 --- a/modules/samtools/fastq/meta.yml +++ b/modules/samtools/fastq/meta.yml @@ -1,43 +1,43 @@ name: samtools_fastq description: Converts a SAM/BAM/CRAM file to FASTQ keywords: - - bam - - sam - - cram - - fastq + - bam + - sam + - cram + - fastq tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: compressed FASTQ file - pattern: "*.fastq.gz" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: compressed FASTQ file + pattern: "*.fastq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@suzannejin" diff --git a/modules/samtools/fixmate/main.nf b/modules/samtools/fixmate/main.nf index c1a8164b..f5e16f67 100644 --- a/modules/samtools/fixmate/main.nf +++ b/modules/samtools/fixmate/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FIXMATE { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) diff --git a/modules/samtools/fixmate/meta.yml b/modules/samtools/fixmate/meta.yml index 2cec6e7c..a72c5ca9 100644 --- a/modules/samtools/fixmate/meta.yml +++ b/modules/samtools/fixmate/meta.yml @@ -1,24 +1,24 @@ name: samtools_fixmate description: Samtools fixmate is a tool that can fill in information (insert size, cigar, mapq) about paired end reads onto the corresponding other read. Also has options to remove secondary/unmapped alignments and recalculate whether reads are proper pairs. keywords: - - fixmate - - samtools - - insert size - - repair - - bam - - paired - - read pairs + - fixmate + - samtools + - insert size + - repair + - bam + - paired + - read pairs tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - tool_dev_url: https://github.com/samtools/samtools - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + tool_dev_url: https://github.com/samtools/samtools + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - meta: type: map diff --git a/modules/samtools/flagstat/main.nf b/modules/samtools/flagstat/main.nf index c267922b..b87b2108 100644 --- a/modules/samtools/flagstat/main.nf +++ b/modules/samtools/flagstat/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/samtools/flagstat/meta.yml b/modules/samtools/flagstat/meta.yml index 9bd9ff89..95269063 100644 --- a/modules/samtools/flagstat/meta.yml +++ b/modules/samtools/flagstat/meta.yml @@ -1,49 +1,49 @@ name: samtools_flagstat description: Counts the number of alignments in a BAM/CRAM/SAM file for each FLAG type keywords: - - stats - - mapping - - counts - - bam - - sam - - cram + - stats + - mapping + - counts + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Index for BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Index for BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - flagstat: - type: file - description: File containing samtools flagstat output - pattern: "*.{flagstat}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - flagstat: + type: file + description: File containing samtools flagstat output + pattern: "*.{flagstat}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" + - "@drpatelh" diff --git a/modules/samtools/idxstats/main.nf b/modules/samtools/idxstats/main.nf index 8a057413..a49ff35f 100644 --- a/modules/samtools/idxstats/main.nf +++ b/modules/samtools/idxstats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_IDXSTATS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/samtools/idxstats/meta.yml b/modules/samtools/idxstats/meta.yml index ec542f34..3710ab88 100644 --- a/modules/samtools/idxstats/meta.yml +++ b/modules/samtools/idxstats/meta.yml @@ -1,50 +1,50 @@ name: samtools_idxstats description: Reports alignment summary statistics for a BAM/CRAM/SAM file keywords: - - stats - - mapping - - counts - - chromosome - - bam - - sam - - cram + - stats + - mapping + - counts + - chromosome + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Index for BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Index for BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - idxstats: - type: file - description: File containing samtools idxstats output - pattern: "*.{idxstats}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - idxstats: + type: file + description: File containing samtools idxstats output + pattern: "*.{idxstats}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" + - "@drpatelh" diff --git a/modules/samtools/index/main.nf b/modules/samtools/index/main.nf index dfe0234f..e04e63e8 100644 --- a/modules/samtools/index/main.nf +++ b/modules/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(input) @@ -33,4 +33,16 @@ process SAMTOOLS_INDEX { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + """ + touch ${input}.bai + touch ${input}.crai + touch ${input}.csi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/index/meta.yml b/modules/samtools/index/meta.yml index 0905b3cd..e5cadbc2 100644 --- a/modules/samtools/index/meta.yml +++ b/modules/samtools/index/meta.yml @@ -1,53 +1,53 @@ name: samtools_index description: Index SAM/BAM/CRAM file keywords: - - index - - bam - - sam - - cram + - index + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - crai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - csi: - type: file - description: CSI index file - pattern: "*.{csi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bai: + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + - crai: + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + - csi: + type: file + description: CSI index file + pattern: "*.{csi}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@ewels" - - "@maxulysse" + - "@drpatelh" + - "@ewels" + - "@maxulysse" diff --git a/modules/samtools/merge/main.nf b/modules/samtools/merge/main.nf index be6fe32e..bbf7e8fb 100644 --- a/modules/samtools/merge/main.nf +++ b/modules/samtools/merge/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_MERGE { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(input_files) @@ -38,4 +38,16 @@ process SAMTOOLS_MERGE { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def file_type = input_files[0].getExtension() + """ + touch ${prefix}.${file_type} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/merge/meta.yml b/modules/samtools/merge/meta.yml index 2576a3a3..fb78e55c 100644 --- a/modules/samtools/merge/meta.yml +++ b/modules/samtools/merge/meta.yml @@ -1,54 +1,54 @@ name: samtools_merge description: Merge BAM or CRAM file keywords: - - merge - - bam - - sam - - cram + - merge + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input_files: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram,sam}" - - fasta: - type: optional file - description: Reference file the CRAM was created with - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input_files: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" - - cram: - type: file - description: CRAM file - pattern: "*.{cram}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + - cram: + type: file + description: CRAM file + pattern: "*.{cram}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@yuukiiwa " - - "@maxulysse" - - "@FriederikeHanssen" + - "@drpatelh" + - "@yuukiiwa " + - "@maxulysse" + - "@FriederikeHanssen" diff --git a/modules/samtools/mpileup/main.nf b/modules/samtools/mpileup/main.nf index 77afae60..fcd498be 100644 --- a/modules/samtools/mpileup/main.nf +++ b/modules/samtools/mpileup/main.nf @@ -2,13 +2,12 @@ process SAMTOOLS_MPILEUP { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" - + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(input), path(intervals) path fasta output: @@ -21,12 +20,13 @@ process SAMTOOLS_MPILEUP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def intervals = intervals ? "-l ${intervals}" : "" """ samtools mpileup \\ --fasta-ref $fasta \\ --output ${prefix}.mpileup \\ $args \\ - $bam + $input cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/samtools/mpileup/meta.yml b/modules/samtools/mpileup/meta.yml index fac7a5bc..ae499e92 100644 --- a/modules/samtools/mpileup/meta.yml +++ b/modules/samtools/mpileup/meta.yml @@ -1,48 +1,52 @@ name: samtools_mpileup -description: BAM +description: BAM keywords: - - mpileup - - bam - - sam - - cram + - mpileup + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - fasta: - type: file - description: FASTA reference file - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" + - intervals: + type: file + description: Interval FILE + pattern: "*.bed" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - mpileup: - type: file - description: mpileup file - pattern: "*.{mpileup}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - mpileup: + type: file + description: mpileup file + pattern: "*.{mpileup}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@joseespinosa" + - "@drpatelh" + - "@joseespinosa" diff --git a/modules/samtools/sort/main.nf b/modules/samtools/sort/main.nf index 0f2237cc..b4fc1cbe 100644 --- a/modules/samtools/sort/main.nf +++ b/modules/samtools/sort/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) @@ -28,4 +28,15 @@ process SAMTOOLS_SORT { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/sort/meta.yml b/modules/samtools/sort/meta.yml index 3402a068..a820c55a 100644 --- a/modules/samtools/sort/meta.yml +++ b/modules/samtools/sort/meta.yml @@ -1,44 +1,44 @@ name: samtools_sort description: Sort SAM/BAM/CRAM file keywords: - - sort - - bam - - sam - - cram + - sort + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@ewels" + - "@drpatelh" + - "@ewels" diff --git a/modules/samtools/stats/main.nf b/modules/samtools/stats/main.nf index f6fe3bfe..bbdc3240 100644 --- a/modules/samtools/stats/main.nf +++ b/modules/samtools/stats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_STATS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(input), path(input_index) @@ -34,4 +34,15 @@ process SAMTOOLS_STATS { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${input}.stats + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/stats/meta.yml b/modules/samtools/stats/meta.yml index 869e62e3..cac50b1c 100644 --- a/modules/samtools/stats/meta.yml +++ b/modules/samtools/stats/meta.yml @@ -1,53 +1,53 @@ name: samtools_stats description: Produces comprehensive statistics from SAM/BAM/CRAM file keywords: - - statistics - - counts - - bam - - sam - - cram + - statistics + - counts + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file from alignment - pattern: "*.{bam,cram}" - - input_index: - type: file - description: BAI/CRAI file from alignment - pattern: "*.{bai,crai}" - - fasta: - type: optional file - description: Reference file the CRAM was created with - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - stats: - type: file - description: File containing samtools stats output - pattern: "*.{stats}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - stats: + type: file + description: File containing samtools stats output + pattern: "*.{stats}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@FriederikeHanssen" + - "@drpatelh" + - "@FriederikeHanssen" diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index aee21a4e..55194e88 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -2,13 +2,13 @@ process SAMTOOLS_VIEW { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::samtools=1.14" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.14--hb421002_0' : - 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input), path(index) path fasta output: @@ -41,4 +41,16 @@ process SAMTOOLS_VIEW { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/view/meta.yml b/modules/samtools/view/meta.yml index 8abf34af..a8b43ecc 100644 --- a/modules/samtools/view/meta.yml +++ b/modules/samtools/view/meta.yml @@ -1,53 +1,57 @@ name: samtools_view description: filter/convert SAM/BAM/CRAM file keywords: - - view - - bam - - sam - - cram + - view + - bam + - sam + - cram tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - fasta: - type: optional file - description: Reference file the CRAM was created with - pattern: "*.{fasta,fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index: + type: optional file + description: BAM.BAI/CRAM.CRAI file + pattern: "*.{.bai,.crai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: filtered/converted BAM/SAM file - pattern: "*.{bam,sam}" - - cram: - type: file - description: filtered/converted CRAM file - pattern: "*.cram" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: filtered/converted BAM/SAM file + pattern: "*.{bam,sam}" + - cram: + type: file + description: filtered/converted CRAM file + pattern: "*.cram" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@joseespinosa" - - "@FriederikeHanssen" + - "@drpatelh" + - "@joseespinosa" + - "@FriederikeHanssen" diff --git a/modules/scoary/meta.yml b/modules/scoary/meta.yml index e8e8515e..941064c3 100644 --- a/modules/scoary/meta.yml +++ b/modules/scoary/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/AdmiralenOla/Scoary tool_dev_url: https://github.com/AdmiralenOla/Scoary doi: "10.1186/s13059-016-1108-8" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/seacr/callpeak/meta.yml b/modules/seacr/callpeak/meta.yml index 53b3415f..3e215bfb 100644 --- a/modules/seacr/callpeak/meta.yml +++ b/modules/seacr/callpeak/meta.yml @@ -1,54 +1,53 @@ - name: seacr_callpeak description: Call peaks using SEACR on sequenced reads in bedgraph format keywords: - - peak-caller - - peaks - - bedgraph - - cut&tag - - cut&run - - chromatin - - seacr + - peak-caller + - peaks + - bedgraph + - cut&tag + - cut&run + - chromatin + - seacr tools: - - seacr: - description: | - SEACR is intended to call peaks and enriched regions from sparse CUT&RUN - or chromatin profiling data in which background is dominated by "zeroes" - (i.e. regions with no read coverage). - homepage: https://github.com/FredHutch/SEACR - documentation: https://github.com/FredHutch/SEACR - licence: ['GPL-2.0-only'] + - seacr: + description: | + SEACR is intended to call peaks and enriched regions from sparse CUT&RUN + or chromatin profiling data in which background is dominated by "zeroes" + (i.e. regions with no read coverage). + homepage: https://github.com/FredHutch/SEACR + documentation: https://github.com/FredHutch/SEACR + licence: ["GPL-2.0-only"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bedgraph: - type: file - description: | - The target bedgraph file from which the peaks will be calculated. - - ctrlbedgraph: - type: file - description: | - Control (IgG) data bedgraph file to generate an empirical threshold for peak calling. - - threshold: - type: value - description: | - Threshold value used to call peaks if the ctrlbedgraph input is set to []. Set to 1 if using a control bedgraph + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bedgraph: + type: file + description: | + The target bedgraph file from which the peaks will be calculated. + - ctrlbedgraph: + type: file + description: | + Control (IgG) data bedgraph file to generate an empirical threshold for peak calling. + - threshold: + type: value + description: | + Threshold value used to call peaks if the ctrlbedgraph input is set to []. Set to 1 if using a control bedgraph output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Bed file containing the calculated peaks. - pattern: "*.bed" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed file containing the calculated peaks. + pattern: "*.bed" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@chris-cheshire" + - "@chris-cheshire" diff --git a/modules/seqkit/pair/main.nf b/modules/seqkit/pair/main.nf new file mode 100644 index 00000000..228b98bd --- /dev/null +++ b/modules/seqkit/pair/main.nf @@ -0,0 +1,40 @@ +process SEQKIT_PAIR { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::seqkit=2.1.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.1.0--h9ee0642_0': + 'quay.io/biocontainers/seqkit:2.1.0--h9ee0642_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.paired.fastq.gz") , emit: reads + tuple val(meta), path("*.unpaired.fastq.gz"), optional: true, emit: unpaired_reads + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + seqkit \\ + pair \\ + -1 ${reads[0]} \\ + -2 ${reads[1]} \\ + $args \\ + --threads $task.cpus + + # gzip fastq + find . -maxdepth 1 -name "*.fastq" -exec gzip {} \; + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/seqkit/pair/meta.yml b/modules/seqkit/pair/meta.yml new file mode 100644 index 00000000..955cfbf2 --- /dev/null +++ b/modules/seqkit/pair/meta.yml @@ -0,0 +1,48 @@ +name: seqkit_pair +description: match up paired-end reads from two fastq files +keywords: + - seqkit + - pair +tools: + - seqkit: + description: Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://bioinf.shenwei.me/seqkit/usage/ + documentation: https://bioinf.shenwei.me/seqkit/usage/ + tool_dev_url: https://github.com/shenwei356/seqkit/ + doi: "10.1371/journal.pone.0163962" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input paired-end FastQ files. + +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" + - reads: + type: file + description: Paired fastq reads + pattern: "*.paired.fastq.gz" + - unpaired_reads: + type: file + description: Unpaired reads (optional) + pattern: "*.unpaired.fastq.gz" + +authors: + - "@sateeshperi" + - "@mjcipriano" + - "@hseabolt" diff --git a/modules/seqkit/replace/main.nf b/modules/seqkit/replace/main.nf new file mode 100644 index 00000000..db189ef6 --- /dev/null +++ b/modules/seqkit/replace/main.nf @@ -0,0 +1,41 @@ +process SEQKIT_REPLACE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::seqkit=2.1.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.1.0--h9ee0642_0': + 'quay.io/biocontainers/seqkit:2.1.0--h9ee0642_0' }" + + input: + tuple val(meta), path(fastx) + + output: + tuple val(meta), path("*.fast*"), emit: fastx + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension = "fastq" + if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz/) { + extension = "fasta" + } + def endswith = task.ext.suffix ?: "${extension}.gz" + """ + seqkit \\ + replace \\ + ${args} \\ + --threads ${task.cpus} \\ + -i ${fastx} \\ + -o ${prefix}.${endswith} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/seqkit/replace/meta.yml b/modules/seqkit/replace/meta.yml new file mode 100644 index 00000000..c15d04cb --- /dev/null +++ b/modules/seqkit/replace/meta.yml @@ -0,0 +1,41 @@ +name: seqkit_replace +description: Use seqkit to find/replace strings within sequences and sequence headers +keywords: + - seqkit + - replace +tools: + - seqkit: + description: Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://bioinf.shenwei.me/seqkit/usage/ + documentation: https://bioinf.shenwei.me/seqkit/usage/ + tool_dev_url: https://github.com/shenwei356/seqkit/ + doi: "10.1371/journal.pone.016396" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastx: + type: file + description: fasta/q file + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}*" + +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" + - fastx: + type: file + description: fasta/q file with replaced values + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}*" + +authors: + - "@mjcipriano" diff --git a/modules/seqkit/split2/meta.yml b/modules/seqkit/split2/meta.yml index 90eec7f9..91c74b0c 100644 --- a/modules/seqkit/split2/meta.yml +++ b/modules/seqkit/split2/meta.yml @@ -1,39 +1,39 @@ name: seqkit_split2 description: Split single or paired-end fastq.gz files keywords: - - split - - fastq + - split + - fastq tools: - - seqkit: - description: | - Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. - homepage: https://github.com/shenwei356/seqkit - documentation: https://bioinf.shenwei.me/seqkit/ - doi: 10.1371/journal.pone.0163962 - licence: ['MIT'] + - seqkit: + description: | + Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://github.com/shenwei356/seqkit + documentation: https://bioinf.shenwei.me/seqkit/ + doi: 10.1371/journal.pone.0163962 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: FastQ files - pattern: "*.{fq.gz/fastq.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: FastQ files + pattern: "*.{fq.gz/fastq.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Split fastq files - pattern: "*.{fq.gz/fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Split fastq files + pattern: "*.{fq.gz/fastq.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@FriederikeHanssen" + - "@FriederikeHanssen" diff --git a/modules/seqkit/stats/main.nf b/modules/seqkit/stats/main.nf new file mode 100644 index 00000000..28ac77b7 --- /dev/null +++ b/modules/seqkit/stats/main.nf @@ -0,0 +1,34 @@ +process SEQKIT_STATS { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::seqkit=2.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.2.0--h9ee0642_0': + 'quay.io/biocontainers/seqkit:2.2.0--h9ee0642_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.tsv"), emit: stats + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '--all' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + seqkit stats \\ + --tabular \\ + $args \\ + $reads > '${prefix}.tsv' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit version | sed 's/seqkit v//' ) + END_VERSIONS + """ +} diff --git a/modules/seqkit/stats/meta.yml b/modules/seqkit/stats/meta.yml new file mode 100644 index 00000000..9d6e5b7e --- /dev/null +++ b/modules/seqkit/stats/meta.yml @@ -0,0 +1,44 @@ +name: "seqkit_stats" +description: simple statistics of FASTA/Q files +keywords: + - seqkit + - stats +tools: + - "seqkit": + description: Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://bioinf.shenwei.me/seqkit/usage/ + documentation: https://bioinf.shenwei.me/seqkit/usage/ + tool_dev_url: https://github.com/shenwei356/seqkit/ + doi: "10.1371/journal.pone.0163962" + licence: ["MIT"] + +input: + - meta: + type: map + description: > + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: > + Either FASTA or FASTQ files. + pattern: "*.{fa,fna,faa,fasta,fq,fastq}[.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" + - stats: + type: file + description: > + Tab-separated output file with basic sequence statistics. + pattern: "*.tsv" + +authors: + - "@Midnighter" diff --git a/modules/seqsero2/meta.yml b/modules/seqsero2/meta.yml index ceea80e3..f20c194e 100644 --- a/modules/seqsero2/meta.yml +++ b/modules/seqsero2/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/denglab/SeqSero2 tool_dev_url: https://github.com/denglab/SeqSero2 doi: "10.1128/AEM.01746-19" - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: diff --git a/modules/seqtk/mergepe/meta.yml b/modules/seqtk/mergepe/meta.yml index a342f60b..8248ee09 100644 --- a/modules/seqtk/mergepe/meta.yml +++ b/modules/seqtk/mergepe/meta.yml @@ -6,9 +6,9 @@ tools: - seqtk: description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. Seqtk mergepe command merges pair-end reads into one interleaved file. homepage: https://github.com/lh3/seqtk - documentation: https://docs.csc.fi/apps/seqtk/ + documentation: https://docs.csc.fi/apps/seqtk/ tool_dev_url: https://github.com/lh3/seqtk - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/seqtk/rename/main.nf b/modules/seqtk/rename/main.nf new file mode 100644 index 00000000..f50aad69 --- /dev/null +++ b/modules/seqtk/rename/main.nf @@ -0,0 +1,40 @@ +process SEQTK_RENAME { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::seqtk=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqtk:1.3--h5bf99c6_3' : + 'quay.io/biocontainers/seqtk:1.3--h5bf99c6_3' }" + + input: + tuple val(meta), path(sequences) + + output: + tuple val(meta), path("*.gz") , emit: sequences + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension = "fasta" + if ("$sequences" ==~ /.+\.fq|.+\.fq.gz|.+\.fastq|.+\.fastq.gz/) { + extension = "fastq" + } + """ + seqtk \\ + rename \\ + $args \\ + $sequences \\ + $prefix | \\ + gzip -c --no-name > ${prefix}.renamed.${extension}.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/seqtk/rename/meta.yml b/modules/seqtk/rename/meta.yml new file mode 100644 index 00000000..7672983c --- /dev/null +++ b/modules/seqtk/rename/meta.yml @@ -0,0 +1,42 @@ +name: seqtk_rename +description: Rename sequence names in FASTQ or FASTA files. +keywords: + - rename +tools: + - seqtk: + description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. The seqtk rename command renames sequence names. + homepage: https://github.com/lh3/seqtk + documentation: https://docs.csc.fi/apps/seqtk/ + tool_dev_url: https://github.com/lh3/seqtk + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - sequences: + type: file + description: A FASTQ or FASTA file + pattern: "*.{fastq.gz, fastq, fq, fq.gz, fasta, fastq.gz, fa, fa.gz, fas, fas.gz, fna, fna.gz}" + +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" + - sequences: + type: file + description: FASTQ/FASTA file containing renamed sequences + pattern: "*.{fastq.gz, fasta.gz}" + +authors: + - "@hseabolt" + - "@mjcipriano" + - "@sateeshperi" diff --git a/modules/seqtk/sample/meta.yml b/modules/seqtk/sample/meta.yml index 6cc4d657..d92e54e5 100644 --- a/modules/seqtk/sample/meta.yml +++ b/modules/seqtk/sample/meta.yml @@ -8,7 +8,7 @@ tools: homepage: https://github.com/lh3/seqtk documentation: https://docs.csc.fi/apps/seqtk/ tool_dev_url: https://github.com/lh3/seqtk - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/seqtk/seq/main.nf b/modules/seqtk/seq/main.nf new file mode 100644 index 00000000..d1944ef9 --- /dev/null +++ b/modules/seqtk/seq/main.nf @@ -0,0 +1,40 @@ +process SEQTK_SEQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::seqtk=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqtk:1.3--h5bf99c6_3' : + 'quay.io/biocontainers/seqtk:1.3--h5bf99c6_3' }" + + input: + tuple val(meta), path(fastx) + + output: + tuple val(meta), path("*.gz") , emit: fastx + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def extension = "fastq" + if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz/ || "$args" ==~ /\-[aA]/ ) { + extension = "fasta" + } + """ + seqtk \\ + seq \\ + $args \\ + $fastx | \\ + gzip -c > ${prefix}.seqtk-seq.${extension}.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/seqtk/seq/meta.yml b/modules/seqtk/seq/meta.yml new file mode 100644 index 00000000..3986257a --- /dev/null +++ b/modules/seqtk/seq/meta.yml @@ -0,0 +1,42 @@ +name: seqtk_seq +description: Common transformation operations on FASTA or FASTQ files. +keywords: + - seq +tools: + - seqtk: + description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. The seqtk seq command enables common transformation operations on FASTA or FASTQ files. + homepage: https://github.com/lh3/seqtk + documentation: https://docs.csc.fi/apps/seqtk/ + tool_dev_url: https://github.com/lh3/seqtk + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - sequences: + type: file + description: A FASTQ or FASTA file + pattern: "*.{fastq.gz, fastq, fq, fq.gz, fasta, fastq.gz, fa, fa.gz, fas, fas.gz, fna, fna.gz}" + +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" + - sequences: + type: file + description: FASTQ/FASTA file containing renamed sequences + pattern: "*.{fastq.gz, fasta.gz}" + +authors: + - "@hseabolt" + - "@mjcipriano" + - "@sateeshperi" diff --git a/modules/seqtk/subseq/meta.yml b/modules/seqtk/subseq/meta.yml index 0d9a802b..d06efb55 100644 --- a/modules/seqtk/subseq/meta.yml +++ b/modules/seqtk/subseq/meta.yml @@ -8,7 +8,7 @@ tools: homepage: https://github.com/lh3/seqtk documentation: https://docs.csc.fi/apps/seqtk/ tool_dev_url: https://github.com/lh3/seqtk - licence: ['MIT'] + licence: ["MIT"] input: - sequences: diff --git a/modules/sequenzautils/bam2seqz/meta.yml b/modules/sequenzautils/bam2seqz/meta.yml index e05d2fa9..0168bd68 100755 --- a/modules/sequenzautils/bam2seqz/meta.yml +++ b/modules/sequenzautils/bam2seqz/meta.yml @@ -8,7 +8,7 @@ tools: homepage: https://sequenza-utils.readthedocs.io/en/latest/index.html documentation: https://sequenza-utils.readthedocs.io/en/latest/index.html doi: 10.1093/annonc/mdu479 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/sequenzautils/gcwiggle/meta.yml b/modules/sequenzautils/gcwiggle/meta.yml index 616e073b..6e9a1483 100644 --- a/modules/sequenzautils/gcwiggle/meta.yml +++ b/modules/sequenzautils/gcwiggle/meta.yml @@ -8,7 +8,7 @@ tools: homepage: https://sequenza-utils.readthedocs.io/en/latest/index.html documentation: https://sequenza-utils.readthedocs.io/en/latest/index.html doi: 10.1093/annonc/mdu479 - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - meta: type: map diff --git a/modules/seqwish/induce/meta.yml b/modules/seqwish/induce/meta.yml index 281e3994..b40360c6 100644 --- a/modules/seqwish/induce/meta.yml +++ b/modules/seqwish/induce/meta.yml @@ -1,47 +1,47 @@ name: seqwish_induce description: Induce a variation graph in GFA format from alignments in PAF format keywords: - - induce - - paf - - gfa - - graph - - variation graph + - induce + - paf + - gfa + - graph + - variation graph tools: - - seqwish: - description: | - seqwish implements a lossless conversion from pairwise alignments between - sequences to a variation graph encoding the sequences and their alignments. - homepage: https://github.com/ekg/seqwish - documentation: https://github.com/ekg/seqwish - licence: ['MIT'] + - seqwish: + description: | + seqwish implements a lossless conversion from pairwise alignments between + sequences to a variation graph encoding the sequences and their alignments. + homepage: https://github.com/ekg/seqwish + documentation: https://github.com/ekg/seqwish + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - paf: - type: file - description: PAF file of alignments - pattern: "*.{paf,paf.gz}" - - fasta: - type: file - description: FASTA file used to generate alignments - pattern: "*.{fa,fa.gz,fasta,fasta.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: PAF file of alignments + pattern: "*.{paf,paf.gz}" + - fasta: + type: file + description: FASTA file used to generate alignments + pattern: "*.{fa,fa.gz,fasta,fasta.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gfa: - type: file - description: Variation graph in GFA 1.0 format - pattern: "*.{gfa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gfa: + type: file + description: Variation graph in GFA 1.0 format + pattern: "*.{gfa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@heuermh" + - "@heuermh" diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf new file mode 100644 index 00000000..0e288435 --- /dev/null +++ b/modules/shasum/main.nf @@ -0,0 +1,35 @@ +process SHASUM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.sha256"), emit: checksum + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + sha256sum \\ + $args \\ + ${file} \\ + > ${file}.sha256 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sha256sum: \$(echo \$(sha256sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/shasum/meta.yml b/modules/shasum/meta.yml new file mode 100644 index 00000000..f16e0771 --- /dev/null +++ b/modules/shasum/meta.yml @@ -0,0 +1,40 @@ +name: "shasum" +description: Print SHA256 (256-bit) checksums. +keywords: + - checksum + - sha256 +tools: + - "md5sum": + description: Create an SHA256 (256-bit) checksum. + homepage: "https://www.gnu.org" + documentation: "https://linux.die.net/man/1/shasum" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + 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" + - checksum: + type: file + description: File containing checksum + pattern: "*.sha256" + +authors: + - "@matthdsm" diff --git a/modules/shigatyper/main.nf b/modules/shigatyper/main.nf new file mode 100644 index 00000000..9d5c189a --- /dev/null +++ b/modules/shigatyper/main.nf @@ -0,0 +1,64 @@ +process SHIGATYPER { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::shigatyper=2.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/shigatyper%3A2.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/shigatyper:2.0.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}-hits.tsv"), optional: true, emit: hits + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + if (meta.is_ont) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --ont \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else if (meta.single_end) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else { + """ + shigatyper \\ + $args \\ + --R1 ${reads[0]} \\ + --R2 ${reads[1]} \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } +} diff --git a/modules/shigatyper/meta.yml b/modules/shigatyper/meta.yml new file mode 100644 index 00000000..ebaded6b --- /dev/null +++ b/modules/shigatyper/meta.yml @@ -0,0 +1,47 @@ +name: "shigatyper" +description: Determine Shigella serotype from Illumina or Oxford Nanopore reads +keywords: + - fastq + - shigella + - serotype +tools: + - "shigatyper": + description: "Typing tool for Shigella spp. from WGS Illumina sequencing" + homepage: "https://github.com/CFSAN-Biostatistics/shigatyper" + documentation: "https://github.com/CFSAN-Biostatistics/shigatyper" + tool_dev_url: "https://github.com/CFSAN-Biostatistics/shigatyper" + doi: "10.1128/AEM.00165-19" + licence: "['Public Domain']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false, is_ont:false ] + - reads: + type: file + description: Illumina or Nanopore FASTQ file + pattern: "*.fastq.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" + - tsv: + type: file + description: A TSV formatted file with ShigaTyper results + pattern: "*.tsv" + - hits: + type: file + description: A TSV formatted file with individual gene hits + pattern: "*-hits.tsv" + +authors: + - "@rpetit3" diff --git a/modules/sistr/main.nf b/modules/sistr/main.nf new file mode 100644 index 00000000..0301d053 --- /dev/null +++ b/modules/sistr/main.nf @@ -0,0 +1,49 @@ +process SISTR { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::sistr_cmd=1.1.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sistr_cmd:1.1.1--pyh864c0ab_2': + 'quay.io/biocontainers/sistr_cmd:1.1.1--pyh864c0ab_2' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.tab") , emit: tsv + tuple val(meta), path("*-allele.fasta"), emit: allele_fasta + tuple val(meta), path("*-allele.json") , emit: allele_json + tuple val(meta), path("*-cgmlst.csv") , emit: cgmlst_csv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def is_compressed = fasta.getName().endsWith(".gz") ? true : false + def fasta_name = fasta.getName().replace(".gz", "") + """ + if [ "$is_compressed" == "true" ]; then + gzip -c -d $fasta > $fasta_name + fi + + sistr \\ + --qc \\ + $args \\ + --threads $task.cpus \\ + --alleles-output ${prefix}-allele.json \\ + --novel-alleles ${prefix}-allele.fasta \\ + --cgmlst-profiles ${prefix}-cgmlst.csv \\ + --output-prediction ${prefix} \\ + --output-format tab \\ + $fasta_name + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sistr: \$(echo \$(sistr --version 2>&1) | sed 's/^.*sistr_cmd //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/sistr/meta.yml b/modules/sistr/meta.yml new file mode 100644 index 00000000..db8399f6 --- /dev/null +++ b/modules/sistr/meta.yml @@ -0,0 +1,55 @@ +name: sistr +description: Serovar prediction of salmonella assemblies +keywords: + - bacteria + - fasta + - salmonella +tools: + - sistr: + description: Salmonella In Silico Typing Resource (SISTR) commandline tool for serovar prediction + homepage: https://github.com/phac-nml/sistr_cmd + documentation: https://github.com/phac-nml/sistr_cmd + tool_dev_url: https://github.com/phac-nml/sistr_cmd + doi: "10.1371/journal.pone.0147101" + licence: ["Apache-2.0"] + +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}" + +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: SISTR serovar prediction + pattern: "*.{tsv}" + - allele_json: + type: file + description: Allele sequences and info to JSON + pattern: "*.{json}" + - allele_fasta: + type: file + description: FASTA file destination of novel cgMLST alleles + pattern: "*.{fasta}" + - cgmlst_csv: + type: file + description: CSV file destination for cgMLST allelic profiles + pattern: "*.{csv}" + +authors: + - "@rpetit3" diff --git a/modules/slimfastq/main.nf b/modules/slimfastq/main.nf new file mode 100644 index 00000000..19ca876f --- /dev/null +++ b/modules/slimfastq/main.nf @@ -0,0 +1,52 @@ +def VERSION = '2.04' + +process SLIMFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::slimfastq=2.04" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/slimfastq:2.04--h87f3376_2': + 'quay.io/biocontainers/slimfastq:2.04--h87f3376_2' }" + + input: + tuple val(meta), path(fastq) + + output: + tuple val(meta), path("*.sfq"), emit: sfq + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if (meta.single_end) { + """ + gzip -d -c '${fastq}' | slimfastq \\ + $args \\ + -f '${prefix}.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } else { + """ + gzip -d -c '${fastq[0]}' | slimfastq \\ + $args \\ + -f '${prefix}_1.sfq' + + gzip -d -c '${fastq[1]}' | slimfastq \\ + $args \\ + -f '${prefix}_2.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } +} diff --git a/modules/slimfastq/meta.yml b/modules/slimfastq/meta.yml new file mode 100644 index 00000000..3b040f25 --- /dev/null +++ b/modules/slimfastq/meta.yml @@ -0,0 +1,41 @@ +name: "slimfastq" +description: Fast, efficient, lossless compression of FASTQ files. +keywords: + - FASTQ + - compression + - lossless +tools: + - "slimfastq": + description: "slimfastq efficiently compresses/decompresses FASTQ files" + homepage: "https://github.com/Infinidat/slimfastq" + tool_dev_url: "https://github.com/Infinidat/slimfastq" + licence: "['BSD-3-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: Either a single-end FASTQ file or paired-end files. + pattern: "*.{fq.gz,fastq.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" + - sfq: + type: file + description: Either one or two sequence files in slimfastq compressed format. + pattern: "*.{sfq}" + +authors: + - "@Midnighter" diff --git a/modules/snapaligner/align/main.nf b/modules/snapaligner/align/main.nf new file mode 100644 index 00000000..ef7af561 --- /dev/null +++ b/modules/snapaligner/align/main.nf @@ -0,0 +1,42 @@ +process SNAPALIGNER_ALIGN { + tag '$meta.id' + label 'process_high' + + conda (params.enable_conda ? "bioconda::snap-aligner=2.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.1--hd03093a_1': + 'quay.io/biocontainers/snap-aligner:2.0.1--hd03093a_1' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def subcmd = meta.single_end ? "single" : "paired" + + """ + mkdir -p index + mv $index index/ + + snap-aligner ${subcmd} \\ + index \\ + ${reads.join(" ")} \\ + -o ${prefix}.bam \\ + -t ${task.cpus} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snapaligner: \$(snap-aligner 2>&1| head -n 1 | sed 's/^.*version //;s/.\$//') + END_VERSIONS + """ +} diff --git a/modules/snapaligner/align/meta.yml b/modules/snapaligner/align/meta.yml new file mode 100644 index 00000000..611b0b71 --- /dev/null +++ b/modules/snapaligner/align/meta.yml @@ -0,0 +1,48 @@ +name: "snapaligner_align" +description: Performs fastq alignment to a fasta reference using SNAP +keywords: + - alignment + - map + - fastq + - bam + - sam +tools: + - "snapaligner": + description: "Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data" + homepage: "http://snap.cs.berkeley.edu" + documentation: "https://1drv.ms/b/s!AhuEg_0yZD86hcpblUt-muHKYsG8fA?e=R8ogug" + tool_dev_url: "https://github.com/amplab/snap" + doi: "10.1101/2021.11.23.469039" + licence: "['Apache v2']" +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: List of input fastq files of size 2 for paired fastq or 1 for bam or single fastq + pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" + - index: + type: file + description: List of SNAP genome index files + pattern: "{Genome,GenomeIndex,GenomeIndexHash,OverflowTable}" + +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" + - bam: + type: file + description: Aligned BAM file + pattern: "*.{bam}" + +authors: + - "@matthdsm" diff --git a/modules/snapaligner/index/main.nf b/modules/snapaligner/index/main.nf new file mode 100644 index 00000000..6dc2c958 --- /dev/null +++ b/modules/snapaligner/index/main.nf @@ -0,0 +1,59 @@ +process SNAPALIGNER_INDEX { + tag '$fasta' + label 'process_high' + + conda (params.enable_conda ? "bioconda::snap-aligner=2.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.1--hd03093a_1': + 'quay.io/biocontainers/snap-aligner:2.0.1--hd03093a_1' }" + + input: + path fasta + path altcontigfile + path nonaltcontigfile + path altliftoverfile + + output: + path "snap/*" ,emit: index + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def altcontigfile_arg = altcontigfile ? '-altContigFile ' + altcontigfile : '' + def nonaltcontigfile_arg = nonaltcontigfile ? '-nonAltContigFile ' + nonaltcontigfile : '' + def altliftoverfile_arg = altliftoverfile ? '-altLiftoverFile ' + altliftoverfile : '' + """ + mkdir snap + + snap-aligner \\ + index \\ + $fasta \\ + snap \\ + -t${task.cpus} \\ + $altcontigfile_arg \\ + $nonaltcontigfile_arg \\ + $altliftoverfile_arg \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snapaligner: \$(snap-aligner 2>&1| head -n 1 | sed 's/^.*version //') + END_VERSIONS + """ + stub: + """ + mkdir snap + echo "Genome" > snap/Genome + echo "GenomeIndex" > snap/GenomeIndex + echo "GenomeIndexHash" > snap/GenomeIndexHash + echo "OverflowTable" > snap/OverflowTable + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snapaligner: \$(snap-aligner 2>&1| head -n 1 | sed 's/^.*version //;s/\.\$//') + END_VERSIONS + """ +} diff --git a/modules/snapaligner/index/meta.yml b/modules/snapaligner/index/meta.yml new file mode 100644 index 00000000..6d5e0f19 --- /dev/null +++ b/modules/snapaligner/index/meta.yml @@ -0,0 +1,39 @@ +name: "snapaligner_index" +description: Create a SNAP index for reference genome +keywords: + - index + - fasta + - genome + - reference +tools: + - "snapaligner": + description: "Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data" + homepage: "http://snap.cs.berkeley.edu" + documentation: "https://1drv.ms/b/s!AhuEg_0yZD86hcpblUt-muHKYsG8fA?e=R8ogug" + tool_dev_url: "https://github.com/amplab/snap" + doi: "10.1101/2021.11.23.469039" + licence: "['Apache v2']" +input: + - fasta: + type: file + description: Input genome fasta file + - altcontigfile: + type: file + description: Optional file with a list of alt contig names, one per line. + - nonaltcontigfile: + type: file + description: Optional file that contains a list of contigs (one per line) that will not be marked ALT regardless of size. + - altliftoverfile: + type: file + description: Optional file containing ALT-to-REF mappings (SAM format). e.g., hs38DH.fa.alt from bwa-kit. +output: + - index: + type: file + description: SNAP genome index files + pattern: "{Genome,GenomeIndex,GenomeIndexHash,OverflowTable}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/modules/snpdists/meta.yml b/modules/snpdists/meta.yml index bf4366ff..4eee3902 100644 --- a/modules/snpdists/meta.yml +++ b/modules/snpdists/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/tseemann/snp-dists tool_dev_url: https://github.com/tseemann/snp-dists doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/snpeff/Dockerfile b/modules/snpeff/Dockerfile index 608716a4..d0e34757 100644 --- a/modules/snpeff/Dockerfile +++ b/modules/snpeff/Dockerfile @@ -8,15 +8,16 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-snpeff-5.0/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SNPEFF_CACHE_VERSION=99 +ARG SNPEFF_TAG=99 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-snpeff-${SNPEFF_TAG}/bin:$PATH # Download Genome RUN snpEff download -v ${GENOME}.${SNPEFF_CACHE_VERSION} # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-snpeff-5.0 > nf-core-snpeff-5.0.yml +RUN conda env export --name nf-core-snpeff-${SNPEFF_TAG} > nf-core-snpeff-${SNPEFF_TAG}.yml diff --git a/modules/snpeff/build.sh b/modules/snpeff/build.sh old mode 100755 new mode 100644 index b94ffd69..2fccf9a8 --- a/modules/snpeff/build.sh +++ b/modules/snpeff/build.sh @@ -9,10 +9,11 @@ build_push() { SNPEFF_TAG=$3 docker build \ + . \ -t nfcore/snpeff:${SNPEFF_TAG}.${GENOME} \ - software/snpeff/. \ --build-arg GENOME=${GENOME} \ - --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} + --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} \ + --build-arg SNPEFF_TAG=${SNPEFF_TAG} docker push nfcore/snpeff:${SNPEFF_TAG}.${GENOME} } diff --git a/modules/snpeff/meta.yml b/modules/snpeff/meta.yml index 8ba18683..2f0d866e 100644 --- a/modules/snpeff/meta.yml +++ b/modules/snpeff/meta.yml @@ -1,58 +1,46 @@ name: snpEff description: Genetic variant annotation and functional effect prediction toolbox keywords: - - annotation + - annotation tools: - - snpeff: - description: | - SnpEff is a variant annotation and effect prediction tool. - It annotates and predicts the effects of genetic variants on genes and proteins (such as amino acid changes). - homepage: https://pcingola.github.io/SnpEff/ - documentation: https://pcingola.github.io/SnpEff/se_introduction/ - licence: ['MIT'] -params: - - use_cache: - type: boolean - description: | - boolean to enable the usage of containers with cache - Enable the usage of containers with cache - Does not work with conda - - snpeff_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/snpeff/tags + - snpeff: + description: | + SnpEff is a variant annotation and effect prediction tool. + It annotates and predicts the effects of genetic variants on genes and proteins (such as amino acid changes). + homepage: https://pcingola.github.io/SnpEff/ + documentation: https://pcingola.github.io/SnpEff/se_introduction/ + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - vcf to annotate - - db: - type: value - description: | - which db to annotate with - - cache: - type: file - description: | - path to snpEff cache (optional) + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - db: + type: value + description: | + which db to annotate with + - cache: + type: file + description: | + path to snpEff cache (optional) output: - - vcf: - type: file - description: | - annotated vcf - pattern: "*.ann.vcf" - - report: - type: file - description: snpEff report file - pattern: "*.html" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - vcf: + type: file + description: | + annotated vcf + pattern: "*.ann.vcf" + - report: + type: file + description: snpEff report file + pattern: "*.html" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/snpsift/split/meta.yml b/modules/snpsift/split/meta.yml index 5a125b62..48673c47 100644 --- a/modules/snpsift/split/meta.yml +++ b/modules/snpsift/split/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://pcingola.github.io/SnpEff/ss_introduction/ tool_dev_url: https://github.com/pcingola/SnpEff doi: "10.3389/fgene.2012.00035" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/snpsites/meta.yml b/modules/snpsites/meta.yml index 381d25cc..4149aeef 100644 --- a/modules/snpsites/meta.yml +++ b/modules/snpsites/meta.yml @@ -9,7 +9,7 @@ tools: description: Rapidly extracts SNPs from a multi-FASTA alignment. homepage: https://www.sanger.ac.uk/tool/snp-sites/ documentation: https://github.com/sanger-pathogens/snp-sites - licence: ['GPL-3.0-or-later'] + licence: ["GPL-3.0-or-later"] input: - alignment: type: file diff --git a/modules/sourmash/sketch/main.nf b/modules/sourmash/sketch/main.nf new file mode 100644 index 00000000..e16b605f --- /dev/null +++ b/modules/sourmash/sketch/main.nf @@ -0,0 +1,35 @@ +process SOURMASH_SKETCH { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::sourmash=4.2.4" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sourmash:4.2.4--hdfd78af_0': + 'quay.io/biocontainers/sourmash:4.2.4--hdfd78af_0' }" + + input: + tuple val(meta), path(sequence) + + output: + tuple val(meta), path("*.sig"), emit: signatures + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "dna --param-string 'scaled=1000,k=31'" + def prefix = task.ext.prefix ?: "${meta.id}" + """ + sourmash sketch \\ + $args \\ + --merge '${prefix}' \\ + --output '${prefix}.sig' \\ + $sequence + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sourmash: \$(echo \$(sourmash --version 2>&1) | sed 's/^sourmash //' ) + END_VERSIONS + """ +} diff --git a/modules/sourmash/sketch/meta.yml b/modules/sourmash/sketch/meta.yml new file mode 100644 index 00000000..083774b5 --- /dev/null +++ b/modules/sourmash/sketch/meta.yml @@ -0,0 +1,42 @@ +name: sourmash_sketch +description: Create a signature (a hash sketch) of a sequence using sourmash +keywords: + - hash sketch + - signature +tools: + - sourmash: + description: Compute and compare MinHash signatures for DNA data sets. + homepage: https://sourmash.readthedocs.io/ + documentation: https://sourmash.readthedocs.io/ + tool_dev_url: https://github.com/dib-lab/sourmash + doi: "10.1186/s13059-016-0997-x" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sequence: + type: file + description: FastA file containing (genomic) sequence data + pattern: "*.{fna,fa,fasta}" + +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" + - signatures: + type: file + description: MinHash signature of the given sequence + pattern: "*.{sig}" + +authors: + - "@Midnighter" diff --git a/modules/spades/meta.yml b/modules/spades/meta.yml index b6878d3d..e49cd139 100644 --- a/modules/spades/meta.yml +++ b/modules/spades/meta.yml @@ -13,7 +13,7 @@ tools: documentation: http://cab.spbu.ru/files/release3.15.0/manual.html tool_dev_url: https://github.com/ablab/spades doi: 10.1089/cmb.2012.0021 - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: type: map @@ -36,8 +36,7 @@ input: List of input FastQ files of size 1, originating from Oxford Nanopore technology. - hmm: type: file - description: - File or directory with amino acid HMMs for Spades HMM-guided mode. + description: File or directory with amino acid HMMs for Spades HMM-guided mode. output: - meta: type: map diff --git a/modules/spatyper/meta.yml b/modules/spatyper/meta.yml index 94f17a69..5fb7cc18 100644 --- a/modules/spatyper/meta.yml +++ b/modules/spatyper/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/HCGB-IGTP/spaTyper tool_dev_url: https://github.com/HCGB-IGTP/spaTyper doi: https://doi.org/10.5281/zenodo.4063625 - licence: ['LGPL v3'] + licence: ["LGPL v3"] input: - meta: diff --git a/modules/sratools/fasterqdump/main.nf b/modules/sratools/fasterqdump/main.nf index 1980ffeb..18f46e51 100644 --- a/modules/sratools/fasterqdump/main.nf +++ b/modules/sratools/fasterqdump/main.nf @@ -9,6 +9,7 @@ process SRATOOLS_FASTERQDUMP { input: tuple val(meta), path(sra) + path ncbi_settings output: tuple val(meta), path(output), emit: reads @@ -20,17 +21,12 @@ process SRATOOLS_FASTERQDUMP { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" // Paired-end data extracted by fasterq-dump (--split-3 the default) always creates // *_1.fastq *_2.fastq files but sometimes also an additional *.fastq file // for unpaired reads which we ignore here. output = meta.single_end ? '*.fastq.gz' : '*_{1,2}.fastq.gz' """ - eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" - if [[ ! -f "\${NCBI_SETTINGS}" ]]; then - mkdir -p "\$(dirname "\${NCBI_SETTINGS}")" - printf '${config}' > "\${NCBI_SETTINGS}" - fi + export NCBI_SETTINGS="\$PWD/${ncbi_settings}" fasterq-dump \\ $args \\ diff --git a/modules/sratools/fasterqdump/meta.yml b/modules/sratools/fasterqdump/meta.yml index 1478bed8..d6fbd444 100644 --- a/modules/sratools/fasterqdump/meta.yml +++ b/modules/sratools/fasterqdump/meta.yml @@ -10,7 +10,7 @@ tools: homepage: https://github.com/ncbi/sra-tools documentation: https://github.com/ncbi/sra-tools/wiki tool_dev_url: https://github.com/ncbi/sra-tools - licence: ['US-Government-Work'] + licence: ["Public Domain"] input: - meta: @@ -22,6 +22,11 @@ input: type: directory description: Directory containing ETL data for the given SRA. pattern: "*/*.sra" + - ncbi_settings: + type: file + description: > + An NCBI user settings file. + pattern: "*.mkfg" output: - meta: diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 2233d0aa..3426ae12 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -1,43 +1,25 @@ process SRATOOLS_PREFETCH { tag "$id" label 'process_low' - label 'error_retry' conda (params.enable_conda ? 'bioconda::sra-tools=2.11.0' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5262h314213e_0' : - 'quay.io/biocontainers/sra-tools:2.11.0--pl5262h314213e_0' }" + 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5321ha49a11a_3' : + 'quay.io/biocontainers/sra-tools:2.11.0--pl5321ha49a11a_3' }" input: tuple val(meta), val(id) + path ncbi_settings output: - tuple val(meta), path("$id"), emit: sra - path "versions.yml" , emit: versions + tuple val(meta), path(id), emit: sra + path 'versions.yml' , emit: versions when: task.ext.when == null || task.ext.when - script: - def args = task.ext.args ?: '' - def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" - """ - eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" - if [[ ! -f "\${NCBI_SETTINGS}" ]]; then - mkdir -p "\$(dirname "\${NCBI_SETTINGS}")" - printf '${config}' > "\${NCBI_SETTINGS}" - fi - - prefetch \\ - $args \\ - --progress \\ - $id - - vdb-validate $id - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sratools: \$(prefetch --version 2>&1 | grep -Eo '[0-9.]+') - END_VERSIONS - """ + shell: + args = task.ext.args ?: '' + args2 = task.ext.args2 ?: '5 1 100' // + template 'retry_with_backoff.sh' } diff --git a/modules/sratools/prefetch/meta.yml b/modules/sratools/prefetch/meta.yml index 22213b29..a3a26522 100644 --- a/modules/sratools/prefetch/meta.yml +++ b/modules/sratools/prefetch/meta.yml @@ -10,7 +10,7 @@ tools: homepage: https://github.com/ncbi/sra-tools documentation: https://github.com/ncbi/sra-tools/wiki tool_dev_url: https://github.com/ncbi/sra-tools - licence: ['US-Government-Work'] + licence: ["Public Domain"] input: - meta: @@ -22,6 +22,11 @@ input: type: val description: > A string denoting an SRA id. + - ncbi_settings: + type: file + description: > + An NCBI user settings file. + pattern: "*.mkfg" output: - meta: diff --git a/modules/sratools/prefetch/templates/retry_with_backoff.sh b/modules/sratools/prefetch/templates/retry_with_backoff.sh new file mode 100755 index 00000000..cec0ab43 --- /dev/null +++ b/modules/sratools/prefetch/templates/retry_with_backoff.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +set -u + +retry_with_backoff() { + local max_attempts=${1} + local delay=${2} + local max_time=${3} + local attempt=1 + local output= + local status= + + # Remove the first three arguments to this function in order to access + # the 'real' command with `${@}`. + shift 3 + + while [ ${attempt} -le ${max_attempts} ]; do + output=$("${@}") + status=${?} + + if [ ${status} -eq 0 ]; then + break + fi + + if [ ${attempt} -lt ${max_attempts} ]; then + echo "Failed attempt ${attempt} of ${max_attempts}. Retrying in ${delay} s." >&2 + sleep ${delay} + elif [ ${attempt} -eq ${max_attempts} ]; then + echo "Failed after ${attempt} attempts." >&2 + return ${status} + fi + + attempt=$(( ${attempt} + 1 )) + delay=$(( ${delay} * 2 )) + if [ ${delay} -ge ${max_time} ]; then + delay=${max_time} + fi + done + + echo "${output}" +} + +export NCBI_SETTINGS="$PWD/!{ncbi_settings}" + +retry_with_backoff !{args2} \ + prefetch \ + !{args} \ + !{id} + +vdb-validate !{id} + +cat <<-END_VERSIONS > versions.yml +"!{task.process}": + sratools: $(prefetch --version 2>&1 | grep -Eo '[0-9.]+') +END_VERSIONS diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..e8a91716 --- /dev/null +++ b/modules/srst2/srst2/main.nf @@ -0,0 +1,47 @@ +process SRST2_SRST2 { + tag "${meta.id}" + label 'process_low' + + conda (params.enable_conda ? "bioconda::srst2=0.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/srst2%3A0.2.0--py27_2': + 'quay.io/biocontainers/srst2:0.2.0--py27_2'}" + + input: + tuple val(meta), path(fastq_s), path(db) + + output: + tuple val(meta), path("*_genes_*_results.txt") , optional:true, emit: gene_results + tuple val(meta), path("*_fullgenes_*_results.txt") , optional:true, emit: fullgene_results + tuple val(meta), path("*_mlst_*_results.txt") , optional:true, emit: mlst_results + tuple val(meta), path("*.pileup") , emit: pileup + tuple val(meta), path("*.sorted.bam") , emit: sorted_bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def read_s = meta.single_end ? "--input_se ${fastq_s}" : "--input_pe ${fastq_s[0]} ${fastq_s[1]}" + if (meta.db=="gene") { + database = "--gene_db ${db}" + } else if (meta.db=="mlst") { + database = "--mlst_db ${db}" + } else { + error "Please set meta.db to either \"gene\" or \"mlst\"" + } + """ + srst2 \\ + ${read_s} \\ + --threads $task.cpus \\ + --output ${prefix} \\ + ${database} \\ + $args + cat <<-END_VERSIONS > versions.yml + "${task.process}": + srst2: \$(echo \$(srst2 --version 2>&1) | sed 's/srst2 //' )) + END_VERSIONS + """ +} diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml new file mode 100644 index 00000000..94c763bb --- /dev/null +++ b/modules/srst2/srst2/meta.yml @@ -0,0 +1,72 @@ +name: srst2_srst2 +description: | + Short Read Sequence Typing for Bacterial Pathogens is a program designed to take Illumina sequence data, + a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) + and report the presence of STs and/or reference genes. +keywords: + - mlst + - typing + - illumina +tools: + - srst2: + description: "Short Read Sequence Typing for Bacterial Pathogens" + homepage: "http://katholt.github.io/srst2/" + documentation: "https://github.com/katholt/srst2/blob/master/README.md" + tool_dev_url: "https://github.com/katholt/srst2" + doi: "10.1186/s13073-014-0090-6" + licence: ["BSD"] + +input: + - meta: + type: map0.2.0-4 + description: | + Groovy Map containing sample information + id: should be the identification number or sample name + single_end: should be true for single end data and false for paired in data + db: should be either 'gene' to use the --gene_db option or "mlst" to use the --mlst_db option + e.g. [ id:'sample', single_end:false , db:'gene'] + - fasta: + type: file + description: | + gzipped fasta file. If files are NOT in + MiSeq format sample_S1_L001_R1_001.fastq.gz uses --forward and --reverse parameters; otherwise + default is _1, i.e. expect forward reads as sample_1.fastq.gz). + pattern: "*.fastq.gz" + - db: + type: file + description: Database in FASTA format + pattern: "*.fasta" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - txt: + type: file + description: A detailed report, with one row per gene per sample described here github.com/katholt/srst2#gene-typing + pattern: "*_fullgenes_*_results.txt" + - txt: + type: file + description: A tabulated summary report of samples x genes. + pattern: "*_genes_*_results.txt" + - txt: + type: file + description: A tabulated summary report of mlst subtyping. + pattern: "*_mlst_*_results.txt" + - bam: + type: file + description: Sorted BAM file + pattern: "*.sorted.bam" + - pileup: + type: file + description: SAMtools pileup file + pattern: "*.pileup" + +authors: + - "@jvhagey" diff --git a/modules/ssuissero/main.nf b/modules/ssuissero/main.nf new file mode 100644 index 00000000..d1e5744a --- /dev/null +++ b/modules/ssuissero/main.nf @@ -0,0 +1,44 @@ +def VERSION = '1.0.1' // Version information not provided by tool on CLI + +process SSUISSERO { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::ssuissero=1.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ssuissero%3A1.0.1--hdfd78af_0': + 'quay.io/biocontainers/ssuissero:1.0.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.tsv"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def is_compressed = fasta.getName().endsWith(".gz") ? true : false + def fasta_name = fasta.getName().replace(".gz", "") + """ + if [ "$is_compressed" == "true" ]; then + gzip -c -d $fasta > $fasta_name + fi + + SsuisSero.sh \\ + -i $fasta_name \\ + -o ./ \\ + -s $prefix \\ + -x fasta \\ + -t $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ssuissero: $VERSION + END_VERSIONS + """ +} diff --git a/modules/ssuissero/meta.yml b/modules/ssuissero/meta.yml new file mode 100644 index 00000000..8418e049 --- /dev/null +++ b/modules/ssuissero/meta.yml @@ -0,0 +1,43 @@ +name: ssuissero +description: Serotype prediction of Streptococcus suis assemblies +keywords: + - bacteria + - fasta + - streptococcus +tools: + - ssuissero: + description: Rapid Streptococcus suis serotyping pipeline for Nanopore Data + homepage: https://github.com/jimmyliu1326/SsuisSero + documentation: https://github.com/jimmyliu1326/SsuisSero + tool_dev_url: https://github.com/jimmyliu1326/SsuisSero + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Assembly in FASTA format + pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.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" + - tsv: + type: file + description: Tab-delimited serotype prediction + pattern: "*.{tsv}" + +authors: + - "@rpetit3" diff --git a/modules/stadeniolib/scramble/main.nf b/modules/stadeniolib/scramble/main.nf new file mode 100644 index 00000000..e24fb2cb --- /dev/null +++ b/modules/stadeniolib/scramble/main.nf @@ -0,0 +1,61 @@ +process STADENIOLIB_SCRAMBLE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::staden_io_lib=1.14.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/staden_io_lib:1.14.14--h0d9da7e_3' : + 'quay.io/biocontainers/staden_io_lib:1.14.14--h0d9da7e_3' }" + + input: + tuple val(meta), path(reads) + path(fasta) + path(fai) + path(gzi) + + output: + tuple val(meta), path("*.cram") ,emit: cram + path "*.gzi" ,emit: gzi, optional: true + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def inputformat = reads.getExtension + def outputformat = "cram" + if ("-O sam" in args) { + outputformat = "sam" + } else if ("-O bam" in args) { + outputformat = "bam" + } + + def reference = if fasta && fai : "--r ${fasta}" else "" + if (outputformat == "cram" && !reference) { + error "Cannot convert to CRAM without a reference" + } + + def gz_index = if gzi : "--g ${gzi}" else "" + if (outputformat == "cram" || outputformat == "sam") { + gz_index = "" + warning "Cannot use gzip index for CRAM or SAM output" + } + + """ + scramble \ + $args \ + -I ${inputformat} \ + $reference \ + -t $task.cpus \ + ${reads} \ + ${prefix}.${outputformat} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stadeniolib: \$(echo \$(scramble -h | head -n 1 |sed 's/^.*version //')) + END_VERSIONS + """ +} diff --git a/modules/stadeniolib/scramble/meta.yml b/modules/stadeniolib/scramble/meta.yml new file mode 100644 index 00000000..7e53a1b4 --- /dev/null +++ b/modules/stadeniolib/scramble/meta.yml @@ -0,0 +1,58 @@ +name: "stadeniolib_scramble" +description: Advanced sequence file format conversions +keywords: + - sam + - bam + - cram + - compression +tools: + - "scramble": + description: "Staden Package 'io_lib' (sometimes referred to as libstaden-read by distributions). This contains code for reading and writing a variety of Bioinformatics / DNA Sequence formats." + homepage: "https://github.com/jkbonfield/io_lib" + documentation: "https://github.com/jkbonfield/io_lib/blob/master/README.md" + tool_dev_url: "https://github.com/jkbonfield/io_lib" + licence: "['BSD']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fa,fasta}" + - fai: + type: file + description: FASTA index file from samtools faidx + pattern: "*.{fai}" + - gzi: + type: file + description: Optional gzip index file for BAM inputs + pattern: "*.gzi" + +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" + - reads: + type: file + description: Converted reads + pattern: "*.{sam, bam, cram}" + - gzi: + type: Optional file + description: gzip index file for BAM outputs + pattern: ".{bam.gzi}" +authors: + - "@matthdsm" diff --git a/modules/staphopiasccmec/meta.yml b/modules/staphopiasccmec/meta.yml index 006e5389..38c920ed 100644 --- a/modules/staphopiasccmec/meta.yml +++ b/modules/staphopiasccmec/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/staphopia/staphopia-sccmec tool_dev_url: https://github.com/staphopia/staphopia-sccmec doi: https://doi.org/10.7717/peerj.5261 - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index 7c965d07..762b84f6 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -29,6 +29,7 @@ process STAR_ALIGN { tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq tuple val(meta), path('*.tab') , optional:true, emit: tab tuple val(meta), path('*.out.junction') , optional:true, emit: junction + tuple val(meta), path('*.out.sam') , optional:true, emit: sam when: task.ext.when == null || task.ext.when diff --git a/modules/star/align/meta.yml b/modules/star/align/meta.yml index 2d78b81a..7ee10f1c 100644 --- a/modules/star/align/meta.yml +++ b/modules/star/align/meta.yml @@ -13,7 +13,7 @@ tools: homepage: https://github.com/alexdobin/STAR manual: https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf doi: 10.1093/bioinformatics/bts635 - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/star/genomegenerate/main.nf b/modules/star/genomegenerate/main.nf index 50d280dd..e5568f1d 100644 --- a/modules/star/genomegenerate/main.nf +++ b/modules/star/genomegenerate/main.nf @@ -3,10 +3,10 @@ process STAR_GENOMEGENERATE { label 'process_high' // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::star=2.7.9a bioconda::samtools=1.13 conda-forge::gawk=5.1.0" : null) + conda (params.enable_conda ? "bioconda::star=2.7.9a bioconda::samtools=1.15.1 conda-forge::gawk=5.1.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:a7908dfb0485a80ca94e4d17b0ac991532e4e989-0' : - 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:a7908dfb0485a80ca94e4d17b0ac991532e4e989-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' }" input: path fasta diff --git a/modules/star/genomegenerate/meta.yml b/modules/star/genomegenerate/meta.yml index 04ade195..8181157a 100644 --- a/modules/star/genomegenerate/meta.yml +++ b/modules/star/genomegenerate/meta.yml @@ -13,7 +13,7 @@ tools: homepage: https://github.com/alexdobin/STAR manual: https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf doi: 10.1093/bioinformatics/bts635 - licence: ['MIT'] + licence: ["MIT"] input: - fasta: type: file diff --git a/modules/stranger/main.nf b/modules/stranger/main.nf new file mode 100644 index 00000000..ddfa0070 --- /dev/null +++ b/modules/stranger/main.nf @@ -0,0 +1,47 @@ +process STRANGER { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::stranger=0.8.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/stranger:0.8.1--pyh5e36f6f_0': + 'quay.io/biocontainers/stranger:0.8.1--pyh5e36f6f_0' }" + + input: + tuple val(meta), path(vcf) + path variant_catalog + + output: + tuple val(meta), path("*.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def options_variant_catalog = variant_catalog ? "--repeats-file $variant_catalog" : "" + """ + stranger \\ + $args \\ + $vcf \\ + $options_variant_catalog | gzip --no-name > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stranger: \$( stranger --version ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stranger: \$( stranger --version ) + END_VERSIONS + """ +} diff --git a/modules/stranger/meta.yml b/modules/stranger/meta.yml new file mode 100644 index 00000000..0707d806 --- /dev/null +++ b/modules/stranger/meta.yml @@ -0,0 +1,48 @@ +name: stranger +description: Annotates output files from ExpansionHunter with the pathologic implications of the repeat sizes. +keywords: + - STR + - repeat_expansions + - annotate + - vcf +tools: + - stranger: + description: Annotate VCF files with str variants + homepage: https://github.com/moonso/stranger + documentation: https://github.com/moonso/stranger + tool_dev_url: https://github.com/moonso/stranger + doi: "10.5281/zenodo.4548873" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF with repeat expansions + pattern: "*.{vcf.gz,vcf}" + - variant_catalog: + type: file + description: json file with repeat expansion sites to genotype + pattern: "*.{json}" + +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" + - vcf: + type: file + description: annotated VCF with keys STR_STATUS, NormalMax and PathologicMin + pattern: "*.{vcf.gz}" + +authors: + - "@ljmesi" diff --git a/modules/strelka/germline/main.nf b/modules/strelka/germline/main.nf index 1ce0da31..3f47d86f 100644 --- a/modules/strelka/germline/main.nf +++ b/modules/strelka/germline/main.nf @@ -8,11 +8,9 @@ process STRELKA_GERMLINE { 'quay.io/biocontainers/strelka:2.9.10--0' }" input: - tuple val(meta), path(input), path(input_index) + tuple val(meta), path(input), path(input_index), path (target_bed), path (target_bed_tbi) path fasta path fai - path target_bed - path target_bed_tbi output: tuple val(meta), path("*variants.vcf.gz") , emit: vcf @@ -27,7 +25,7 @@ process STRELKA_GERMLINE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def regions = target_bed ? "--exome --callRegions ${target_bed}" : "" + def regions = target_bed ? "--callRegions ${target_bed}" : "" """ configureStrelkaGermlineWorkflow.py \\ --bam $input \\ diff --git a/modules/strelka/germline/meta.yml b/modules/strelka/germline/meta.yml index 2eeb0f8f..c119532d 100644 --- a/modules/strelka/germline/meta.yml +++ b/modules/strelka/germline/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/Illumina/strelka/blob/v2.9.x/docs/userGuide/README.md tool_dev_url: https://github.com/Illumina/strelka doi: 10.1038/s41592-018-0051-x - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/strelka/somatic/main.nf b/modules/strelka/somatic/main.nf index 22cce8cb..b61c09bd 100644 --- a/modules/strelka/somatic/main.nf +++ b/modules/strelka/somatic/main.nf @@ -8,11 +8,9 @@ process STRELKA_SOMATIC { 'quay.io/biocontainers/strelka:2.9.10--h9ee0642_1' }" input: - tuple val(meta), path(input_normal), path(input_index_normal), path(input_tumor), path(input_index_tumor), path(manta_candidate_small_indels), path(manta_candidate_small_indels_tbi) + tuple val(meta), path(input_normal), path(input_index_normal), path(input_tumor), path(input_index_tumor), path(manta_candidate_small_indels), path(manta_candidate_small_indels_tbi), path(target_bed), path(target_bed_index) path fasta path fai - path target_bed - path target_bed_tbi output: tuple val(meta), path("*.somatic_indels.vcf.gz") , emit: vcf_indels @@ -27,15 +25,16 @@ process STRELKA_SOMATIC { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def options_target_bed = target_bed ? "--exome --callRegions ${target_bed}" : "" + def options_target_bed = target_bed ? "--callRegions ${target_bed}" : "" def options_manta = manta_candidate_small_indels ? "--indelCandidates ${manta_candidate_small_indels}" : "" """ + configureStrelkaSomaticWorkflow.py \\ --tumor $input_tumor \\ --normal $input_normal \\ --referenceFasta $fasta \\ - $options_target_bed \\ - $options_manta \\ + ${options_target_bed} \\ + ${options_manta} \\ $args \\ --runDir strelka diff --git a/modules/strelka/somatic/meta.yml b/modules/strelka/somatic/meta.yml index 076c1036..b2a25504 100644 --- a/modules/strelka/somatic/meta.yml +++ b/modules/strelka/somatic/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/Illumina/strelka/blob/v2.9.x/docs/userGuide/README.md tool_dev_url: https://github.com/Illumina/strelka doi: 10.1038/s41592-018-0051-x - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index aa11eb36..c8460c94 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -2,10 +2,10 @@ process STRINGTIE_MERGE { label 'process_medium' // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: path stringtie_gtf diff --git a/modules/stringtie/merge/meta.yml b/modules/stringtie/merge/meta.yml index 02899766..df66696f 100644 --- a/modules/stringtie/merge/meta.yml +++ b/modules/stringtie/merge/meta.yml @@ -1,37 +1,37 @@ name: stringtie_merge description: Merges the annotation gtf file and the stringtie output gtf files keywords: - - merge - - gtf - - reference + - merge + - gtf + - reference tools: - - stringtie2: - description: | - Transcript assembly and quantification for RNA-Seq - homepage: https://ccb.jhu.edu/software/stringtie/index.shtml - documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual - licence: ['MIT'] + - stringtie2: + description: | + Transcript assembly and quantification for RNA-Seq + homepage: https://ccb.jhu.edu/software/stringtie/index.shtml + documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual + licence: ["MIT"] input: - - stringtie_gtf: - type: file - description: | - Stringtie transcript gtf output(s). - pattern: "*.gtf" - - annotation_gtf: - type: file - description: | - Annotation gtf file. - pattern: "*.gtf" + - stringtie_gtf: + type: file + description: | + Stringtie transcript gtf output(s). + pattern: "*.gtf" + - annotation_gtf: + type: file + description: | + Annotation gtf file. + pattern: "*.gtf" output: - - merged_gtf: - type: map - description: | - Merged gtf from annotation and stringtie output gtfs. - pattern: "*.gtf" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - merged_gtf: + type: map + description: | + Merged gtf from annotation and stringtie output gtfs. + pattern: "*.gtf" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@yuukiiwa" + - "@yuukiiwa" diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index f37e347a..c70c9819 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -1,11 +1,11 @@ -process STRINGTIE { +process STRINGTIE_STRINGTIE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) diff --git a/modules/stringtie/stringtie/meta.yml b/modules/stringtie/stringtie/meta.yml index 7e854caa..0dda84d0 100644 --- a/modules/stringtie/stringtie/meta.yml +++ b/modules/stringtie/stringtie/meta.yml @@ -1,57 +1,57 @@ -name: stringtie +name: stringtie_stringtie description: Transcript assembly and quantification for RNA-Se keywords: - - transcript - - assembly - - quantification - - gtf + - transcript + - assembly + - quantification + - gtf tools: - - stringtie2: - description: | - Transcript assembly and quantification for RNA-Seq - homepage: https://ccb.jhu.edu/software/stringtie/index.shtml - documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual - licence: ['MIT'] + - stringtie2: + description: | + Transcript assembly and quantification for RNA-Seq + homepage: https://ccb.jhu.edu/software/stringtie/index.shtml + documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: | - Stringtie transcript gtf output(s). - - gtf: - type: file - description: | - Annotation gtf file. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + Stringtie transcript gtf output(s). + - gtf: + type: file + description: | + Annotation gtf file. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - transcript_gtf: - type: file - description: transcript gtf - pattern: "*.{transcripts.gtf}" - - coverage_gtf: - type: file - description: coverage gtf - pattern: "*.{coverage.gtf}" - - abudance: - type: file - description: abudance - pattern: "*.{abudance.txt}" - - ballgown: - type: file - description: for running ballgown - pattern: "*.{ballgown}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - transcript_gtf: + type: file + description: transcript gtf + pattern: "*.{transcripts.gtf}" + - coverage_gtf: + type: file + description: coverage gtf + pattern: "*.{coverage.gtf}" + - abudance: + type: file + description: abudance + pattern: "*.{abudance.txt}" + - ballgown: + type: file + description: for running ballgown + pattern: "*.{ballgown}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" + - "@drpatelh" diff --git a/modules/subread/featurecounts/meta.yml b/modules/subread/featurecounts/meta.yml index 1100a091..cf02f1ea 100644 --- a/modules/subread/featurecounts/meta.yml +++ b/modules/subread/featurecounts/meta.yml @@ -1,10 +1,10 @@ name: subread_featurecounts description: Count reads that map to genomic features keywords: - - counts - - fasta - - genome - - reference + - counts + - fasta + - genome + - reference tools: - featurecounts: @@ -12,14 +12,14 @@ tools: homepage: http://bioinf.wehi.edu.au/featureCounts/ documentation: http://bioinf.wehi.edu.au/subread-package/SubreadUsersGuide.pdf doi: "10.1093/bioinformatics/btt656" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - bam: type: file description: BAM/SAM file containing read alignments @@ -33,8 +33,8 @@ output: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - counts: type: file description: Counts of reads mapping to features diff --git a/modules/svdb/merge/main.nf b/modules/svdb/merge/main.nf index 1f479ea4..0d56fea2 100644 --- a/modules/svdb/merge/main.nf +++ b/modules/svdb/merge/main.nf @@ -2,10 +2,10 @@ process SVDB_MERGE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': - 'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcfs) @@ -21,15 +21,20 @@ process SVDB_MERGE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input = "" - for (int index = 0; index < vcfs.size(); index++) { - input += " ${vcfs[index]}:${priority[index]}" + def input = "${vcfs.join(" ")}" + def prio = "" + if(priority) { + prio = "--priority ${priority.join(',')}" + input = "" + for (int index = 0; index < vcfs.size(); index++) { + input += " ${vcfs[index]}:${priority[index]}" + } } """ svdb \\ --merge \\ $args \\ - --priority ${priority.join(',')} \\ + $prio \\ --vcf $input \\ > ${prefix}_sv_merge.vcf diff --git a/modules/svdb/merge/meta.yml b/modules/svdb/merge/meta.yml index 2092ddd9..e166bad0 100644 --- a/modules/svdb/merge/meta.yml +++ b/modules/svdb/merge/meta.yml @@ -7,7 +7,7 @@ tools: description: structural variant database software homepage: https://github.com/J35P312/SVDB documentation: https://github.com/J35P312/SVDB/blob/master/README.md - licence: ['MIT'] + licence: ["MIT"] input: - meta: type: map diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf index 292fe4ce..dbab5259 100644 --- a/modules/svdb/query/main.nf +++ b/modules/svdb/query/main.nf @@ -2,32 +2,68 @@ process SVDB_QUERY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': - 'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcf) - path (vcf_db) + val(in_occs) + val(in_frqs) + val(out_occs) + val(out_frqs) + path (vcf_dbs) output: - tuple val(meta), path("*_ann_svdbq.vcf"), emit: vcf + tuple val(meta), path("*_query.vcf"), emit: vcf path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def in_occ = "" + def in_frq = "" + def out_occ = "" + def out_frq = "" + if (in_occs) { + in_occ = "--in_occ ${in_occs.join(',')}" + } + if (in_frqs) { + in_frq = "--in_frq ${in_frqs.join(',')}" + } + if (out_occs) { + out_occ = "--out_occ ${out_occs.join(',')}" + } + if (out_frqs) { + out_frq = "--out_frq ${out_frqs.join(',')}" + } + """ svdb \\ --query \\ + $in_occ \\ + $in_frq \\ + $out_occ \\ + $out_frq \\ $args \\ - --db $vcf_db \\ + --db ${vcf_dbs.join(',')} \\ --query_vcf $vcf \\ - >${prefix}_ann_svdbq.vcf + --prefix ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_query.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/svdb/query/meta.yml b/modules/svdb/query/meta.yml index 264b1904..57e67e15 100644 --- a/modules/svdb/query/meta.yml +++ b/modules/svdb/query/meta.yml @@ -7,7 +7,7 @@ tools: description: structural variant database software homepage: https://github.com/J35P312/SVDB documentation: https://github.com/J35P312/SVDB/blob/master/README.md - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -15,6 +15,12 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - in_occs: + type: list + description: A list of allele count tags + - in_frqs: + type: list + description: A list of allele frequency tags - vcf: type: file description: query vcf file @@ -34,10 +40,16 @@ output: type: file description: File containing software versions pattern: "versions.yml" + - out_occs: + type: list + description: A list of allele count tags + - out_frqs: + type: list + description: A list of allele frequency tags - vcf: type: file - description: Annotated output VCF file - pattern: "*_ann_svdbq.vcf" + description: Annotated output VCF file + pattern: "*_query.vcf" authors: - "@ramprasadn" diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index 90940a5d..18e83c84 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -11,17 +11,20 @@ process TABIX_BGZIP { tuple val(meta), path(input) output: - tuple val(meta), path("*.gz"), emit: gz - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}*"), emit: output + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" + in_bgzip = input.toString().endsWith(".gz") + command1 = in_bgzip ? '-d' : '-c' + command2 = in_bgzip ? '' : " > ${prefix}.${input.getExtension()}.gz" """ - bgzip -c $args $input > ${prefix}.${input.getExtension()}.gz + bgzip $command1 $args -@${task.cpus} $input $command2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/tabix/bgzip/meta.yml b/modules/tabix/bgzip/meta.yml index f8318c7c..50070175 100644 --- a/modules/tabix/bgzip/meta.yml +++ b/modules/tabix/bgzip/meta.yml @@ -1,41 +1,42 @@ name: tabix_bgzip -description: Compresses files +description: Compresses/decompresses files keywords: - - compress - - bgzip - - tabix + - compress + - decompress + - bgzip + - tabix tools: - - bgzip: - description: | - Bgzip compresses files in a similar manner to, and compatible with, gzip. - homepage: https://www.htslib.org/doc/tabix.html - documentation: http://www.htslib.org/doc/bgzip.html - doi: 10.1093/bioinformatics/btp352 - licence: ['MIT'] + - bgzip: + description: | + Bgzip compresses or decompresses files in a similar manner to, and compatible with, gzip. + homepage: https://www.htslib.org/doc/tabix.html + documentation: http://www.htslib.org/doc/bgzip.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - file: - type: file - description: text file + - 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 ] - - file: - type: file - description: Output compressed file - pattern: "*.{gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - 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: "*." + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" - - "@maxulysse" + - "@joseespinosa" + - "@drpatelh" + - "@maxulysse" diff --git a/modules/tabix/bgziptabix/main.nf b/modules/tabix/bgziptabix/main.nf index 3f42ad21..77fd91a5 100644 --- a/modules/tabix/bgziptabix/main.nf +++ b/modules/tabix/bgziptabix/main.nf @@ -22,7 +22,7 @@ process TABIX_BGZIPTABIX { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - bgzip -c $args $input > ${prefix}.gz + bgzip --threads ${task.cpus} -c $args $input > ${prefix}.gz tabix $args2 ${prefix}.gz cat <<-END_VERSIONS > versions.yml @@ -30,4 +30,16 @@ process TABIX_BGZIPTABIX { tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.gz + touch ${prefix}.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/tabix/bgziptabix/meta.yml b/modules/tabix/bgziptabix/meta.yml index f2aed84d..49c03289 100644 --- a/modules/tabix/bgziptabix/meta.yml +++ b/modules/tabix/bgziptabix/meta.yml @@ -1,45 +1,45 @@ name: tabix_bgziptabix description: bgzip a sorted tab-delimited genome file and then create tabix index keywords: - - bgzip - - compress - - index - - tabix - - vcf + - bgzip + - compress + - index + - tabix + - vcf tools: - - tabix: - description: Generic indexer for TAB-delimited genome position files. - homepage: https://www.htslib.org/doc/tabix.html - documentation: https://www.htslib.org/doc/tabix.1.html - doi: 10.1093/bioinformatics/btq671 - licence: ['MIT'] + - tabix: + description: Generic indexer for TAB-delimited genome position files. + homepage: https://www.htslib.org/doc/tabix.html + documentation: https://www.htslib.org/doc/tabix.1.html + doi: 10.1093/bioinformatics/btq671 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tab: - type: file - description: TAB-delimited genome position file - pattern: "*.{bed,gff,sam,vcf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tab: + type: file + description: TAB-delimited genome position file + pattern: "*.{bed,gff,sam,vcf}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gz: - type: file - description: Output compressed file - pattern: "*.{gz}" - - tbi: - type: file - description: tabix index file - pattern: "*.{gz.tbi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gz: + type: file + description: Output compressed file + pattern: "*.{gz}" + - tbi: + type: file + description: tabix index file + pattern: "*.{gz.tbi}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/tabix/tabix/main.nf b/modules/tabix/tabix/main.nf index 5f516261..e155e468 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -11,7 +11,8 @@ process TABIX_TABIX { tuple val(meta), path(tab) output: - tuple val(meta), path("*.tbi"), emit: tbi + tuple val(meta), path("*.tbi"), optional:true, emit: tbi + tuple val(meta), path("*.csi"), optional:true, emit: csi path "versions.yml" , emit: versions when: @@ -27,4 +28,15 @@ process TABIX_TABIX { tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${tab}.tbi + cat <<-END_VERSIONS > versions.yml + + "${task.process}": + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/tabix/tabix/meta.yml b/modules/tabix/tabix/meta.yml index 2e37c4ff..fcc6e524 100644 --- a/modules/tabix/tabix/meta.yml +++ b/modules/tabix/tabix/meta.yml @@ -1,41 +1,45 @@ name: tabix_tabix description: create tabix index from a sorted bgzip tab-delimited genome file keywords: - - index - - tabix - - vcf + - index + - tabix + - vcf tools: - - tabix: - description: Generic indexer for TAB-delimited genome position files. - homepage: https://www.htslib.org/doc/tabix.html - documentation: https://www.htslib.org/doc/tabix.1.html - doi: 10.1093/bioinformatics/btq671 - licence: ['MIT'] + - tabix: + description: Generic indexer for TAB-delimited genome position files. + homepage: https://www.htslib.org/doc/tabix.html + documentation: https://www.htslib.org/doc/tabix.1.html + doi: 10.1093/bioinformatics/btq671 + licence: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tab: - type: file - description: TAB-delimited genome position file compressed with bgzip - pattern: "*.{bed.gz,gff.gz,sam.gz,vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tab: + type: file + description: TAB-delimited genome position file compressed with bgzip + pattern: "*.{bed.gz,gff.gz,sam.gz,vcf.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tbi: - type: file - description: tabix index file - pattern: "*.{tbi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tbi: + type: file + description: tabix index file + pattern: "*.{tbi}" + - csi: + type: file + description: coordinate sorted index file + pattern: "*.{csi}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" - - "@maxulysse" + - "@joseespinosa" + - "@drpatelh" + - "@maxulysse" diff --git a/modules/tbprofiler/profile/meta.yml b/modules/tbprofiler/profile/meta.yml index 0cac6d6b..5923cb32 100644 --- a/modules/tbprofiler/profile/meta.yml +++ b/modules/tbprofiler/profile/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://jodyphelan.gitbook.io/tb-profiler/ tool_dev_url: https://github.com/jodyphelan/TBProfiler doi: "10.1186/s13073-019-0650-x" - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: diff --git a/modules/tiddit/cov/main.nf b/modules/tiddit/cov/main.nf index a5f8c649..578c4043 100644 --- a/modules/tiddit/cov/main.nf +++ b/modules/tiddit/cov/main.nf @@ -36,4 +36,16 @@ process TIDDIT_COV { tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.wig + touch ${prefix}.tab + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 454dfc54..b3e3813c 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -24,7 +24,7 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" + def reference = fasta ? "--ref $fasta" : "" """ tiddit \\ --sv \\ @@ -38,4 +38,17 @@ process TIDDIT_SV { tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf + touch ${prefix}.ploidy.tab + touch ${prefix}.signals.tab + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/tiddit/sv/meta.yml b/modules/tiddit/sv/meta.yml index f788ffa6..fc307081 100644 --- a/modules/tiddit/sv/meta.yml +++ b/modules/tiddit/sv/meta.yml @@ -1,51 +1,51 @@ name: tiddit_sv description: Identify chromosomal rearrangements. keywords: - - structural - - variants - - vcf + - structural + - variants + - vcf tools: - - sv: - description: Search for structural variants. - homepage: https://github.com/SciLifeLab/TIDDIT - documentation: https://github.com/SciLifeLab/TIDDIT/blob/master/README.md - doi: 10.12688/f1000research.11168.1 - licence: ['GPL-3.0-or-later'] + - sv: + description: Search for structural variants. + homepage: https://github.com/SciLifeLab/TIDDIT + documentation: https://github.com/SciLifeLab/TIDDIT/blob/master/README.md + doi: 10.12688/f1000research.11168.1 + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input FASTA file - pattern: "*.{fasta,fa}" - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input FASTA file + pattern: "*.{fasta,fa}" + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: vcf - pattern: "*.{vcf}" - - ploidy: - type: file - description: tab - pattern: "*.{ploidy.tab}" - - signals: - type: file - description: tab - pattern: "*.{signals.tab}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: vcf + pattern: "*.{vcf}" + - ploidy: + type: file + description: tab + pattern: "*.{ploidy.tab}" + - signals: + type: file + description: tab + pattern: "*.{signals.tab}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@maxulysse" + - "@maxulysse" diff --git a/modules/transdecoder/longorf/meta.yml b/modules/transdecoder/longorf/meta.yml index d4749f4b..b039a261 100644 --- a/modules/transdecoder/longorf/meta.yml +++ b/modules/transdecoder/longorf/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/TransDecoder/TransDecoder/wiki tool_dev_url: https://github.com/TransDecoder/TransDecoder doi: "" - licence: ['Broad Institute'] + licence: ["Broad Institute"] input: - meta: diff --git a/modules/transdecoder/predict/meta.yml b/modules/transdecoder/predict/meta.yml index e25ce3a2..cb972112 100644 --- a/modules/transdecoder/predict/meta.yml +++ b/modules/transdecoder/predict/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/TransDecoder/TransDecoder/wiki tool_dev_url: https://github.com/TransDecoder/TransDecoder doi: "" - licence: ['Broad Institute'] + licence: ["Broad Institute"] input: - meta: diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index 9487c799..3a3fca90 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -11,12 +11,13 @@ process TRIMGALORE { tuple val(meta), path(reads) output: - tuple val(meta), path("*.fq.gz") , emit: reads - tuple val(meta), path("*report.txt"), emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("*{trimmed,val}*.fq.gz"), emit: reads + tuple val(meta), path("*report.txt") , emit: log + path "versions.yml" , emit: versions - tuple val(meta), path("*.html"), emit: html optional true - tuple val(meta), path("*.zip") , emit: zip optional true + tuple val(meta), path("*unpaired*.fq.gz") , emit: unpaired, optional: true + tuple val(meta), path("*.html") , emit: html , optional: true + tuple val(meta), path("*.zip") , emit: zip , optional: true when: task.ext.when == null || task.ext.when @@ -52,6 +53,7 @@ process TRIMGALORE { $c_r1 \\ $tpc_r1 \\ ${prefix}.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') @@ -73,6 +75,7 @@ process TRIMGALORE { $tpc_r2 \\ ${prefix}_1.fastq.gz \\ ${prefix}_2.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') diff --git a/modules/trimgalore/meta.yml b/modules/trimgalore/meta.yml index c7e1df1d..439f566d 100644 --- a/modules/trimgalore/meta.yml +++ b/modules/trimgalore/meta.yml @@ -1,59 +1,64 @@ name: trimgalore description: Trim FastQ files using Trim Galore! keywords: - - trimming - - adapters - - sequencing adapters - - fastq + - trimming + - adapters + - sequencing adapters + - fastq tools: - - trimgalore: - description: | - A wrapper tool around Cutadapt and FastQC to consistently apply quality - and adapter trimming to FastQ files, with some extra functionality for - MspI-digested RRBS-type (Reduced Representation Bisufite-Seq) libraries. - homepage: https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/ - documentation: https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md - licence: ['GPL-3.0-or-later'] + - trimgalore: + description: | + A wrapper tool around Cutadapt and FastQC to consistently apply quality + and adapter trimming to FastQ files, with some extra functionality for + MspI-digested RRBS-type (Reduced Representation Bisufite-Seq) libraries. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/ + documentation: https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md + licence: ["GPL-3.0-or-later"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input adapter trimmed FastQ files of size 1 and 2 for - single-end and paired-end data, respectively. - pattern: "*.{fq.gz}" - - html: - type: file - description: FastQC report (optional) - pattern: "*_{fastqc.html}" - - zip: - type: file - description: FastQC report archive (optional) - pattern: "*_{fastqc.zip}" - - log: - type: file - description: Trim Galore! trimming report - pattern: "*_{report.txt}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input adapter trimmed FastQ files of size 1 and 2 for + single-end and paired-end data, respectively. + pattern: "*.{fq.gz}" + - unpaired: + type: file + description: | + FastQ files containing unpaired reads from read 1 or read 2 + pattern: "*unpaired*.fq.gz" + - html: + type: file + description: FastQC report (optional) + pattern: "*_{fastqc.html}" + - zip: + type: file + description: FastQC report archive (optional) + pattern: "*_{fastqc.zip}" + - log: + type: file + description: Trim Galore! trimming report + pattern: "*_{report.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@ewels" - - "@FelixKrueger" + - "@drpatelh" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/ucsc/bedclip/meta.yml b/modules/ucsc/bedclip/meta.yml index c7372925..e6dd8ceb 100755 --- a/modules/ucsc/bedclip/meta.yml +++ b/modules/ucsc/bedclip/meta.yml @@ -9,7 +9,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['varies; see http://genome.ucsc.edu/license'] + licence: ["varies; see http://genome.ucsc.edu/license"] input: - meta: diff --git a/modules/ucsc/bigwigaverageoverbed/meta.yml b/modules/ucsc/bigwigaverageoverbed/meta.yml index c2b31f88..96a3cabd 100644 --- a/modules/ucsc/bigwigaverageoverbed/meta.yml +++ b/modules/ucsc/bigwigaverageoverbed/meta.yml @@ -10,7 +10,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['varies; see http://genome.ucsc.edu/license'] + licence: ["varies; see http://genome.ucsc.edu/license"] input: - meta: diff --git a/modules/ucsc/liftover/meta.yml b/modules/ucsc/liftover/meta.yml index 5c2febdc..9047558c 100644 --- a/modules/ucsc/liftover/meta.yml +++ b/modules/ucsc/liftover/meta.yml @@ -9,7 +9,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['varies; see http://genome.ucsc.edu/license'] + licence: ["varies; see http://genome.ucsc.edu/license"] input: - meta: diff --git a/modules/ucsc/wigtobigwig/main.nf b/modules/ucsc/wigtobigwig/main.nf index d07e7ec1..2af7190b 100644 --- a/modules/ucsc/wigtobigwig/main.nf +++ b/modules/ucsc/wigtobigwig/main.nf @@ -35,4 +35,15 @@ process UCSC_WIGTOBIGWIG { ucsc: $VERSION END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bw + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ } diff --git a/modules/ucsc/wigtobigwig/meta.yml b/modules/ucsc/wigtobigwig/meta.yml index 5ca94bb4..8eed29bb 100644 --- a/modules/ucsc/wigtobigwig/meta.yml +++ b/modules/ucsc/wigtobigwig/meta.yml @@ -12,7 +12,7 @@ tools: documentation: None tool_dev_url: None doi: "" - licence: ['varies; see http://genome.ucsc.edu/license'] + licence: ["varies; see http://genome.ucsc.edu/license"] input: - meta: diff --git a/modules/ultra/pipeline/meta.yml b/modules/ultra/pipeline/meta.yml index fa8366e8..1f1f7f11 100644 --- a/modules/ultra/pipeline/meta.yml +++ b/modules/ultra/pipeline/meta.yml @@ -10,7 +10,7 @@ tools: documentation: https://github.com/ksahlin/uLTRA tool_dev_url: https://github.com/ksahlin/uLTRA doi: "10.1093/bioinformatics/btab540" - licence: ['GNU GPLV3'] + licence: ["GNU GPLV3"] input: - meta: diff --git a/modules/umitools/dedup/main.nf b/modules/umitools/dedup/main.nf index 1e46a612..dfcbcf2f 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -11,8 +11,11 @@ process UMITOOLS_DEDUP { tuple val(meta), path(bam), path(bai) output: - tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*edit_distance.tsv"), emit: tsv_edit_distance + tuple val(meta), path("*per_umi.tsv") , emit: tsv_per_umi + tuple val(meta), path("*per_position.tsv") , emit: tsv_umi_per_position + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,11 +23,13 @@ process UMITOOLS_DEDUP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def paired = meta.single_end ? "" : "--paired" + def paired = meta.single_end ? "" : "--paired" """ - umi_tools dedup \\ + umi_tools \\ + dedup \\ -I $bam \\ -S ${prefix}.bam \\ + --output-stats $prefix \\ $paired \\ $args diff --git a/modules/umitools/dedup/meta.yml b/modules/umitools/dedup/meta.yml index f89cc1ea..eee8952f 100644 --- a/modules/umitools/dedup/meta.yml +++ b/modules/umitools/dedup/meta.yml @@ -1,47 +1,59 @@ name: umitools_dedup description: Deduplicate reads based on the mapping co-ordinate and the UMI attached to the read. keywords: - - umitools - - deduplication + - umitools + - deduplication tools: - - umi_tools: - description: > - UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) - and single cell RNA-Seq cell barcodes - documentation: https://umi-tools.readthedocs.io/en/latest/ - license: ['MIT'] + - umi_tools: + description: > + UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) + and single cell RNA-Seq cell barcodes + documentation: https://umi-tools.readthedocs.io/en/latest/ + license: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: | - BAM file containing reads to be deduplicated via UMIs. - pattern: "*.{bam}" - - bai: - type: file - description: | - BAM index files corresponding to the input BAM file. - pattern: "*.{bai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + BAM file containing reads to be deduplicated via UMIs. + pattern: "*.{bam}" + - bai: + type: file + description: | + BAM index files corresponding to the input BAM file. + pattern: "*.{bai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file with deduplicated UMIs. - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file with deduplicated UMIs. + pattern: "*.{bam}" + - tsv_edit_distance: + type: file + description: Reports the (binned) average edit distance between the UMIs at each position. + pattern: "*edit_distance.tsv" + - tsv_per_umi: + type: file + description: UMI-level summary statistics. + pattern: "*per_umi.tsv" + - tsv_umi_per_position: + type: file + description: Tabulates the counts for unique combinations of UMI and position. + pattern: "*per_position.tsv" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@grst" - - "@klkeys" + - "@drpatelh" + - "@grst" + - "@klkeys" diff --git a/modules/umitools/extract/meta.yml b/modules/umitools/extract/meta.yml index ae6f9fee..7fc23f72 100644 --- a/modules/umitools/extract/meta.yml +++ b/modules/umitools/extract/meta.yml @@ -1,46 +1,47 @@ name: umitools_extract description: Extracts UMI barcode from a read and add it to the read name, leaving any sample barcode in place keywords: - - umitools - - extract + - umitools + - extract tools: - - umi_tools: - description: > - UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) - and single cell RNA-Seq cell barcodes - documentation: https://umi-tools.readthedocs.io/en/latest/ - license: ['MIT'] + - umi_tools: + description: > + UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) + and single cell RNA-Seq cell barcodes + documentation: https://umi-tools.readthedocs.io/en/latest/ + license: ["MIT"] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: list - description: | - List of input FASTQ files whose UMIs will be extracted. + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: list + description: | + List of input FASTQ files whose UMIs will be extracted. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Extracted FASTQ files. | - For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | - For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. - pattern: "*.{fastq.gz}" - - log: - type: file - description: Logfile for umi_tools - pattern: "*.{log}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: > + Extracted FASTQ files. | + For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | + For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. + pattern: "*.{fastq.gz}" + - log: + type: file + description: Logfile for umi_tools + pattern: "*.{log}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@drpatelh" - - "@grst" + - "@drpatelh" + - "@grst" diff --git a/modules/unicycler/meta.yml b/modules/unicycler/meta.yml index b04ac882..918faaf8 100644 --- a/modules/unicycler/meta.yml +++ b/modules/unicycler/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://github.com/rrwick/Unicycler tool_dev_url: https://github.com/rrwick/Unicycler doi: 10.1371/journal.pcbi.1005595 - licence: ['GPL v3'] + licence: ["GPL v3"] input: - meta: type: map @@ -20,14 +20,14 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - shortreads: - type: file - description: | - List of input Illumina FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + type: file + description: | + List of input Illumina FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. - longreads: - type: file - description: | - List of input FastQ files of size 1, PacBio or Nanopore long reads. + type: file + description: | + List of input FastQ files of size 1, PacBio or Nanopore long reads. output: - meta: type: map diff --git a/modules/untar/main.nf b/modules/untar/main.nf index 01205e60..058d1764 100644 --- a/modules/untar/main.nf +++ b/modules/untar/main.nf @@ -4,23 +4,23 @@ process UNTAR { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: - path archive + tuple val(meta), path(archive) output: - path "$untar" , emit: untar - path "versions.yml", emit: versions + tuple val(meta), path("$untar"), emit: untar + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - untar = archive.toString() - '.tar.gz' + untar = archive.toString() - '.tar.gz' """ tar \\ -xzvf \\ @@ -33,4 +33,15 @@ process UNTAR { untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') END_VERSIONS """ + + stub: + untar = archive.toString() - '.tar.gz' + """ + touch $untar + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') + END_VERSIONS + """ } diff --git a/modules/untar/meta.yml b/modules/untar/meta.yml index 51f94995..d426919b 100644 --- a/modules/untar/meta.yml +++ b/modules/untar/meta.yml @@ -1,28 +1,38 @@ name: untar description: Extract files. keywords: - - untar - - uncompress + - untar + - uncompress tools: - - untar: - description: | - Extract tar.gz files. - documentation: https://www.gnu.org/software/tar/manual/ - licence: ['GPL-3.0-or-later'] + - untar: + description: | + Extract tar.gz files. + documentation: https://www.gnu.org/software/tar/manual/ + licence: ["GPL-3.0-or-later"] input: - - 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: - - untar: - type: file - description: - pattern: "*.*" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - untar: + type: file + description: + pattern: "*.*" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - - "@joseespinosa" - - "@drpatelh" + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/unzip/main.nf b/modules/unzip/main.nf index 1ce4b89b..8476a2eb 100644 --- a/modules/unzip/main.nf +++ b/modules/unzip/main.nf @@ -8,11 +8,11 @@ process UNZIP { 'quay.io/biocontainers/p7zip:15.09--h2d50403_4' }" input: - path archive + tuple val(meta), path(archive) output: - path "${archive.baseName}/", emit: unzipped_archive - path "versions.yml" , emit: versions + tuple val(meta), path("${archive.baseName}/"), emit: unzipped_archive + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/unzip/meta.yml b/modules/unzip/meta.yml index 7bca1ec2..f924bfb4 100644 --- a/modules/unzip/meta.yml +++ b/modules/unzip/meta.yml @@ -9,19 +9,29 @@ tools: homepage: https://sourceforge.net/projects/p7zip/ documentation: https://sourceforge.net/projects/p7zip/ tool_dev_url: https://sourceforge.net/projects/p7zip" - licence: ['LGPL-2.1-or-later'] + licence: ["LGPL-2.1-or-later"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - archive: type: file description: ZIP file pattern: "*.zip" output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - unzipped_archive: type: directory description: Directory contents of the unzipped archive - pattern: '${archive.baseName}/' + pattern: "${archive.baseName}/" - versions: type: file description: File containing software versions diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf new file mode 100644 index 00000000..c99301bb --- /dev/null +++ b/modules/vardictjava/main.nf @@ -0,0 +1,49 @@ +def VERSION = '1.8.3' + +process VARDICTJAVA { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': + 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path("*.vcf.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + vardict-java \\ + $args \\ + -c 1 -S 2 -E 3 \\ + -b $bam \\ + -th $task.cpus \\ + -N $prefix \\ + -G $fasta \\ + $bed \\ + | teststrandbias.R \\ + | var2vcf_valid.pl \\ + $args2 \\ + -N $prefix \\ + | gzip -c > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vardict-java: $VERSION + var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) + END_VERSIONS + """ +} diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml new file mode 100644 index 00000000..59fba966 --- /dev/null +++ b/modules/vardictjava/meta.yml @@ -0,0 +1,60 @@ +name: "vardictjava" + +description: The Java port of the VarDict variant caller +keywords: + - variant calling + - VarDict + - AstraZeneca +tools: + - "vardictjava": + description: "Java port of the VarDict variant discovery program" + homepage: "https://github.com/AstraZeneca-NGS/VarDictJava" + documentation: "https://github.com/AstraZeneca-NGS/VarDictJava" + tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava" + doi: "10.1093/nar/gkw227 " + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/SAM file + pattern: "*.{bam,sam}" + - bai: + type: file + description: Index of the BAM file + pattern: "*.bai" + - fasta: + type: file + description: FASTA of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the FASTA of the reference genome + pattern: "*.fai" + - bed: + type: file + description: BED with the regions of interest + pattern: "*.bed" + +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" + - vcf: + type: file + description: VCF file output + pattern: "*.vcf.gz" + +authors: + - "@nvnieuwk" diff --git a/modules/variantbam/meta.yml b/modules/variantbam/meta.yml index ddcd0656..aac72448 100644 --- a/modules/variantbam/meta.yml +++ b/modules/variantbam/meta.yml @@ -14,7 +14,7 @@ tools: documentation: https://github.com/walaj/VariantBam#table-of-contents tool_dev_url: https://github.com/walaj/VariantBam doi: 10.1093/bioinformatics/btw111 - licence: ['Apache-2.0'] + licence: ["Apache-2.0"] input: - meta: diff --git a/modules/vcfanno/main.nf b/modules/vcfanno/main.nf index 77275963..bc0514c9 100644 --- a/modules/vcfanno/main.nf +++ b/modules/vcfanno/main.nf @@ -9,11 +9,13 @@ process VCFANNO { input: tuple val(meta), path(vcf), path(tbi) - path vcfanno_config + tuple val(meta), path(vcf_uncompressed) + path toml + path resource_dir output: - tuple val(meta), path("*.vcf"), emit: vcf - path "versions.yml" , emit: versions + tuple val(meta), path("*_annotated.vcf"), emit: vcf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -21,12 +23,15 @@ process VCFANNO { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_vcf = vcf_uncompressed ?: vcf """ + ln -sf $resource_dir/* \$(pwd) + vcfanno \\ -p $task.cpus \\ $args \\ - $vcfanno_config \\ - $vcf \\ + $toml \\ + $input_vcf \\ > ${prefix}_annotated.vcf cat <<-END_VERSIONS > versions.yml @@ -34,4 +39,15 @@ process VCFANNO { vcfanno: \$(echo \$(vcfanno 2>&1 | grep version | cut -f3 -d' ' )) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_annotated.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vcfanno: \$(echo \$(vcfanno 2>&1 | grep version | cut -f3 -d' ' )) + END_VERSIONS + """ } diff --git a/modules/vcfanno/meta.yml b/modules/vcfanno/meta.yml index bbd2ab16..1c6893ea 100644 --- a/modules/vcfanno/meta.yml +++ b/modules/vcfanno/meta.yml @@ -5,6 +5,8 @@ keywords: - bed - annotate - variant + - lua + - toml tools: - vcfanno: description: annotate a VCF with other VCFs/BEDs/tabixed files @@ -23,19 +25,21 @@ input: - vcf: type: file description: query VCF file - pattern: "*.{vcf.gz}" - - vcf.tbi: + pattern: "*.{vcf, vcf.gz}" + - vcf_tabix: type: file - description: query VCF file index - pattern: "*.{vcf.gz.tbi}" - - vcfanno_config: + description: tabix index of query VCF - only needed if vcf is compressed + pattern: "*.vcf.gz.tbi" + - toml: + type: file + description: configuration file + pattern: "*.toml" + - resource_dir: type: file description: | - A simple configuration file is used to specify both the source files - and the set of attributes (in the case of VCF) - or columns (in the case of BED or other tab-delimited formats) - that should be added to the query file. - pattern: "*.{toml}" + This directory contains referenced files in the TOML config, + and the corresponding indicies e.g. exac.vcf.gz + exac.vcf.gz.tbi, + with exception to the lua file. output: - meta: @@ -50,7 +54,7 @@ output: - vcf: type: file description: Annotated VCF file - pattern: "*.{vcf}" + pattern: "*.vcf" authors: - "@projectoriented" diff --git a/modules/vcflib/vcfuniq/meta.yml b/modules/vcflib/vcfuniq/meta.yml index 3bfc679b..50a3617a 100644 --- a/modules/vcflib/vcfuniq/meta.yml +++ b/modules/vcflib/vcfuniq/meta.yml @@ -10,7 +10,7 @@ tools: homepage: https://github.com/vcflib/vcflib documentation: https://github.com/vcflib/vcflib#USAGE doi: "https://doi.org/10.1101/2021.05.21.445151" - licence: ['MIT'] + licence: ["MIT"] input: - meta: diff --git a/modules/vcftools/meta.yml b/modules/vcftools/meta.yml index a8f864a9..7a85bdec 100644 --- a/modules/vcftools/meta.yml +++ b/modules/vcftools/meta.yml @@ -9,7 +9,7 @@ tools: documentation: http://vcftools.sourceforge.net/man_latest.html tool_dev_url: None doi: - licence: ['LGPL'] + licence: ["LGPL"] input: - meta: diff --git a/modules/yara/index/meta.yml b/modules/yara/index/meta.yml index 651a67ee..bfc74f0a 100644 --- a/modules/yara/index/meta.yml +++ b/modules/yara/index/meta.yml @@ -13,7 +13,7 @@ tools: documentation: https://github.com/seqan/seqan tool_dev_url: https://github.com/seqan/seqan doi: "" - licence: ['https://raw.githubusercontent.com/seqan/seqan/develop/apps/yara/LICENSE'] + licence: ["https://raw.githubusercontent.com/seqan/seqan/develop/apps/yara/LICENSE"] input: - fasta: diff --git a/modules/yara/mapper/main.nf b/modules/yara/mapper/main.nf index 9c993ac7..9497fe86 100644 --- a/modules/yara/mapper/main.nf +++ b/modules/yara/mapper/main.nf @@ -2,10 +2,10 @@ process YARA_MAPPER { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::yara=1.0.2 bioconda::samtools=1.12" : null) + conda (params.enable_conda ? "bioconda::yara=1.0.2 bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-f13549097a0d1ca36f9d4f017636fb3609f6c083:f794a548b8692f29264c8984ff116c2141b90d9e-0' : - 'quay.io/biocontainers/mulled-v2-f13549097a0d1ca36f9d4f017636fb3609f6c083:f794a548b8692f29264c8984ff116c2141b90d9e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-f13549097a0d1ca36f9d4f017636fb3609f6c083:d6c969c1e20cc02a9234961c07a24bb0887f05ea-0' : + 'quay.io/biocontainers/mulled-v2-f13549097a0d1ca36f9d4f017636fb3609f6c083:d6c969c1e20cc02a9234961c07a24bb0887f05ea-0' }" input: tuple val(meta), path(reads) @@ -13,6 +13,7 @@ process YARA_MAPPER { output: tuple val(meta), path("*.mapped.bam"), emit: bam + tuple val(meta), path("*.mapped.bam.bai"), emit: bai path "versions.yml" , emit: versions when: @@ -28,7 +29,9 @@ process YARA_MAPPER { -t $task.cpus \\ -f bam \\ ${index}/yara \\ - $reads | samtools view -@ $task.cpus -hb -F4 > ${prefix}.mapped.bam + $reads | samtools view -@ $task.cpus -hb -F4 | samtools sort -@ $task.cpus > ${prefix}.mapped.bam + + samtools index -@ $task.cpus ${prefix}.mapped.bam cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -46,8 +49,11 @@ process YARA_MAPPER { ${reads[0]} \\ ${reads[1]} > output.bam - samtools view -@ $task.cpus -hF 4 -f 0x40 -b output.bam > ${prefix}_1.mapped.bam - samtools view -@ $task.cpus -hF 4 -f 0x80 -b output.bam > ${prefix}_2.mapped.bam + samtools view -@ $task.cpus -hF 4 -f 0x40 -b output.bam | samtools sort -@ $task.cpus > ${prefix}_1.mapped.bam + samtools view -@ $task.cpus -hF 4 -f 0x80 -b output.bam | samtools sort -@ $task.cpus > ${prefix}_2.mapped.bam + + samtools index -@ $task.cpus ${prefix}_1.mapped.bam + samtools index -@ $task.cpus ${prefix}_2.mapped.bam cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/yara/mapper/meta.yml b/modules/yara/mapper/meta.yml index d49823d2..0c4c0d43 100644 --- a/modules/yara/mapper/meta.yml +++ b/modules/yara/mapper/meta.yml @@ -11,7 +11,7 @@ tools: documentation: https://github.com/seqan/seqan tool_dev_url: https://github.com/seqan/seqan doi: "" - licence: ['https://raw.githubusercontent.com/seqan/seqan/develop/apps/yara/LICENSE'] + licence: ["https://raw.githubusercontent.com/seqan/seqan/develop/apps/yara/LICENSE"] input: - meta: @@ -42,6 +42,10 @@ output: type: file description: Sorted BAM file pattern: "*.{bam}" + - bai: + type: file + description: Sorted BAM file index + pattern: "*.{bai}" authors: - "@apeltzer" diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..02a8acac --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +filterwarnings = + ignore::pytest.PytestRemovedIn8Warning:_pytest.nodes:140 diff --git a/subworkflows/nf-core/align_bowtie2/meta.yml b/subworkflows/nf-core/align_bowtie2/meta.yml index e149a212..40abd5a6 100644 --- a/subworkflows/nf-core/align_bowtie2/meta.yml +++ b/subworkflows/nf-core/align_bowtie2/meta.yml @@ -26,25 +26,25 @@ input: - index: type: file description: Bowtie2 genome index files - pattern: '*.ebwt' + pattern: "*.ebwt" # TODO Update when we decide on a standard for subworkflow docs output: - bam: type: file description: Output BAM file containing read alignments - pattern: '*.{bam}' + pattern: "*.{bam}" - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - fastq: type: file description: Unaligned FastQ files - pattern: '*.fastq.gz' + pattern: "*.fastq.gz" - log: type: file description: Alignment log - pattern: '*.log' - # TODO Add samtools outputs + pattern: "*.log" +# TODO Add samtools outputs authors: - - '@drpatelh' + - "@drpatelh" diff --git a/subworkflows/nf-core/annotation/ensemblvep/main.nf b/subworkflows/nf-core/annotation/ensemblvep/main.nf new file mode 100644 index 00000000..5073f38d --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -0,0 +1,31 @@ +// +// Run VEP to annotate VCF files +// + +include { ENSEMBLVEP } from '../../../../modules/ensemblvep/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_ENSEMBLVEP { + take: + vcf // channel: [ val(meta), vcf ] + vep_genome // value: genome to use + vep_species // value: species to use + vep_cache_version // value: cache version to use + vep_cache // path: /path/to/vep/cache (optionnal) + vep_extra_files // channel: [ file1, file2...] (optionnal) + + main: + ch_versions = Channel.empty() + + ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, vep_extra_files) + TABIX_BGZIPTABIX(ENSEMBLVEP.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(ENSEMBLVEP.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = ENSEMBLVEP.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation/ensemblvep/meta.yml b/subworkflows/nf-core/annotation/ensemblvep/meta.yml new file mode 100644 index 00000000..585e003b --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/meta.yml @@ -0,0 +1,49 @@ +name: annotation_ensemblvep +description: | + Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file +keywords: + - ensemblvep +modules: + - ensemblvep + - tabix/bgziptabix +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - genome: + type: value + description: | + which genome to annotate with + - species: + type: value + description: | + which species to annotate with + - cache_version: + type: value + description: | + which version of the cache to annotate with + - cache: + type: file + description: | + path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf_tbi: + type: file + description: Compressed vcf file + tabix index + pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" +authors: + - "@maxulysse" diff --git a/subworkflows/nf-core/annotation/snpeff/main.nf b/subworkflows/nf-core/annotation/snpeff/main.nf new file mode 100644 index 00000000..dcf06eb0 --- /dev/null +++ b/subworkflows/nf-core/annotation/snpeff/main.nf @@ -0,0 +1,28 @@ +// +// Run SNPEFF to annotate VCF files +// + +include { SNPEFF } from '../../../../modules/snpeff/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_SNPEFF { + take: + vcf // channel: [ val(meta), vcf ] + snpeff_db // value: db version to use + snpeff_cache // path: /path/to/snpeff/cache (optionnal) + + main: + ch_versions = Channel.empty() + + SNPEFF(vcf, snpeff_db, snpeff_cache) + TABIX_BGZIPTABIX(SNPEFF.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(SNPEFF.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = SNPEFF.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation_snpeff/meta.yml b/subworkflows/nf-core/annotation/snpeff/meta.yml similarity index 60% rename from subworkflows/nf-core/annotation_snpeff/meta.yml rename to subworkflows/nf-core/annotation/snpeff/meta.yml index 164a0ee2..241a00cc 100644 --- a/subworkflows/nf-core/annotation_snpeff/meta.yml +++ b/subworkflows/nf-core/annotation/snpeff/meta.yml @@ -11,19 +11,27 @@ input: type: map description: | Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - db: + type: value + description: | + which db to annotate with + - cache: + type: file + description: | + path to snpEff cache (optional) output: - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - vcf_tbi: type: file description: Compressed vcf file + tabix index pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" authors: - - '@maxulysse' + - "@maxulysse" diff --git a/subworkflows/nf-core/annotation_ensemblvep/main.nf b/subworkflows/nf-core/annotation_ensemblvep/main.nf deleted file mode 100644 index 3f3ecc6e..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ /dev/null @@ -1,26 +0,0 @@ -// -// Run VEP to annotate VCF files -// - -include { ENSEMBLVEP } from '../../../modules/ensemblvep/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_ENSEMBLVEP { - take: - vcf // channel: [ val(meta), vcf ] - vep_genome // value: which genome - vep_species // value: which species - vep_cache_version // value: which cache version - vep_cache // path: path_to_vep_cache (optionnal) - - main: - ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache) - ANNOTATION_BGZIPTABIX(ENSEMBLVEP.out.vcf) - - ch_versions = ENSEMBLVEP.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = ENSEMBLVEP.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/annotation_ensemblvep/meta.yml b/subworkflows/nf-core/annotation_ensemblvep/meta.yml deleted file mode 100644 index e7d92ce9..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/meta.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: annotation_ensemblvep -description: | - Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file -keywords: - - ensemblvep -modules: - - ensemblvep - - tabix/bgziptabix -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" -output: - - versions: - type: file - description: File containing software versions - pattern: 'versions.yml' - - vcf_tbi: - type: file - description: Compressed vcf file + tabix index - pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" -authors: - - '@maxulysse' diff --git a/subworkflows/nf-core/annotation_snpeff/main.nf b/subworkflows/nf-core/annotation_snpeff/main.nf deleted file mode 100644 index add5f9c8..00000000 --- a/subworkflows/nf-core/annotation_snpeff/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -// -// Run SNPEFF to annotate VCF files -// - -include { SNPEFF } from '../../../modules/snpeff/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_SNPEFF { - take: - vcf // channel: [ val(meta), vcf ] - snpeff_db // value: version of db to use - snpeff_cache // path: path_to_snpeff_cache (optionnal) - - main: - SNPEFF(vcf, snpeff_db, snpeff_cache) - ANNOTATION_BGZIPTABIX(SNPEFF.out.vcf) - ch_versions = SNPEFF.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = SNPEFF.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..e38697c3 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,41 @@ +// +// Run QC steps on BAM/CRAM files using Picard +// + +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picard/collectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picard/collectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecthsmetrics/main' + +workflow BAM_QC_PICARD { + take: + ch_bam // channel: [ val(meta), [ bam ]] + ch_fasta // channel: [ fasta ] + ch_fasta_fai // channel: [ fasta_fai ] + ch_bait_interval // channel: [ bait_interval ] + ch_target_interval // channel: [ target_interval ] + + main: + ch_versions = Channel.empty() + ch_coverage_metrics = Channel.empty() + + PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + + if (ch_bait_interval || ch_target_interval) { + if (!ch_bait_interval) log.error("Bait interval channel is empty") + if (!ch_target_interval) log.error("Target interval channel is empty") + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + } else { + PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) + } + + emit: + coverage_metrics = ch_coverage_metrics // channel: [ val(meta), [ coverage_metrics ] ] + multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml new file mode 100644 index 00000000..c45215d1 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -0,0 +1,60 @@ +name: bam_qc +description: Produces comprehensive statistics from BAM file +keywords: + - statistics + - counts + - hs_metrics + - wgs_metrics + - bam + - sam + - cram +modules: + - picard/collectmultiplemetrics + - picard/collectwgsmetrics + - picard/collecthsmetrics +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: optional file + description: Reference fasta file + pattern: "*.{fasta,fa}" + - fasta_fai: + type: optional file + description: Reference fasta file index + pattern: "*.{fasta,fa}.fai" + - bait_intervals: + type: optional file + description: An interval list file that contains the locations of the baits used. + pattern: "baits.interval_list" + - target_intervals: + type: optional file + description: An interval list file that contains the locations of the targets. + pattern: "targets.interval_list" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - coverage_metrics: + type: file + description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics + pattern: "*_metrics.txt" + - multiple_metrics: + type: file + description: Alignment metrics files generated by picard CollectMultipleMetrics + pattern: "*_{metrics}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/subworkflows/nf-core/bam_sort_samtools/meta.yml b/subworkflows/nf-core/bam_sort_samtools/meta.yml index a0e3f30b..51124475 100644 --- a/subworkflows/nf-core/bam_sort_samtools/meta.yml +++ b/subworkflows/nf-core/bam_sort_samtools/meta.yml @@ -20,7 +20,7 @@ input: - bam: type: file description: BAM/CRAM/SAM file - pattern: '*.{bam,cram,sam}' + pattern: "*.{bam,cram,sam}" # TODO Update when we decide on a standard for subworkflow docs output: - meta: @@ -31,11 +31,11 @@ output: - bam: type: file description: Sorted BAM/CRAM/SAM file - pattern: '*.{bam,cram,sam}' + pattern: "*.{bam,cram,sam}" - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" authors: - - '@drpatelh' - - '@ewels' + - "@drpatelh" + - "@ewels" diff --git a/subworkflows/nf-core/bam_stats_samtools/meta.yml b/subworkflows/nf-core/bam_stats_samtools/meta.yml index 509c5c97..38fe8647 100644 --- a/subworkflows/nf-core/bam_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_stats_samtools/meta.yml @@ -19,11 +19,11 @@ input: - bam: type: file description: BAM/CRAM/SAM file - pattern: '*.{bam,cram,sam}' + pattern: "*.{bam,cram,sam}" - bai: type: file description: Index for BAM/CRAM/SAM file - pattern: '*.{bai,crai,sai}' + pattern: "*.{bai,crai,sai}" # TODO Update when we decide on a standard for subworkflow docs output: - meta: @@ -34,10 +34,10 @@ output: - stats: type: file description: File containing samtools stats output - pattern: '*.{stats}' + pattern: "*.{stats}" - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" authors: - - '@drpatelh' + - "@drpatelh" diff --git a/subworkflows/nf-core/fgbio_create_umi_consensus/meta.yml b/subworkflows/nf-core/fgbio_create_umi_consensus/meta.yml index 2cb61206..af4ad5bc 100644 --- a/subworkflows/nf-core/fgbio_create_umi_consensus/meta.yml +++ b/subworkflows/nf-core/fgbio_create_umi_consensus/meta.yml @@ -48,20 +48,20 @@ output: - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - ubam: type: file description: unmapped bam file - pattern: '*.bam' + pattern: "*.bam" - groupbam: type: file description: mapped bam file, where reads are grouped by UMI tag - pattern: '*.bam' + pattern: "*.bam" - consensusbam: type: file description: | mapped bam file, where reads are created as consensus of those belonging to the same UMI group - pattern: '*.bam' + pattern: "*.bam" authors: - - '@lescai' + - "@lescai" diff --git a/subworkflows/nf-core/gatk_create_som_pon/meta.yml b/subworkflows/nf-core/gatk_create_som_pon/meta.yml index 07404aae..bffb2d50 100644 --- a/subworkflows/nf-core/gatk_create_som_pon/meta.yml +++ b/subworkflows/nf-core/gatk_create_som_pon/meta.yml @@ -46,7 +46,7 @@ output: - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - mutect2_vcf: type: list description: List of compressed vcf files to be used to make the gendb workspace @@ -72,4 +72,4 @@ output: description: Index of pon_vcf file pattern: "*vcf.gz.tbi" authors: - - '@GCJMackenzie' + - "@GCJMackenzie" diff --git a/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/meta.yml b/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/meta.yml index 4c42addf..d5abdca9 100644 --- a/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/meta.yml +++ b/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/meta.yml @@ -74,7 +74,7 @@ output: - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - mutect2_vcf: type: file description: Compressed vcf file to be used for variant_calling. @@ -124,4 +124,4 @@ output: description: file containing statistics of the filtermutectcalls run. pattern: "*.filteringStats.tsv" authors: - - '@GCJMackenzie' + - "@GCJMackenzie" diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml index 14329691..4c41f1f2 100644 --- a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml +++ b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml @@ -67,7 +67,7 @@ output: - versions: type: file description: File containing software versions - pattern: 'versions.yml' + pattern: "versions.yml" - mutect2_vcf: type: file description: Compressed vcf file to be used for variant_calling. @@ -105,4 +105,4 @@ output: description: file containing statistics of the filtermutectcalls run. pattern: "*.filteringStats.tsv" authors: - - '@GCJMackenzie' + - "@GCJMackenzie" diff --git a/subworkflows/nf-core/homer/groseq/main.nf b/subworkflows/nf-core/homer/groseq/main.nf new file mode 100644 index 00000000..b83c7e21 --- /dev/null +++ b/subworkflows/nf-core/homer/groseq/main.nf @@ -0,0 +1,50 @@ +/* + * Identify transcripts with homer + */ + +include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main' +include { HOMER_MAKEUCSCFILE } from '../../../../modules/homer/makeucscfile/main' +include { HOMER_FINDPEAKS } from '../../../../modules/homer/findpeaks/main' +include { HOMER_POS2BED } from '../../../../modules/homer/pos2bed/main' + +workflow HOMER_GROSEQ { + take: + bam // channel: [ val(meta), [ reads ] ] + fasta // file: /path/to/bwa/index/ + + main: + + ch_versions = Channel.empty() + + /* + * Create a Tag Directory From The GRO-Seq experiment + */ + HOMER_MAKETAGDIRECTORY ( bam, fasta ) + ch_versions = ch_versions.mix(HOMER_MAKETAGDIRECTORY.out.versions.first()) + + /* + * Creating UCSC Visualization Files + */ + HOMER_MAKEUCSCFILE ( HOMER_MAKETAGDIRECTORY.out.tagdir ) + ch_versions = ch_versions.mix(HOMER_MAKEUCSCFILE.out.versions.first()) + + /* + * Find transcripts directly from GRO-Seq + */ + HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir ) + ch_versions = ch_versions.mix(HOMER_FINDPEAKS.out.versions.first()) + + /* + * Convert peak file to bed file + */ + HOMER_POS2BED ( HOMER_FINDPEAKS.out.txt ) + ch_versions = ch_versions.mix(HOMER_POS2BED.out.versions.first()) + + emit: + tagdir = HOMER_MAKETAGDIRECTORY.out.tagdir // channel: [ val(meta), [ tagdir ] ] + bed_graph = HOMER_MAKEUCSCFILE.out.bedGraph // channel: [ val(meta), [ tag_dir/*ucsc.bedGraph.gz ] ] + peaks = HOMER_FINDPEAKS.out.txt // channel: [ val(meta), [ *peaks.txt ] ] + bed = HOMER_POS2BED.out.bed // channel: [ val(meta), [ *peaks.txt ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/homer/groseq/meta.yml b/subworkflows/nf-core/homer/groseq/meta.yml new file mode 100644 index 00000000..4bd36a88 --- /dev/null +++ b/subworkflows/nf-core/homer/groseq/meta.yml @@ -0,0 +1,48 @@ +name: homer_groseq +description: Perform variant calling on a set of normal samples using mutect2 panel of normals mode. Group them into a genomicsdbworkspace using genomicsdbimport, then use this to create a panel of normals using createsomaticpanelofnormals. +keywords: + - homer + - groseq + - nascent +modules: + - homer/maketagdirectory + - homer/makeucscfile + - homer/findpeaks + - homer/pos2bed +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - input: + type: list + description: list of BAM files, also able to take SAM and BED as input + pattern: "[ *.{bam/sam/bed} ]" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" +output: + - tagdir: + type: directory + description: The "Tag Directory" + pattern: "*_tagdir" + - bedGraph: + type: file + description: The UCSC bed graph + pattern: "*.bedGraph.gz" + - peaks: + type: file + description: The found peaks + pattern: "*.peaks.txt" + - bed: + type: file + description: A BED file of the found peaks + pattern: "*.bed" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@Emiller88" diff --git a/subworkflows/nf-core/sra_fastq/main.nf b/subworkflows/nf-core/sra_fastq/main.nf deleted file mode 100644 index ffa380d9..00000000 --- a/subworkflows/nf-core/sra_fastq/main.nf +++ /dev/null @@ -1,34 +0,0 @@ -// -// Download FASTQ sequencing reads from the NCBI's Sequence Read Archive (SRA). -// - -params.prefetch_options = [:] -params.fasterqdump_options = [:] - -include { SRATOOLS_PREFETCH } from '../../../modules/sratools/prefetch/main' addParams( options: params.prefetch_options ) -include { SRATOOLS_FASTERQDUMP } from '../../../modules/sratools/fasterqdump/main' addParams( options: params.fasterqdump_options ) - -workflow SRA_FASTQ { - take: - sra_ids // channel: [ val(meta), val(id) ] - - main: - - ch_versions = Channel.empty() - - // - // Prefetch sequencing reads in SRA format. - // - SRATOOLS_PREFETCH ( sra_ids ) - ch_versions = ch_versions.mix( SRATOOLS_PREFETCH.out.versions.first() ) - - // - // Convert the SRA format into one or more compressed FASTQ files. - // - SRATOOLS_FASTERQDUMP ( SRATOOLS_PREFETCH.out.sra ) - ch_versions = ch_versions.mix( SRATOOLS_FASTERQDUMP.out.versions.first() ) - - emit: - reads = SRATOOLS_FASTERQDUMP.out.reads // channel: [ val(meta), [ reads ] ] - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/nf-core/srafastq/main.nf b/subworkflows/nf-core/srafastq/main.nf new file mode 100644 index 00000000..26e8105e --- /dev/null +++ b/subworkflows/nf-core/srafastq/main.nf @@ -0,0 +1,38 @@ +include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../modules/custom/sratoolsncbisettings/main' +include { SRATOOLS_PREFETCH } from '../../../modules/sratools/prefetch/main' +include { SRATOOLS_FASTERQDUMP } from '../../../modules/sratools/fasterqdump/main' + +/** + * Download FASTQ sequencing reads from the NCBI's Sequence Read Archive (SRA). + */ +workflow SRAFASTQ { + take: + sra_ids // channel: [ val(meta), val(id) ] + + main: + + ch_versions = Channel.empty() + + // + // Detect existing NCBI user settings or create new ones. + // + CUSTOM_SRATOOLSNCBISETTINGS() + def settings = CUSTOM_SRATOOLSNCBISETTINGS.out.ncbi_settings + ch_versions = ch_versions.mix( CUSTOM_SRATOOLSNCBISETTINGS.out.versions ) + + // + // Prefetch sequencing reads in SRA format. + // + SRATOOLS_PREFETCH ( sra_ids, settings ) + ch_versions = ch_versions.mix( SRATOOLS_PREFETCH.out.versions.first() ) + + // + // Convert the SRA format into one or more compressed FASTQ files. + // + SRATOOLS_FASTERQDUMP ( SRATOOLS_PREFETCH.out.sra, settings ) + ch_versions = ch_versions.mix( SRATOOLS_FASTERQDUMP.out.versions.first() ) + + emit: + reads = SRATOOLS_FASTERQDUMP.out.reads // channel: [ val(meta), [ reads ] ] + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/sra_fastq/meta.yml b/subworkflows/nf-core/srafastq/meta.yml similarity index 88% rename from subworkflows/nf-core/sra_fastq/meta.yml rename to subworkflows/nf-core/srafastq/meta.yml index 3db93257..873ccaca 100644 --- a/subworkflows/nf-core/sra_fastq/meta.yml +++ b/subworkflows/nf-core/srafastq/meta.yml @@ -1,11 +1,14 @@ name: sra_fastq description: Download FASTQ sequencing reads from the NCBI's Sequence Read Archive (SRA). keywords: + - SRA + - NCBI - sequencing - FASTQ - prefetch - - dump + - fasterq-dump modules: + - custom/sratoolsncbisettings - sratools/prefetch - sratools/fasterqdump input: @@ -17,7 +20,7 @@ input: - id: type: string description: > - SRA identifier. + SRA run identifier. # TODO Update when we decide on a standard for subworkflow docs output: - meta: @@ -34,4 +37,4 @@ output: description: File containing software versions pattern: "versions.yml" authors: - - '@Midnighter' + - "@Midnighter" diff --git a/subworkflows/nf-core/sra_fastq/nextflow.config b/subworkflows/nf-core/srafastq/nextflow.config similarity index 100% rename from subworkflows/nf-core/sra_fastq/nextflow.config rename to subworkflows/nf-core/srafastq/nextflow.config diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index 741edf5e..4ea085f9 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -28,5 +28,5 @@ conda { createTimeout = "120 min" } includeConfig 'test_data.config' manifest { - nextflowVersion = '!>=21.10.3' + nextflowVersion = '!>=21.10.0' } diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 7fe48e85..59ab6df0 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2,10 +2,22 @@ abacas: - modules/abacas/** - tests/modules/abacas/** +abricate/run: + - modules/abricate/run/** + - tests/modules/abricate/run/** + +abricate/summary: + - modules/abricate/summary/** + - tests/modules/abricate/summary/** + adapterremoval: - modules/adapterremoval/** - tests/modules/adapterremoval/** +adapterremovalfixprefix: + - modules/adapterremovalfixprefix/** + - tests/modules/adapterremovalfixprefix/** + agrvate: - modules/agrvate/** - tests/modules/agrvate/** @@ -14,10 +26,30 @@ allelecounter: - modules/allelecounter/** - tests/modules/allelecounter/** +amplify/predict: + - modules/amplify/predict/** + - tests/modules/amplify/predict/** + amps: - modules/amps/** - tests/modules/amps/** +amrfinderplus/run: + - modules/amrfinderplus/run/** + - tests/modules/amrfinderplus/run/** + +amrfinderplus/update: + - modules/amrfinderplus/update/** + - tests/modules/amrfinderplus/update/** + +antismash/antismashlite: + - modules/antismash/antismashlite/** + - tests/modules/antismash/antismashlite/** + +antismash/antismashlitedownloaddatabases: + - modules/antismash/antismashlitedownloaddatabases/** + - tests/modules/antismash/antismashlitedownloaddatabases/** + arriba: - modules/arriba/** - tests/modules/arriba/** @@ -30,6 +62,10 @@ artic/minion: - modules/artic/minion/** - tests/modules/artic/minion/** +ascat: + - modules/ascat/** + - tests/modules/ascat/** + assemblyscan: - modules/assemblyscan/** - tests/modules/assemblyscan/** @@ -82,6 +118,14 @@ bbmap/index: - modules/bbmap/index/** - tests/modules/bbmap/index/** +bbmap/pileup: + - modules/bbmap/pileup/** + - tests/modules/bbmap/pileup/** + +bcftools/annotate: + - modules/bcftools/annotate/** + - tests/modules/bcftools/annotate/** + bcftools/concat: - modules/bcftools/concat/** - tests/modules/bcftools/concat/** @@ -134,6 +178,10 @@ bcftools/view: - modules/bcftools/view/** - tests/modules/bcftools/view/** +bclconvert: + - modules/bclconvert/** + - tests/modules/bclconvert/** + bedtools/bamtobed: - modules/bedtools/bamtobed/** - tests/modules/bedtools/bamtobed/** @@ -178,6 +226,57 @@ bedtools/subtract: - modules/bedtools/subtract/** - tests/modules/bedtools/subtract/** +biobambam/bammarkduplicates2: + - modules/biobambam/bammarkduplicates2/** + - tests/modules/biobambam/bammarkduplicates2/** + +biobambam/bamsormadup: + - modules/biobambam/bamsormadup/** + - tests/modules/biobambam/bamsormadup/** + +biscuit/align: + - modules/biscuit/index/** + - modules/biscuit/align/** + - tests/modules/biscuit/align/** + +biscuit/biscuitblaster: + - modules/biscuit/index/** + - modules/biscuit/biscuitblaster/** + - tests/modules/biscuit/biscuitblaster/** + +biscuit/bsconv: + - modules/biscuit/index/** + - modules/biscuit/bsconv/** + - tests/modules/biscuit/bsconv/** + +biscuit/epiread: + - modules/biscuit/index/** + - modules/biscuit/epiread/** + - tests/modules/biscuit/epiread/** + +biscuit/index: + - modules/biscuit/index/** + - tests/modules/biscuit/index/** + +biscuit/mergecg: + - modules/biscuit/index/** + - modules/biscuit/mergecg/** + - tests/modules/biscuit/mergecg/** + +biscuit/pileup: + - modules/biscuit/index/** + - modules/biscuit/pileup/** + - tests/modules/biscuit/pileup/** + +biscuit/qc: + - modules/biscuit/index/** + - modules/biscuit/qc/** + - tests/modules/biscuit/qc/** + +biscuit/vcf2bed: + - modules/biscuit/vcf2bed/** + - tests/modules/biscuit/vcf2bed/** + bismark/align: - modules/bismark/align/** - modules/bismark/genomepreparation/** @@ -238,6 +337,14 @@ bowtie2/build: - modules/bowtie2/build/** - tests/modules/bowtie2/build_test/** +bracken/bracken: + - modules/bracken/bracken/** + - tests/modules/bracken/bracken/** + +busco: + - modules/busco/** + - tests/modules/busco/** + bwa/aln: - modules/bwa/aln/** - tests/modules/bwa/aln/** @@ -308,6 +415,10 @@ cellranger/mkref: - modules/cellranger/gtf/** - tests/modules/cellranger/gtf/** +centrifuge/centrifuge: + - modules/centrifuge/centrifuge/** + - tests/modules/centrifuge/centrifuge/** + checkm/lineagewf: - modules/checkm/lineagewf/** - tests/modules/checkm/lineagewf/** @@ -332,6 +443,26 @@ cnvkit/batch: - modules/cnvkit/batch/** - tests/modules/cnvkit/batch/** +controlfreec/assesssignificance: + - modules/controlfreec/assesssignificance/** + - tests/modules/controlfreec/assesssignificance/** + +controlfreec/freec: + - modules/controlfreec/freec/** + - tests/modules/controlfreec/freec/** + +controlfreec/freec2bed: + - modules/controlfreec/freec2bed/** + - tests/modules/controlfreec/freec2bed/** + +controlfreec/freec2circos: + - modules/controlfreec/freec2circos/** + - tests/modules/controlfreec/freec2circos/** + +controlfreec/makegraph: + - modules/controlfreec/makegraph/** + - tests/modules/controlfreec/makegraph/** + cooler/cload: - modules/cooler/cload/** - tests/modules/cooler/cload/** @@ -368,6 +499,10 @@ custom/getchromsizes: - modules/custom/getchromsizes/** - tests/modules/custom/getchromsizes/** +custom/sratoolsncbisettings: + - modules/custom/sratoolsncbisettings/** + - tests/modules/custom/sratoolsncbisettings/** + cutadapt: - modules/cutadapt/** - tests/modules/cutadapt/** @@ -380,6 +515,10 @@ dastool/dastool: - modules/dastool/dastool/** - tests/modules/dastool/dastool/** +dastool/fastatocontig2bin: + - modules/dastool/fastatocontig2bin/** + - tests/modules/dastool/fastatocontig2bin/** + dastool/scaffolds2bin: - modules/dastool/scaffolds2bin/** - tests/modules/dastool/scaffolds2bin/** @@ -396,6 +535,10 @@ deeparg/predict: - modules/deeparg/predict/** - tests/modules/deeparg/predict/** +deeptools/bamcoverage: + - modules/deeptools/bamcoverage/** + - tests/modules/deeptools/bamcoverage/** + deeptools/computematrix: - modules/deeptools/computematrix/** - tests/modules/deeptools/computematrix/** @@ -468,6 +611,18 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/filter: + - modules/elprep/filter/** + - tests/modules/elprep/filter/** + +elprep/merge: + - modules/elprep/merge/** + - tests/modules/elprep/merge/** + +elprep/split: + - modules/elprep/split/** + - tests/modules/elprep/split/** + emmtyper: - modules/emmtyper/** - tests/modules/emmtyper/** @@ -480,6 +635,10 @@ expansionhunter: - modules/expansionhunter/** - tests/modules/expansionhunter/** +faqcs: + - modules/faqcs/** + - tests/modules/faqcs/** + fargene: - modules/fargene/** - tests/modules/fargene/** @@ -532,10 +691,18 @@ freebayes: - modules/freebayes/** - tests/modules/freebayes/** +gamma: + - modules/gamma/** + - tests/modules/gamma/** + gatk4/applybqsr: - modules/gatk4/applybqsr/** - tests/modules/gatk4/applybqsr/** +gatk4/applybqsrspark: + - modules/gatk4/applybqsrspark/** + - tests/modules/gatk4/applybqsrspark/** + gatk4/applyvqsr: - modules/gatk4/applyvqsr/** - tests/modules/gatk4/applyvqsr/** @@ -544,6 +711,10 @@ gatk4/baserecalibrator: - modules/gatk4/baserecalibrator/** - tests/modules/gatk4/baserecalibrator/** +gatk4/baserecalibratorspark: + - modules/gatk4/baserecalibratorspark/** + - tests/modules/gatk4/baserecalibratorspark/** + gatk4/bedtointervallist: - modules/gatk4/bedtointervallist/** - tests/modules/gatk4/bedtointervallist/** @@ -552,6 +723,10 @@ gatk4/calculatecontamination: - modules/gatk4/calculatecontamination/** - tests/modules/gatk4/calculatecontamination/** +gatk4/combinegvcfs: + - modules/gatk4/combinegvcfs/** + - tests/modules/gatk4/combinegvcfs/** + gatk4/createsequencedictionary: - modules/gatk4/createsequencedictionary/** - tests/modules/gatk4/createsequencedictionary/** @@ -576,6 +751,10 @@ gatk4/gatherbqsrreports: - modules/gatk4/gatherbqsrreports/** - tests/modules/gatk4/gatherbqsrreports/** +gatk4/gatherpileupsummaries: + - modules/gatk4/gatherpileupsummaries/** + - tests/modules/gatk4/gatherpileupsummaries/** + gatk4/genomicsdbimport: - modules/gatk4/genomicsdbimport/** - tests/modules/gatk4/genomicsdbimport/** @@ -596,6 +775,10 @@ gatk4/indexfeaturefile: - modules/gatk4/indexfeaturefile/** - tests/modules/gatk4/indexfeaturefile/** +gatk4/intervallisttobed: + - modules/gatk4/intervallisttobed/** + - tests/modules/gatk4/intervallisttobed/** + gatk4/intervallisttools: - modules/gatk4/intervallisttools/** - tests/modules/gatk4/intervallisttools/** @@ -608,10 +791,18 @@ gatk4/markduplicates: - modules/gatk4/markduplicates/** - tests/modules/gatk4/markduplicates/** +gatk4/markduplicatesspark: + - modules/gatk4/markduplicatesspark/** + - tests/modules/gatk4/markduplicatesspark/** + gatk4/mergebamalignment: - modules/gatk4/mergebamalignment/** - tests/modules/gatk4/mergebamalignment/** +gatk4/mergemutectstats: + - modules/gatk4/mergemutectstats/** + - tests/modules/gatk4/mergemutectstats/** + gatk4/mergevcfs: - modules/gatk4/mergevcfs/** - tests/modules/gatk4/mergevcfs/** @@ -628,6 +819,14 @@ gatk4/samtofastq: - modules/gatk4/samtofastq/** - tests/modules/gatk4/samtofastq/** +gatk4/selectvariants: + - modules/gatk4/selectvariants/** + - tests/modules/gatk4/selectvariants/** + +gatk4/splitintervals: + - modules/gatk4/splitintervals/** + - tests/modules/gatk4/splitintervals/** + gatk4/splitncigarreads: - modules/gatk4/splitncigarreads/** - tests/modules/gatk4/splitncigarreads/** @@ -648,6 +847,10 @@ genmap/mappability: - modules/genmap/mappability/** - tests/modules/genmap/mappability/** +genomescope2: + - modules/genomescope2/** + - tests/modules/genomescope2/** + genrich: - modules/genrich/** - tests/modules/genrich/** @@ -676,6 +879,10 @@ gstama/merge: - modules/gstama/merge/** - tests/modules/gstama/merge/** +gstama/polyacleanup: + - modules/gstama/polyacleanup/** + - tests/modules/gstama/polyacleanup/** + gtdbtk/classifywf: - modules/gtdbtk/classifywf/** - tests/modules/gtdbtk/classifywf/** @@ -696,6 +903,22 @@ gunzip: - modules/gunzip/** - tests/modules/gunzip/** +hamronization/deeparg: + - modules/hamronization/deeparg/** + - tests/modules/hamronization/deeparg/** + +hamronization/summarize: + - modules/hamronization/summarize/** + - tests/modules/hamronization/summarize/** + +happy/happy: + - modules/happy/happy/** + - tests/modules/happy/happy/** + +happy/prepy: + - modules/happy/prepy/** + - tests/modules/happy/prepy/** + hicap: - modules/hicap/** - tests/modules/hicap/** @@ -739,12 +962,17 @@ hmmer/hmmalign: - modules/hmmer/hmmalign/** - tests/modules/hmmer/hmmalign/** +hmmer/hmmsearch: + - modules/hmmer/hmmsearch/** + - tests/modules/hmmer/hmmsearch/** + homer/annotatepeaks: - modules/homer/annotatepeaks/** - tests/modules/homer/annotatepeaks/** homer/findpeaks: - modules/homer/findpeaks/** + - modules/homer/maketagdirectory/** - tests/modules/homer/findpeaks/** homer/maketagdirectory: @@ -755,6 +983,24 @@ homer/makeucscfile: - modules/homer/makeucscfile/** - tests/modules/homer/makeucscfile/** +homer/pos2bed: + - modules/homer/pos2bed/** + - modules/homer/maketagdirectory/** + - modules/homer/findpeaks/** + - tests/modules/homer/pos2bed/** + +hpsuissero: + - modules/hpsuissero/** + - tests/modules/hpsuissero/** + +ichorcna/createpon: + - modules/ichorcna/createpon/** + - tests/modules/ichorcna/createpon/** + +ichorcna/run: + - modules/ichorcna/run/** + - tests/modules/ichorcna/run/** + idr: - modules/idr/** - tests/modules/idr/** @@ -795,6 +1041,14 @@ jupyternotebook: - modules/jupyternotebook/** - tests/modules/jupyternotebook/** +kaiju/kaiju: + - modules/kaiju/kaiju/** + - tests/modules/kaiju/kaiju/** + +kaiju/kaiju2table: + - modules/kaiju/kaiju2table/** + - tests/modules/kaiju/kaiju2table/** + kallisto/index: - modules/kallisto/index/** - tests/modules/kallisto/index/** @@ -828,6 +1082,14 @@ krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** +krona/ktimporttext: + - modules/krona/ktimporttext/** + - tests/modules/krona/ktimporttext/** + +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** @@ -864,6 +1126,10 @@ leehom: - modules/leehom/** - tests/modules/leehom/** +legsta: + - modules/legsta/** + - tests/modules/legsta/** + lima: - modules/lima/** - tests/modules/lima/** @@ -896,6 +1162,10 @@ macs2/callpeak: - modules/macs2/callpeak/** - tests/modules/macs2/callpeak/** +mafft: + - modules/mafft/** + - tests/modules/mafft/** + malt/build: - modules/malt/build/** - tests/modules/malt/build_test/** @@ -944,6 +1214,10 @@ maxquant/lfq: - modules/maxquant/lfq/** - tests/modules/maxquant/lfq/** +md5sum: + - modules/md5sum/** + - tests/modules/md5sum/** + medaka: - modules/medaka/** - tests/modules/medaka/** @@ -952,10 +1226,26 @@ megahit: - modules/megahit/** - tests/modules/megahit/** +megan/rma2info: + - modules/megan/rma2info/** + - tests/modules/megan/rma2info/** + meningotype: - modules/meningotype/** - tests/modules/meningotype/** +meryl/count: + - modules/meryl/count/** + - tests/modules/meryl/count/** + +meryl/histogram: + - modules/meryl/histogram/** + - tests/modules/meryl/histogram/** + +meryl/unionsum: + - modules/meryl/unionsum/** + - tests/modules/meryl/unionsum/** + metabat2/jgisummarizebamcontigdepths: - modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/** @@ -996,10 +1286,18 @@ mlst: - modules/mlst/** - tests/modules/mlst/** +mobsuite/recon: + - modules/mobsuite/recon/** + - tests/modules/mobsuite/recon/** + mosdepth: - modules/mosdepth/** - tests/modules/mosdepth/** +motus/downloaddb: + - modules/motus/downloaddb/** + - tests/modules/motus/downloaddb/** + msisensor/msi: - modules/msisensor/msi/** - tests/modules/msisensor/msi/** @@ -1008,6 +1306,14 @@ msisensor/scan: - modules/msisensor/scan/** - tests/modules/msisensor/scan/** +msisensorpro/msi_somatic: + - modules/msisensorpro/msi_somatic/** + - tests/modules/msisensorpro/msi_somatic/** + +msisensorpro/scan: + - modules/msisensorpro/scan/** + - tests/modules/msisensorpro/scan/** + mtnucratio: - modules/mtnucratio/** - tests/modules/mtnucratio/** @@ -1049,6 +1355,10 @@ ngmaster: - modules/ngmaster/** - tests/modules/ngmaster/** +ngscheckmate/ncm: + - modules/ngscheckmate/ncm/** + - tests/modules/ngscheckmate/ncm/** + nucmer: - modules/nucmer/** - tests/modules/nucmer/** @@ -1085,6 +1395,10 @@ pairtools/sort: - modules/pairtools/sort/** - tests/modules/pairtools/sort/** +panaroo/run: + - modules/panaroo/run/** + - tests/modules/panaroo/run/** + pangolin: - modules/pangolin/** - tests/modules/pangolin/** @@ -1105,10 +1419,22 @@ peddy: - modules/peddy/** - tests/modules/peddy/** +phantompeakqualtools: + - modules/phantompeakqualtools/** + - tests/modules/phantompeakqualtools/** + phyloflash: - modules/phyloflash/** - tests/modules/phyloflash/** +picard/addorreplacereadgroups: + - modules/picard/addorreplacereadgroups/** + - tests/modules/picard/addorreplacereadgroups/** + +picard/cleansam: + - modules/picard/cleansam/** + - tests/modules/picard/cleansam/** + picard/collecthsmetrics: - modules/picard/collecthsmetrics/** - tests/modules/picard/collecthsmetrics/** @@ -1121,10 +1447,26 @@ picard/collectwgsmetrics: - modules/picard/collectwgsmetrics/** - tests/modules/picard/collectwgsmetrics/** +picard/createsequencedictionary: + - modules/picard/createsequencedictionary/** + - tests/modules/picard/createsequencedictionary/** + +picard/crosscheckfingerprints: + - modules/picard/crosscheckfingerprints/** + - tests/modules/picard/crosscheckfingerprints/** + picard/filtersamreads: - modules/picard/filtersamreads/** - tests/modules/picard/filtersamreads/** +picard/fixmateinformation: + - modules/picard/fixmateinformation/** + - tests/modules/picard/fixmateinformation/** + +picard/liftovervcf: + - modules/picard/liftovervcf/** + - tests/modules/picard/liftovervcf/** + picard/markduplicates: - modules/picard/markduplicates/** - tests/modules/picard/markduplicates/** @@ -1137,6 +1479,10 @@ picard/sortsam: - modules/picard/sortsam/** - tests/modules/picard/sortsam/** +picard/sortvcf: + - modules/picard/sortvcf/** + - tests/modules/picard/sortvcf/** + pirate: - modules/pirate/** - tests/modules/pirate/** @@ -1157,6 +1503,10 @@ plink2/extract: - modules/plink2/extract/** - tests/modules/plink2/extract/** +plink2/score: + - modules/plink2/score/** + - tests/modules/plink2/score/** + plink2/vcf: - modules/plink2/vcf/** - tests/modules/plink2/vcf/** @@ -1169,10 +1519,18 @@ porechop: - modules/porechop/** - tests/modules/porechop/** +preseq/ccurve: + - modules/preseq/ccurve/** + - tests/modules/preseq/ccurve/** + preseq/lcextrap: - modules/preseq/lcextrap/** - tests/modules/preseq/lcextrap/** +prinseqplusplus: + - modules/prinseqplusplus/** + - tests/modules/prinseqplusplus/** + prodigal: - modules/prodigal/** - tests/modules/prodigal/** @@ -1201,6 +1559,10 @@ qualimap/bamqc: - modules/qualimap/bamqc/** - tests/modules/qualimap/bamqc/** +qualimap/bamqccram: + - modules/qualimap/bamqccram/** + - tests/modules/qualimap/bamqccram/** + quast: - modules/quast/** - tests/modules/quast/** @@ -1225,6 +1587,10 @@ raxmlng: - modules/raxmlng/** - tests/modules/raxmlng/** +rgi/main: + - modules/rgi/main/** + - tests/modules/rgi/main/** + rmarkdownnotebook: - modules/rmarkdownnotebook/** - tests/modules/rmarkdownnotebook/** @@ -1273,6 +1639,10 @@ rseqc/tin: - modules/rseqc/tin/** - tests/modules/rseqc/tin/** +rtgtools/vcfeval: + - modules/rtgtools/vcfeval/** + - tests/modules/rtgtools/vcfeval/** + salmon/index: - modules/salmon/index/** - tests/modules/salmon/index/** @@ -1293,6 +1663,14 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** +samtools/collatefastq: + - modules/samtools/collatefastq/** + - tests/modules/samtools/collatefastq/** + +samtools/convert: + - modules/samtools/convert/** + - tests/modules/samtools/convert/** + samtools/depth: - modules/samtools/depth/** - tests/modules/samtools/depth/** @@ -1349,10 +1727,22 @@ seacr/callpeak: - modules/seacr/callpeak/** - tests/modules/seacr/callpeak/** +seqkit/pair: + - modules/seqkit/pair/** + - tests/modules/seqkit/pair/** + +seqkit/replace: + - modules/seqkit/replace/** + - tests/modules/seqkit/replace/** + seqkit/split2: - modules/seqkit/split2/** - tests/modules/seqkit/split2/** +seqkit/stats: + - modules/seqkit/stats/** + - tests/modules/seqkit/stats/** + seqsero2: - modules/seqsero2/** - tests/modules/seqsero2/** @@ -1361,10 +1751,18 @@ seqtk/mergepe: - modules/seqtk/mergepe/** - tests/modules/seqtk/mergepe/** +seqtk/rename: + - modules/seqtk/rename/** + - tests/modules/seqtk/rename/** + seqtk/sample: - modules/seqtk/sample/** - tests/modules/seqtk/sample/** +seqtk/seq: + - modules/seqtk/seq/** + - tests/modules/seqtk/seq/** + seqtk/subseq: - modules/seqtk/subseq/** - tests/modules/seqtk/subseq/** @@ -1381,10 +1779,34 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +shasum: + - modules/shasum/** + - tests/modules/shasum/** + +shigatyper: + - modules/shigatyper/** + - tests/modules/shigatyper/** + shovill: - modules/shovill/** - tests/modules/shovill/** +sistr: + - modules/sistr/** + - tests/modules/sistr/** + +slimfastq: + - modules/slimfastq/** + - tests/modules/slimfastq/** + +snapaligner/align: + - modules/snapaligner/align/** + - tests/modules/snapaligner/align/** + +snapaligner/index: + - modules/snapaligner/index/** + - tests/modules/snapaligner/index/** + snpdists: - modules/snpdists/** - tests/modules/snpdists/** @@ -1401,6 +1823,10 @@ snpsites: - modules/snpsites/** - tests/modules/snpsites/** +sourmash/sketch: + - modules/sourmash/sketch/** + - tests/modules/sourmash/sketch/** + spades: - modules/spades/** - tests/modules/spades/** @@ -1417,6 +1843,18 @@ sratools/prefetch: - modules/sratools/prefetch/** - tests/modules/sratools/prefetch/** +srst2/srst2: + - modules/srst2/srst2/** + - tests/modules/srst2/srst2/** + +ssuissero: + - modules/ssuissero/** + - tests/modules/ssuissero/** + +stadeniolib/scramble: + - modules/stadeniolib/scramble/** + - tests/modules/stadeniolib/scramble/** + staphopiasccmec: - modules/staphopiasccmec/** - tests/modules/staphopiasccmec/** @@ -1429,6 +1867,10 @@ star/genomegenerate: - modules/star/genomegenerate/** - tests/modules/star/genomegenerate/** +stranger: + - modules/stranger/** + - tests/modules/stranger/** + strelka/germline: - modules/strelka/germline/** - tests/modules/strelka/germline/** @@ -1525,6 +1967,15 @@ ultra/pipeline: - modules/ultra/pipeline/** - tests/modules/ultra/pipeline/** +umitools/dedup: + - modules/umitools/dedup/** + - modules/umitools/extract/** + - tests/modules/umitools/dedup/** + +umitools/extract: + - modules/umitools/extract/** + - tests/modules/umitools/extract/** + unicycler: - modules/unicycler/** - tests/modules/unicycler/** @@ -1537,6 +1988,10 @@ unzip: - modules/unzip/** - tests/modules/unzip/** +vardictjava: + - modules/vardictjava/** + - tests/modules/vardictjava/** + variantbam: - modules/variantbam/** - tests/modules/variantbam/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index a8cc2137..5937e869 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -14,6 +14,7 @@ params { genome_paf = "${test_data_dir}/genomics/sarscov2/genome/genome.paf" genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes" transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta" + proteome_fasta = "${test_data_dir}/genomics/sarscov2/genome/proteome.fasta" transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf" test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed" @@ -25,6 +26,12 @@ params { kraken2 = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2" kraken2_tar_gz = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2.tar.gz" + kraken2_bracken = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2_bracken" + kraken2_bracken_tar_gz = "${test_data_dir}/genomics/sarscov2/genome/db/kraken2_bracken.tar.gz" + + kaiju = "${test_data_dir}/genomics/sarscov2/genome/db/kaiju" + kaiju_tar_gz = "${test_data_dir}/genomics/sarscov2/genome/db/kaiju.tar.gz" + ncbi_taxmap_zip = "${test_data_dir}/genomics/sarscov2/genome/db/maltextract/ncbi_taxmap.zip" taxon_list_txt = "${test_data_dir}/genomics/sarscov2/genome/db/maltextract/taxon_list.txt" @@ -67,6 +74,8 @@ params { test_computematrix_mat_gz = "${test_data_dir}/genomics/sarscov2/illumina/deeptools/test.computeMatrix.mat.gz" + test_bcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.bcf" + test_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf" test_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz" test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi" @@ -101,28 +110,43 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + krona_taxonomy = "${test_data_dir}/genomics/sarscov2/metagenome/krona_taxonomy.tab" + } } 'homo_sapiens' { 'genome' { + genome_elfasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elfasta" genome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta" genome_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta.fai" genome_dict = "${test_data_dir}/genomics/homo_sapiens/genome/genome.dict" genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3" genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf" genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list" + genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.multi_intervals.bed" genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes" genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed" genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" genome_bed_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz" genome_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz.tbi" + genome_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elsites" transcriptome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/transcriptome.fasta" genome2_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome2.fasta" - genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz" + genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz" + genome_21_sdf = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome_sdf.tar.gz" genome_21_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta" genome_21_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai" genome_21_dict = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.dict" + genome_21_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.sizes" genome_21_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.interval_list" + genome_21_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed" + genome_21_multi_interval_bed_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz" + genome_21_multi_interval_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz.tbi" + genome_21_chromosomes_dir = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/chromosomes.tar.gz" + dbsnp_146_hg38_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.elsites" dbsnp_146_hg38_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz" dbsnp_146_hg38_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi" gnomad_r2_1_1_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1.vcf.gz" @@ -131,7 +155,9 @@ params { mills_and_1000g_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi" syntheticvcf_short_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz" syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi" + syntheticvcf_short_score = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.score" gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz" + gnomad2_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD2.r2.1.1-sv.vcf.gz" hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz" hapmap_3_3_hg38_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi" @@ -145,6 +171,7 @@ params { gnomad_r2_1_1_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi" mills_and_1000g_indels_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz" mills_and_1000g_indels_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi" + haplotype_map = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/haplotype_map.txt" index_salmon = "${test_data_dir}/genomics/homo_sapiens/genome/index/salmon" repeat_expansions = "${test_data_dir}/genomics/homo_sapiens/genome/loci/repeat_expansions.json" @@ -152,18 +179,20 @@ params { justhusky_minimal_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz" justhusky_minimal_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz.tbi" + vcfanno_tar_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno_grch38_module_test.tar.gz" + vcfanno_toml = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml" } 'pangenome' { - pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" - pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" - pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" - pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" - pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" - pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" - pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" + pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" + pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" + pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" + pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" + pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" + pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" 'odgi' { - pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" - pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" + pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" + pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" } } 'illumina' { @@ -182,7 +211,8 @@ params { test_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test.paired_end.umi_unsorted.bam" test_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test.paired_end.unsorted_tagged.bam" test_paired_end_hla = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.bam" - + test_paired_end_hla_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam" + test_paired_end_hla_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam.bai" test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" @@ -223,8 +253,8 @@ params { test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" - test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_1.fastq.gz" - test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_2.fastq.gz" + test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz" + test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz" test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" @@ -237,6 +267,9 @@ params { test2_haplotc_ann_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz" test2_haplotc_ann_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi" + test2_haplotc_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz" + test2_haplotc_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz.tbi" + test2_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal" test2_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal.idx" test2_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.tranches" @@ -262,6 +295,12 @@ params { test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi" test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx" + test_genome21_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz" + test_genome21_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz.tbi" + + test_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test.mpileup.gz" + test2_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test2.mpileup.gz" + test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak" test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak" @@ -279,33 +318,39 @@ params { test_rnaseq_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf" test_sv_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz" + + test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor" } 'pacbio' { - primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" - alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" - alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" - ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" - ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" - ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" - ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" - ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" - ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" - hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" - lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" - refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" - cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" - singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" - aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" - alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" - genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" - genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" - filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" + primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" + alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" + alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" + ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" + ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" + ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" + ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" + ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" + ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" + hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" + lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" + refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" + cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" + singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" + aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" + alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" + genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" + genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" + filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" } } 'bacteroides_fragilis' { 'genome' { genome_fna_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz" + genome_gbff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz" genome_paf = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf" + genome_mapping_potential_arg = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.mapping.potential.ARG" + genome_gff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gff.gz" + } 'illumina' { test1_contigs_fa_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz" @@ -337,7 +382,7 @@ params { test3_gff = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff" } 'illumina' { - test_1_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fasta/test_1.fastq.gz" + test_1_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_1.fastq.gz" test_2_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_2.fastq.gz" test_se_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_se.fastq.gz" } @@ -354,33 +399,36 @@ params { } 'generic' { 'csv' { - test_csv = "${test_data_dir}/generic/csv/test.csv" + test_csv = "${test_data_dir}/generic/csv/test.csv" } 'notebooks' { - rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" - ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" - ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" + rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" + ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" + ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" } 'tsv' { - test_tsv = "${test_data_dir}/generic/tsv/test.tsv" + test_tsv = "${test_data_dir}/generic/tsv/test.tsv" } 'txt' { - hello = "${test_data_dir}/generic/txt/hello.txt" + hello = "${test_data_dir}/generic/txt/hello.txt" } 'cnn' { - reference = "${test_data_dir}/generic/cnn/reference.cnn" + reference = "${test_data_dir}/generic/cnn/reference.cnn" } 'cooler'{ - test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" - test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" - test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" - test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" - test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" - hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" - test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" - test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" + test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" + test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" + test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" + test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" + test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" + hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" + test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" + test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" } + 'config' { + ncbi_user_settings = "${test_data_dir}/generic/config/ncbi_user_settings.mkfg" + } } 'proteomics' { 'msspectra' { diff --git a/tests/modules/abricate/run/main.nf b/tests/modules/abricate/run/main.nf new file mode 100644 index 00000000..19d1f8a8 --- /dev/null +++ b/tests/modules/abricate/run/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ABRICATE_RUN } from '../../../../modules/abricate/run/main.nf' + +workflow test_abricate_run { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + ABRICATE_RUN ( input ) +} diff --git a/tests/modules/abricate/run/nextflow.config b/tests/modules/abricate/run/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/abricate/run/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/abricate/run/test.yml b/tests/modules/abricate/run/test.yml new file mode 100644 index 00000000..3377623c --- /dev/null +++ b/tests/modules/abricate/run/test.yml @@ -0,0 +1,10 @@ +- name: abricate run + command: nextflow run tests/modules/abricate/run -entry test_abricate_run -c tests/config/nextflow.config + tags: + - abricate + - abricate/run + files: + - path: output/abricate/test.txt + md5sum: cd07e2953b127aed8d09bf1b2b903a1f + - path: output/abricate/versions.yml + md5sum: ae9cafaae96a644bb852e337aa7251f3 diff --git a/tests/modules/abricate/summary/main.nf b/tests/modules/abricate/summary/main.nf new file mode 100644 index 00000000..9acbdba9 --- /dev/null +++ b/tests/modules/abricate/summary/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ABRICATE_RUN } from '../../../../modules/abricate/run/main.nf' +include { ABRICATE_SUMMARY } from '../../../../modules/abricate/summary/main.nf' + +workflow test_abricate_summary { + + inputs = [ + tuple([ id:'test1', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)), + tuple([ id:'test2', single_end:false ], + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true)) + ] + + ABRICATE_RUN ( Channel.fromList(inputs) ) + ABRICATE_SUMMARY ( + ABRICATE_RUN.out.report.collect{ meta, report -> report }.map{ report -> [[ id: 'test_summary'], report]} + ) +} diff --git a/tests/modules/abricate/summary/nextflow.config b/tests/modules/abricate/summary/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/abricate/summary/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/abricate/summary/test.yml b/tests/modules/abricate/summary/test.yml new file mode 100644 index 00000000..abbd747b --- /dev/null +++ b/tests/modules/abricate/summary/test.yml @@ -0,0 +1,14 @@ +- name: abricate summary + command: nextflow run tests/modules/abricate/summary -entry test_abricate_summary -c tests/config/nextflow.config + tags: + - abricate + - abricate/summary + files: + - path: output/abricate/test1.txt + md5sum: cd07e2953b127aed8d09bf1b2b903a1f + - path: output/abricate/test2.txt + md5sum: 69af3321b0bc808b7ef85f102395736f + - path: output/abricate/test_summary.txt + md5sum: a4ec7010e75404ce3a1033f0c4b4a7f9 + - path: output/abricate/versions.yml + md5sum: a18f0471c49e5f25ec0b0c4ad5fab08e diff --git a/tests/modules/adapterremoval/main.nf b/tests/modules/adapterremoval/main.nf index ee7f1c44..a427bfbf 100644 --- a/tests/modules/adapterremoval/main.nf +++ b/tests/modules/adapterremoval/main.nf @@ -2,14 +2,16 @@ nextflow.enable.dsl = 2 -include { ADAPTERREMOVAL } from '../../../modules/adapterremoval/main.nf' +include { ADAPTERREMOVAL } from '../../../modules/adapterremoval/main.nf' +include { ADAPTERREMOVAL as ADAPTERREMOVAL_COLLAPSE } from '../../../modules/adapterremoval/main.nf' + workflow test_adapterremoval_single_end { input = [ [ id:'test', single_end:true, collapse:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] - ADAPTERREMOVAL ( input ) + ADAPTERREMOVAL ( input, [] ) } workflow test_adapterremoval_paired_end { @@ -18,15 +20,15 @@ workflow test_adapterremoval_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] - ADAPTERREMOVAL ( input ) + ADAPTERREMOVAL ( input, [] ) } workflow test_adapterremoval_paired_end_collapse { - input = [ [ id:'test', single_end:false, collapse:true ], // meta map + input = [ [ id:'test', single_end:false ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] - ADAPTERREMOVAL ( input ) + ADAPTERREMOVAL_COLLAPSE ( input, [] ) } diff --git a/tests/modules/adapterremoval/nextflow.config b/tests/modules/adapterremoval/nextflow.config index 8730f1c4..b59870ef 100644 --- a/tests/modules/adapterremoval/nextflow.config +++ b/tests/modules/adapterremoval/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: ADAPTERREMOVAL_COLLAPSE { + ext.args = "--collapse" + } + } diff --git a/tests/modules/adapterremoval/test.yml b/tests/modules/adapterremoval/test.yml index a6c4a6cf..e660da76 100644 --- a/tests/modules/adapterremoval/test.yml +++ b/tests/modules/adapterremoval/test.yml @@ -1,31 +1,45 @@ - name: adapterremoval test_adapterremoval_single_end - command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_single_end -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config + command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_single_end -c tests/config/nextflow.config tags: - adapterremoval files: - - path: output/adapterremoval/test.log + - path: output/adapterremoval/test.discarded.fastq.gz + - path: output/adapterremoval/test.settings md5sum: 2fd3d5d703b63ba33a83021fccf25f77 - - path: output/adapterremoval/test.trimmed.fastq.gz + - path: output/adapterremoval/test.truncated.fastq.gz md5sum: 62139afee94defad5b83bdd0b8475a1f + - path: output/adapterremoval/versions.yml + md5sum: ac5b46719719b7ee62739530b80869fc - name: adapterremoval test_adapterremoval_paired_end - command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config + command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_paired_end -c tests/config/nextflow.config tags: - adapterremoval files: - - path: output/adapterremoval/test.log + - path: output/adapterremoval/test.discarded.fastq.gz + - path: output/adapterremoval/test.settings md5sum: b8a451d3981b327f3fdb44f40ba2d6d1 - - path: output/adapterremoval/test.pair1.trimmed.fastq.gz + - path: output/adapterremoval/test.pair1.truncated.fastq.gz md5sum: 294a6277f0139bd597e57c6fa31f39c7 - - path: output/adapterremoval/test.pair2.trimmed.fastq.gz + - path: output/adapterremoval/test.pair2.truncated.fastq.gz md5sum: de7b38e2c881bced8671acb1ab452d78 + - path: output/adapterremoval/versions.yml + md5sum: fa621c887897da5a379c719399c17db7 - name: adapterremoval test_adapterremoval_paired_end_collapse - command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_paired_end_collapse -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config + command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_paired_end_collapse -c tests/config/nextflow.config tags: - adapterremoval files: - - path: output/adapterremoval/test.log + - path: output/adapterremoval/test.collapsed.fastq.gz + md5sum: ff956de3532599a56c3efe5369f0953f + - path: output/adapterremoval/test.collapsed.truncated.fastq.gz + - path: output/adapterremoval/test.discarded.fastq.gz + - path: output/adapterremoval/test.settings md5sum: 7f0b2328152226e46101a535cce718b3 - - path: output/adapterremoval/test.merged.fastq.gz - md5sum: 07a8f725bfd3ecbeabdc41b32d898dee + - path: output/adapterremoval/test.pair1.truncated.fastq.gz + md5sum: 683be19bc1c83008944b6b719bfa34e1 + - path: output/adapterremoval/test.pair2.truncated.fastq.gz + md5sum: e6548fe061f3ef86368b26da930174d0 + - path: output/adapterremoval/versions.yml + md5sum: 78f589bb313c8da0147ca8ce77d7f3bf diff --git a/tests/modules/adapterremovalfixprefix/main.nf b/tests/modules/adapterremovalfixprefix/main.nf new file mode 100644 index 00000000..863a7ca8 --- /dev/null +++ b/tests/modules/adapterremovalfixprefix/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ADAPTERREMOVAL } from '../../../modules/adapterremoval/main.nf' +include { ADAPTERREMOVALFIXPREFIX } from '../../../modules/adapterremovalfixprefix/main.nf' + +workflow test_adapterremovalfixprefix { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + + ADAPTERREMOVAL ( input, [] ) + ADAPTERREMOVALFIXPREFIX ( ADAPTERREMOVAL.out.collapsed ) +} diff --git a/tests/modules/adapterremovalfixprefix/nextflow.config b/tests/modules/adapterremovalfixprefix/nextflow.config new file mode 100644 index 00000000..dcfdc48c --- /dev/null +++ b/tests/modules/adapterremovalfixprefix/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: ADAPTERREMOVAL { + ext.args = "--collapse" + } + +} diff --git a/tests/modules/adapterremovalfixprefix/test.yml b/tests/modules/adapterremovalfixprefix/test.yml new file mode 100644 index 00000000..4ef6a41e --- /dev/null +++ b/tests/modules/adapterremovalfixprefix/test.yml @@ -0,0 +1,9 @@ +- name: adapterremovalfixprefix test_adapterremovalfixprefix + command: nextflow run tests/modules/adapterremovalfixprefix -entry test_adapterremovalfixprefix -c tests/config/nextflow.config + tags: + - adapterremovalfixprefix + files: + - path: output/adapterremovalfixprefix/test.fq.gz + md5sum: ff956de3532599a56c3efe5369f0953f + - path: output/adapterremovalfixprefix/versions.yml + md5sum: 983cb58079bf015c1d489a7e48261746 diff --git a/tests/modules/amplify/predict/main.nf b/tests/modules/amplify/predict/main.nf new file mode 100644 index 00000000..05db4cdb --- /dev/null +++ b/tests/modules/amplify/predict/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRODIGAL } from '../../../modules/prodigal/main.nf' addParams( options: [:] ) +include { AMPLIFY_PREDICT } from '../../../../modules/amplify/predict/main.nf' addParams( options: [:] ) + +workflow amplify_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) + ] + model_dir = [] + + PRODIGAL ( input, "gff" ) + AMPLIFY_PREDICT ( PRODIGAL.out.amino_acid_fasta, model_dir) +} diff --git a/tests/modules/amplify/predict/nextflow.config b/tests/modules/amplify/predict/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/amplify/predict/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/amplify/predict/test.yml b/tests/modules/amplify/predict/test.yml new file mode 100644 index 00000000..3bc92889 --- /dev/null +++ b/tests/modules/amplify/predict/test.yml @@ -0,0 +1,9 @@ +- name: amplify predict amplify_predict + command: nextflow run tests/modules/amplify/predict -entry amplify_predict -c tests/config/nextflow.config + tags: + - amplify/predict + - amplify + files: + - path: output/amplify/test.tsv + md5sum: 1951084ce1d410028be86754997e5852 + - path: output/amplify/versions.yml diff --git a/tests/modules/amps/main.nf b/tests/modules/amps/main.nf index 15572096..7c4969e9 100644 --- a/tests/modules/amps/main.nf +++ b/tests/modules/amps/main.nf @@ -15,18 +15,21 @@ workflow test_amps { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) gff = [] seq_type = "DNA" - map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) - input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] mode = "BlastN" taxon_list = file(params.test_data['sarscov2']['genome']['taxon_list_txt'], checkIfExists: true) - ncbi_dir = file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) - filter = "def_anc" + ncbi_dir = [ [], file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) ] UNZIP_MALT ( map_db ) UNZIP_MALTEXTRACT ( ncbi_dir ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP_MALT.out.unzipped_archive ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP_MALT.out.unzipped_archive.map{ it[1] } ) MALT_RUN ( input, mode, MALT_BUILD.out.index ) - MALTEXTRACT ( MALT_RUN.out.rma6, taxon_list, UNZIP_MALTEXTRACT.out.unzipped_archive) + ch_input_to_maltextract = MALT_RUN.out.rma6.map{ it[1] } + MALTEXTRACT ( ch_input_to_maltextract, taxon_list, UNZIP_MALTEXTRACT.out.unzipped_archive.map{ it[1] }) AMPS ( MALTEXTRACT.out.results, taxon_list, filter ) } diff --git a/tests/modules/amrfinderplus/run/main.nf b/tests/modules/amrfinderplus/run/main.nf new file mode 100644 index 00000000..917ac28d --- /dev/null +++ b/tests/modules/amrfinderplus/run/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { AMRFINDERPLUS_UPDATE } from '../../../../modules/amrfinderplus/update/main.nf' +include { AMRFINDERPLUS_RUN } from '../../../../modules/amrfinderplus/run/main.nf' + +workflow test_amrfinderplus_run { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + AMRFINDERPLUS_UPDATE ( ) + AMRFINDERPLUS_RUN ( input, AMRFINDERPLUS_UPDATE.out.db ) +} diff --git a/tests/modules/amrfinderplus/run/nextflow.config b/tests/modules/amrfinderplus/run/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/amrfinderplus/run/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/amrfinderplus/run/test.yml b/tests/modules/amrfinderplus/run/test.yml new file mode 100644 index 00000000..d858cb88 --- /dev/null +++ b/tests/modules/amrfinderplus/run/test.yml @@ -0,0 +1,11 @@ +- name: amrfinderplus run test_amrfinderplus_run + command: nextflow run tests/modules/amrfinderplus/run -entry test_amrfinderplus_run -c tests/config/nextflow.config + tags: + - amrfinderplus/run + - amrfinderplus + files: + - path: output/amrfinderplus/amrfinderdb.tar.gz + - path: output/amrfinderplus/test.tsv + md5sum: b4d261ace9be7d013c19d1f5c0005bfe + - path: output/amrfinderplus/versions.yml + md5sum: 642ca04a07d79fe4c4d02348562e3961 diff --git a/tests/modules/amrfinderplus/update/main.nf b/tests/modules/amrfinderplus/update/main.nf new file mode 100644 index 00000000..f3a34ea0 --- /dev/null +++ b/tests/modules/amrfinderplus/update/main.nf @@ -0,0 +1,11 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { AMRFINDERPLUS_UPDATE } from '../../../../modules/amrfinderplus/update/main.nf' + +workflow test_amrfinderplus_update { + + AMRFINDERPLUS_UPDATE ( ) + +} diff --git a/tests/modules/amrfinderplus/update/nextflow.config b/tests/modules/amrfinderplus/update/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/amrfinderplus/update/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/amrfinderplus/update/test.yml b/tests/modules/amrfinderplus/update/test.yml new file mode 100644 index 00000000..7ae89992 --- /dev/null +++ b/tests/modules/amrfinderplus/update/test.yml @@ -0,0 +1,9 @@ +- name: amrfinderplus update test_amrfinderplus_update + command: nextflow run tests/modules/amrfinderplus/update -entry test_amrfinderplus_update -c tests/config/nextflow.config + tags: + - amrfinderplus + - amrfinderplus/update + files: + - path: output/amrfinderplus/amrfinderdb.tar.gz + - path: output/amrfinderplus/versions.yml + md5sum: 4db18fa509309db4da0920a7eeaba86c diff --git a/tests/modules/antismash/antismashlite/main.nf b/tests/modules/antismash/antismashlite/main.nf new file mode 100644 index 00000000..2b23c400 --- /dev/null +++ b/tests/modules/antismash/antismashlite/main.nf @@ -0,0 +1,46 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ANTISMASH_ANTISMASHLITE } from '../../../../modules/antismash/antismashlite/main.nf' +include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../modules/antismash/antismashlitedownloaddatabases/main.nf' +include { GUNZIP as GUNZIP1 } from '../../../../modules/gunzip/main.nf' +include { GUNZIP as GUNZIP2 } from '../../../../modules/gunzip/main.nf' +include { UNTAR as UNTAR1 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR2 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR3 } from '../../../../modules/untar/main.nf' + +workflow test_antismashlite { + genome_fna = [ + [ id:'test' ], + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + genome_gff = [ + [], + file(params.test_data['bacteroides_fragilis']['genome']['genome_gff_gz'], checkIfExists: true) + ] + + antismash_css = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + + antismash_detection = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + + antismash_modules = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + + GUNZIP1 ( genome_fna ) + GUNZIP2 ( genome_gff ) + UNTAR1 ( antismash_css ) + UNTAR2 ( antismash_detection ) + UNTAR3 ( antismash_modules ) + ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) + ANTISMASH_ANTISMASHLITE ( GUNZIP1.out.gunzip, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir, GUNZIP2.out.gunzip.map{ it[1] } ) +} diff --git a/tests/modules/antismash/antismashlite/nextflow.config b/tests/modules/antismash/antismashlite/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/antismash/antismashlite/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/antismash/antismashlite/test.yml b/tests/modules/antismash/antismashlite/test.yml new file mode 100644 index 00000000..4642319c --- /dev/null +++ b/tests/modules/antismash/antismashlite/test.yml @@ -0,0 +1,35 @@ +- name: antismash antismashlite test_antismashlite + command: nextflow run tests/modules/antismash/antismashlite -entry test_antismashlite -c tests/config/nextflow.config + tags: + - antismash/antismashlite + - antismash + files: + - path: output/antismash/test/NZ_CP069563.1.region001.gbk + contains: ['/tool="antismash"'] + - path: output/antismash/test/NZ_CP069563.1.region002.gbk + contains: ['/tool="antismash"'] + - path: output/antismash/test/css/bacteria.css + md5sum: 8b3c2f8b143d5245a5f42f55803c532c + - path: output/antismash/test/genome.gbk + contains: ['/tool="antismash"'] + - path: output/antismash/test/genome.json + contains: ['{"version": "6.0.1", "input_file": "genome.fna", "records": [{"id": "NZ_CP069563.1", "seq": {"data":'] + - path: output/antismash/test/genome.zip + - path: output/antismash/test/index.html + md5sum: de787e865c3a1eec143a19d2facb4de4 + - path: output/antismash/test/js/antismash.js + md5sum: 58e90c3d783ae014cc3d51849bcb50a2 + - path: output/antismash/test/js/jquery.js + md5sum: 397754ba49e9e0cf4e7c190da78dda05 + - path: output/antismash/test/js/jquery.tablesorter.min.js + md5sum: 5e9e08cef4d1be0eaa538e6eb28809a7 + - path: output/antismash/test/regions.js + contains: ['"seq_id": "NZ_CP069563.1"'] + - path: output/antismash/test/test.log + contains: ["antiSMASH version: 6.0.1"] + - path: output/antismash/versions.yml + md5sum: 759431a43da33e2ef8e2d0ebd79a439b + - path: output/gunzip1/genome.fna + md5sum: dafd38f5454b54fbea38245d773062a5 + - path: output/gunzip2/genome.gff + md5sum: 9b9c848b1946d43fa68128f4d6316052 diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/main.nf b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..d7289acc --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR as UNTAR1 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR2 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR3 } from '../../../../modules/untar/main.nf' +include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../modules/antismash/antismashlitedownloaddatabases/main.nf' + +workflow test_antismash_antismashlitedownloaddatabases { + input1 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + input2 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + input3 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + + UNTAR1 ( input1 ) + UNTAR2 ( input2 ) + UNTAR3 ( input3 ) + + ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config new file mode 100644 index 00000000..06a716aa --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml new file mode 100644 index 00000000..b4a964a0 --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -0,0 +1,16 @@ +- name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases + command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config + tags: + - antismash/antismashlitedownloaddatabases + - antismash + files: + - path: output/antismash/versions.yml + md5sum: 24859c67023abab99de295d3675a24b6 + - path: output/antismash/antismash_db + - path: output/antismash/antismash_db/clusterblast + - path: output/antismash/antismash_db/clustercompare + - path: output/antismash/antismash_db/pfam + - path: output/antismash/antismash_db/resfam + - path: output/antismash/antismash_db/tigrfam + - path: output/antismash/antismash_dir + - path: output/antismash/antismash_dir/detection/hmm_detection/data/bgc_seeds.hmm diff --git a/tests/modules/arriba/main.nf b/tests/modules/arriba/main.nf index 60741275..205adf0f 100644 --- a/tests/modules/arriba/main.nf +++ b/tests/modules/arriba/main.nf @@ -20,7 +20,7 @@ workflow test_arriba_single_end { STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center ) - ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf , [], [], [], [], []) } workflow test_arriba_paired_end { @@ -38,5 +38,5 @@ workflow test_arriba_paired_end { STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center ) - ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf, [], [], [], [], []) } diff --git a/tests/modules/arriba/test.yml b/tests/modules/arriba/test.yml index 52743167..b1e34db0 100644 --- a/tests/modules/arriba/test.yml +++ b/tests/modules/arriba/test.yml @@ -4,7 +4,7 @@ - arriba files: - path: output/arriba/test.fusions.discarded.tsv - md5sum: cad8c215b938d1e45b747a5b7898a4c2 + md5sum: 7602ab4ccbbb0c54fbca12a942877e6d - path: output/arriba/test.fusions.tsv md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 - path: output/star/star/Genome @@ -39,6 +39,7 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam + md5sum: 4fa079d11f8938e51015e3e477fa7149 - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -50,7 +51,7 @@ - arriba files: - path: output/arriba/test.fusions.discarded.tsv - md5sum: 85e36c887464e4deaa65f45174d3b8fd + md5sum: cdc6cfbc75e68ce29a766f50f390274d - path: output/arriba/test.fusions.tsv md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 - path: output/star/star/Genome diff --git a/tests/modules/artic/minion/main.nf b/tests/modules/artic/minion/main.nf index ca66ede0..b70b549e 100644 --- a/tests/modules/artic/minion/main.nf +++ b/tests/modules/artic/minion/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { UNTAR } from '../../../../modules/untar/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' include { ARTIC_MINION } from '../../../../modules/artic/minion/main.nf' workflow test_artic_minion { @@ -11,13 +11,12 @@ workflow test_artic_minion { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - fast5_tar = file(params.test_data['sarscov2']['nanopore']['fast5_tar_gz'], checkIfExists: true) + fast5_tar = [ [], file(params.test_data['sarscov2']['nanopore']['fast5_tar_gz'], checkIfExists: true) ] sequencing_summary = file(params.test_data['sarscov2']['nanopore']['test_sequencing_summary'], checkIfExists: true) fasta = file('https://github.com/artic-network/primer-schemes/raw/master/nCoV-2019/V3/nCoV-2019.reference.fasta', checkIfExists: true) bed = file('https://github.com/artic-network/primer-schemes/raw/master/nCoV-2019/V3/nCoV-2019.primer.bed', checkIfExists: true) - dummy_file = [] - fast5_dir = UNTAR ( fast5_tar ).untar + fast5_dir = UNTAR ( fast5_tar ).untar.map{ it[1] } - ARTIC_MINION ( input, fast5_dir, sequencing_summary, fasta, bed, dummy_file, 'nCoV-2019', '3') + ARTIC_MINION ( input, fast5_dir, sequencing_summary, fasta, bed, [], '', 'nCoV-2019', '3') } diff --git a/tests/modules/artic/minion/test.yml b/tests/modules/artic/minion/test.yml index 8b36b224..401a8470 100644 --- a/tests/modules/artic/minion/test.yml +++ b/tests/modules/artic/minion/test.yml @@ -34,7 +34,7 @@ md5sum: e6e184f1fa153868e3acea0eab42e484 - path: output/artic/test.minion.log.txt contains: - - 'artic_vcf_merge' + - "artic_vcf_merge" - path: output/artic/test.muscle.in.fasta md5sum: 40ae4c89de797d1548c642f0da7a86cc - path: output/artic/test.muscle.out.fasta diff --git a/tests/modules/ascat/main.nf b/tests/modules/ascat/main.nf new file mode 100644 index 00000000..e1f4f798 --- /dev/null +++ b/tests/modules/ascat/main.nf @@ -0,0 +1,64 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ASCAT as ASCAT_SIMPLE} from '../../../modules/ascat/main.nf' +include { ASCAT as ASCAT_PLOIDY_AND_PURITY} from '../../../modules/ascat/main.nf' +include { ASCAT as ASCAT_CRAM} from '../../../modules/ascat/main.nf' + + + + +workflow test_ascat { + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + + ASCAT_SIMPLE ( input , [], []) +} + + + + + +// extended tests running with 1000 genomes data. Data is downloaded as follows: +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00154/alignment/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00154/alignment/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai +// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam +// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai +//workflow test_ascat_with_ploidy_and_purity { +// input = [ +// [ id:'test', single_end:false ], // meta map +// file("/home/ec2-user/input_files/bams/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam", checkIfExists: true), +// file("/home/ec2-user/input_files/bams/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai", checkIfExists: true), +// file("/home/ec2-user/input_files/bams/test2.bam", checkIfExists: true), +// file("/home/ec2-user/input_files/bams/test2.bam.bai", checkIfExists: true) +// ] +// +// ASCAT_PLOIDY_AND_PURITY ( input , "/home/ec2-user/input_files/allele_files/G1000_alleles_hg19_chr", "/home/ec2-user/input_files/loci_files/G1000_alleles_hg19_chr") +//} + + +// extended tests running with 1000 genomes data. Data is downloaded as follows: +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00145/alignment/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00145/alignment/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00146/alignment/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai +// wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00146/alignment/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram +//workflow test_ascat_with_crams { +// input = [ +// [ id:'test', single_end:false ], // meta map +// file("/home/ec2-user/input_files/crams/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram", checkIfExists: true), +// file("/home/ec2-user/input_files/crams/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai", checkIfExists: true), +// file("/home/ec2-user/input_files/crams/duplicate_test.cram", checkIfExists: true), +// file("/home/ec2-user/input_files/crams/duplicate_test.cram.crai", checkIfExists: true) +// ] +// +// ASCAT_CRAM ( input , "/home/ec2-user/input_files/allele_files/G1000_alleles_hg19_chr", "/home/ec2-user/input_files/loci_files/G1000_alleles_hg19_chr") +//} + + + diff --git a/tests/modules/ascat/nextflow.config b/tests/modules/ascat/nextflow.config new file mode 100644 index 00000000..3c6cc53a --- /dev/null +++ b/tests/modules/ascat/nextflow.config @@ -0,0 +1,39 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + + withName: ASCAT_SIMPLE { + ext.args = [ + gender : 'XY', + genomeVersion : 'hg19', + minCounts : '1', + min_base_qual : '1', + min_map_qual : '1', + chrom_names : 'c("21","22")' + ] + } + + + + withName: ASCAT_PLOIDY_AND_PURITY { + ext.args = [ + gender : 'XX', + genomeVersion : 'hg19', + ploidy : '1.7', + purity : '0.24', + chrom_names : 'c("21","22")' + ] + } + + withName: ASCAT_CRAM { + ext.args = [ + gender : 'XX', + genomeVersion : 'hg19', + ref_fasta : '/home/ec2-user/input_files/fasta/human_g1k_v37.fasta', + chrom_names : 'c("21","22")' + ] + } + +} + diff --git a/tests/modules/ascat/test.yml b/tests/modules/ascat/test.yml new file mode 100644 index 00000000..668e8823 --- /dev/null +++ b/tests/modules/ascat/test.yml @@ -0,0 +1,25 @@ +- name: ascat test_ascat + command: nextflow run tests/modules/ascat -entry test_ascat -c tests/config/nextflow.config -stub-run + tags: + - ascat + files: + - path: output/ascat/Tumour.ASCATprofile.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/Tumour.ASPCF.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/Tumour.germline.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/Tumour.rawprofile.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/Tumour.sunrise.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/Tumour.tumour.png + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/test.cnvs.txt + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/test.purityploidy.txt + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/test.segments.txt + md5sum: f50b84b1db4b83ba62ec1deacc69c260 + - path: output/ascat/versions.yml + md5sum: 1af20694ec11004c4f8bc0c609b06386 diff --git a/tests/modules/ataqv/ataqv/test.yml b/tests/modules/ataqv/ataqv/test.yml index f9f2a888..5c5a10e0 100644 --- a/tests/modules/ataqv/ataqv/test.yml +++ b/tests/modules/ataqv/ataqv/test.yml @@ -6,7 +6,7 @@ files: - path: output/ataqv/test.ataqv.json contains: - - '"forward_mate_reads": 101' + - '"forward_mate_reads": 101' - name: ataqv ataqv test_ataqv_ataqv_problem_reads command: nextflow run ./tests/modules/ataqv/ataqv -entry test_ataqv_ataqv_problem_reads -c ./tests/config/nextflow.config -c ./tests/modules/ataqv/ataqv/nextflow.config @@ -17,8 +17,8 @@ - path: output/ataqv/1.problems md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/ataqv/test.ataqv.json - contains: - - '"forward_mate_reads": 101' + contains: + - '"forward_mate_reads": 101' - name: ataqv ataqv test_ataqv_ataqv_peak command: nextflow run ./tests/modules/ataqv/ataqv -entry test_ataqv_ataqv_peak -c ./tests/config/nextflow.config -c ./tests/modules/ataqv/ataqv/nextflow.config @@ -27,8 +27,8 @@ - ataqv/ataqv files: - path: output/ataqv/test.ataqv.json - contains: - - '"forward_mate_reads": 101' + contains: + - '"forward_mate_reads": 101' - name: ataqv ataqv test_ataqv_ataqv_tss command: nextflow run ./tests/modules/ataqv/ataqv -entry test_ataqv_ataqv_tss -c ./tests/config/nextflow.config -c ./tests/modules/ataqv/ataqv/nextflow.config @@ -37,8 +37,8 @@ - ataqv/ataqv files: - path: output/ataqv/test.ataqv.json - contains: - - '"forward_mate_reads": 101' + contains: + - '"forward_mate_reads": 101' - name: ataqv ataqv test_ataqv_ataqv_excluded_regs command: nextflow run ./tests/modules/ataqv/ataqv -entry test_ataqv_ataqv_excluded_regs -c ./tests/config/nextflow.config -c ./tests/modules/ataqv/ataqv/nextflow.config @@ -47,5 +47,5 @@ - ataqv/ataqv files: - path: output/ataqv/test.ataqv.json - contains: - - '"forward_mate_reads": 101' + contains: + - '"forward_mate_reads": 101' diff --git a/tests/modules/bakta/test.yml b/tests/modules/bakta/test.yml index dcfc32bc..1eb3d8a5 100644 --- a/tests/modules/bakta/test.yml +++ b/tests/modules/bakta/test.yml @@ -1,25 +1,14 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml bakta - name: bakta command: nextflow run ./tests/modules/bakta -entry test_bakta -c tests/config/nextflow.config -stub-run tags: - bakta files: - path: output/bakta/test.embl - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.faa - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.ffn - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.fna - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.gbff - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.gff3 - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.hypotheticals.tsv - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.hypotheticals.faa - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/bakta/test.tsv - md5sum: d41d8cd98f00b204e9800998ecf8427e diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index eb0bed01..e5c15c32 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -2,13 +2,29 @@ nextflow.enable.dsl = 2 -include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf' -workflow test_bamtools_split { +workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_SINGLE ( input ) } + +workflow test_bamtools_split_multiple { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] + ] + + BAMTOOLS_SPLIT_MULTIPLE ( input ) +} + diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 4f52e9ce..af639b43 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,10 +1,23 @@ -- name: bamtools split test_bamtools_split - command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config +- name: bamtools split test_bamtools_split_single_input + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - - bamtools/split - bamtools + - bamtools/split files: - - path: output/bamtools/test.paired_end.sorted.REF_chr22.bam + - path: output/bamtools/test.REF_chr22.bam md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07 - - path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam + - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb + - path: output/bamtools/versions.yml + +- name: bamtools split test_bamtools_split_multiple + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config + tags: + - bamtools + - bamtools/split + files: + - path: output/bamtools/test.REF_chr22.bam + md5sum: 585675bea34c48ebe9db06a561d4b4fa + - path: output/bamtools/test.REF_unmapped.bam + md5sum: 16ad644c87b9471f3026bc87c98b4963 + - path: output/bamtools/versions.yml diff --git a/tests/modules/bbmap/align/test.yml b/tests/modules/bbmap/align/test.yml index d9f9a862..aa3a9c1c 100644 --- a/tests/modules/bbmap/align/test.yml +++ b/tests/modules/bbmap/align/test.yml @@ -5,7 +5,7 @@ - bbmap/align files: - path: output/bbmap/test.bam - md5sum: e0ec7f1eec537acf146fac1cbdd868d1 + md5sum: 8549040067d23949bddb6fe2ad211c92 - path: output/bbmap/test.bbmap.log - name: bbmap align paired end index ref @@ -15,7 +15,7 @@ - bbmap/align files: - path: output/bbmap/test.bam - md5sum: 345a72a0d58366d75dd263b107caa460 + md5sum: aeb842491ca6c7806aa7103b5223620f - path: output/bbmap/test.bbmap.log - name: bbmap align single end index ref @@ -25,7 +25,7 @@ - bbmap/align files: - path: output/bbmap/test.bam - md5sum: 95f690636581ce9b27cf8568c715ae4d + md5sum: b6a41cb344a343d46244d8f94eb66ec0 - path: output/bbmap/test.bbmap.log - name: bbmap align paired end index ref pigz @@ -35,5 +35,5 @@ - bbmap/align files: - path: output/bbmap/test.bam - md5sum: 441c4f196b9a82c7b224903538064308 + md5sum: 74944e24acccb8c5abc316dcdd623c84 - path: output/bbmap/test.bbmap.log diff --git a/tests/modules/bbmap/bbsplit/test.yml b/tests/modules/bbmap/bbsplit/test.yml index add9b519..a1933211 100644 --- a/tests/modules/bbmap/bbsplit/test.yml +++ b/tests/modules/bbmap/bbsplit/test.yml @@ -7,17 +7,17 @@ - path: output/bbmap/bbsplit/ref/genome/1/chr1.chrom.gz - path: output/bbmap/bbsplit/ref/genome/1/info.txt contains: - - 'Chromosome' + - "Chromosome" - path: output/bbmap/bbsplit/ref/genome/1/merged_ref_9222711925172838098.fa.gz - path: output/bbmap/bbsplit/ref/genome/1/namelist.txt md5sum: 45e7a4cdc7a11a39ada56844ca3a1e30 - path: output/bbmap/bbsplit/ref/genome/1/reflist.txt contains: - - 'genome.fasta' + - "genome.fasta" - path: output/bbmap/bbsplit/ref/genome/1/scaffolds.txt.gz - path: output/bbmap/bbsplit/ref/genome/1/summary.txt contains: - - 'scaffolds' + - "scaffolds" - path: output/bbmap/bbsplit/ref/index/1/chr1_index_k13_c13_b1.block md5sum: 385913c1e84b77dc7bf36288ee1c8706 - path: output/bbmap/bbsplit/ref/index/1/chr1_index_k13_c13_b1.block2.gz diff --git a/tests/modules/bbmap/pileup/main.nf b/tests/modules/bbmap/pileup/main.nf new file mode 100644 index 00000000..943df9b5 --- /dev/null +++ b/tests/modules/bbmap/pileup/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BBMAP_PILEUP } from '../../../../modules/bbmap/pileup/main.nf' + +workflow test_bbmap_pileup { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BBMAP_PILEUP ( input ) +} diff --git a/tests/modules/bbmap/pileup/nextflow.config b/tests/modules/bbmap/pileup/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/bbmap/pileup/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/bbmap/pileup/test.yml b/tests/modules/bbmap/pileup/test.yml new file mode 100644 index 00000000..272cdcf7 --- /dev/null +++ b/tests/modules/bbmap/pileup/test.yml @@ -0,0 +1,12 @@ +- name: "bbmap pileup" + command: nextflow run ./tests/modules/bbmap/pileup -entry test_bbmap_pileup -c ./tests/config/nextflow.config -c ./tests/modules/bbmap/pileup/nextflow.config + tags: + - "bbmap" + - "bbmap/pileup" + files: + - path: "output/bbmap/test.coverage.stats.txt" + md5sum: c3fc9d0681589b69e3301ca3cb27b7a4 + - path: "output/bbmap/test.coverage.hist.txt" + md5sum: 96915920ef42ddc9483457dd4585a088 + - path: output/bbmap/versions.yml + md5sum: e2bc51873b24e7fea269b7c1501de060 diff --git a/tests/modules/bcftools/annotate/main.nf b/tests/modules/bcftools/annotate/main.nf new file mode 100644 index 00000000..0d096ca9 --- /dev/null +++ b/tests/modules/bcftools/annotate/main.nf @@ -0,0 +1,23 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_ANNOTATE } from '../../../../modules/bcftools/annotate/main.nf' + +workflow test_bcftools_annotate_out_vcf { + + input = [ + [ id:'test_compressed_vcf', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + + BCFTOOLS_ANNOTATE ( input ) +} + +workflow test_bcftools_annotate_out_bcf { + + input = [ + [ id:'test_compressed_bcf', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true) ] + + BCFTOOLS_ANNOTATE ( input ) +} diff --git a/tests/modules/bcftools/annotate/nextflow.config b/tests/modules/bcftools/annotate/nextflow.config new file mode 100644 index 00000000..2670da17 --- /dev/null +++ b/tests/modules/bcftools/annotate/nextflow.config @@ -0,0 +1,5 @@ +process { + ext.args = "-x ID,INFO/DP,FORMAT/DP" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/bcftools/annotate/test.yml b/tests/modules/bcftools/annotate/test.yml new file mode 100644 index 00000000..e8cdcc4b --- /dev/null +++ b/tests/modules/bcftools/annotate/test.yml @@ -0,0 +1,19 @@ +- name: bcftools annotate test_bcftools_annotate_out_vcf + command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate_out_vcf -c tests/config/nextflow.config + tags: + - bcftools/annotate + - bcftools + files: + - path: output/bcftools/test_compressed_vcf_annotated.vcf.gz + - path: output/bcftools/versions.yml + md5sum: de86d4d411baef1aaee0e72f519dbe1f + +- name: bcftools annotate test_bcftools_annotate_out_bcf + command: nextflow run tests/modules/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c tests/config/nextflow.config + tags: + - bcftools/annotate + - bcftools + files: + - path: output/bcftools/test_compressed_bcf_annotated.bcf + - path: output/bcftools/versions.yml + md5sum: a57e62a5a189fe85aabd52c010d88ca6 diff --git a/tests/modules/bclconvert/main.nf b/tests/modules/bclconvert/main.nf new file mode 100644 index 00000000..e8a78e4f --- /dev/null +++ b/tests/modules/bclconvert/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCLCONVERT } from '../../../modules/bclconvert/main.nf' + +process STUB_BCLCONVERT_INPUT { + output: + path "SampleSheet.csv" ,emit: samplesheet + path "DDMMYY_SERIAL_FLOWCELL" ,emit: run_dir + + stub: + """ + mkdir DDMMYY_SERIAL_FLOWCELL + echo "SampleSheet" > SampleSheet.csv + """ +} + +workflow test_bclconvert { + STUB_BCLCONVERT_INPUT () + BCLCONVERT (STUB_BCLCONVERT_INPUT.out.samplesheet, STUB_BCLCONVERT_INPUT.out.run_dir) +} diff --git a/tests/modules/bclconvert/nextflow.config b/tests/modules/bclconvert/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/bclconvert/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/bclconvert/test.yml b/tests/modules/bclconvert/test.yml new file mode 100644 index 00000000..65e71a59 --- /dev/null +++ b/tests/modules/bclconvert/test.yml @@ -0,0 +1,52 @@ +- name: bclconvert test_bclconvert + command: nextflow run tests/modules/bclconvert -entry test_bclconvert -c tests/config/nextflow.config -stub-run + tags: + - bclconvert + files: + - path: output/bclconvert/InterOp/InterOp.bin + md5sum: d3dea0bb4ab1c8754af324f40b001481 + - path: output/bclconvert/Logs/Errors.log + md5sum: 334645f09074b2597a692e395b716a9c + - path: output/bclconvert/Logs/FastqComplete.txt + md5sum: a4c4c6ce2d0de67d3b7ac7d1fcb512e4 + - path: output/bclconvert/Logs/Info.log + md5sum: d238822d379f2277cac950ca986cb660 + - path: output/bclconvert/Logs/Warnings.log + md5sum: aeefd2d631817e170f88f25ecaaf4664 + - path: output/bclconvert/Reports/Adapter_Metrics.csv + md5sum: af62e9c7b44940cfd8ea11064a1f42ae + - path: output/bclconvert/Reports/Demultiplex_Stats.csv + md5sum: d11313931fcaabb5ce159462ad3dd1da + - path: output/bclconvert/Reports/IndexMetricsOut.bin + md5sum: 6bcee11c8145e3b1059ceaa91d2f5be7 + - path: output/bclconvert/Reports/Index_Hopping_Counts.csv + md5sum: 697e40e0c0d48b4bd25f138ef60b0bde + - path: output/bclconvert/Reports/Quality_Metrics.csv + md5sum: 3902fd38f6b01f1ce0f0e8724238f8f2 + - path: output/bclconvert/Reports/RunInfo.xml + md5sum: 5bef7c7e76360231b0c4afdfc915fd44 + - path: output/bclconvert/Reports/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/Reports/Top_Unknown_Barcodes.csv + md5sum: 39a5e7f6d21c12d6051afdc8261b6330 + - path: output/bclconvert/Reports/fastq_list.csv + md5sum: 32c51ab10e013fd547928de57361ffcb + - path: output/bclconvert/sample1_S1_L001_R1_001.fastq.gz + md5sum: 9b831a39755935333f86f167527a094d + - path: output/bclconvert/sample1_S1_L001_R2_001.fastq.gz + md5sum: 082f4f767b7619f409ca7e752ef482bf + - path: output/bclconvert/sample1_S1_L002_R1_001.fastq.gz + md5sum: 837764c89db93dfb53cd663c4f26f3d7 + - path: output/bclconvert/sample1_S1_L002_R2_001.fastq.gz + md5sum: 1a42cf6ba0bb8fc7770f278e6d1ab676 + - path: output/bclconvert/sample2_S2_L001_R1_001.fastq.gz + md5sum: 475bc426b7cc48d0551d40e31457dc78 + - path: output/bclconvert/sample2_S2_L001_R2_001.fastq.gz + md5sum: f670ccd7d9352e0e67fe1c1232429d94 + - path: output/bclconvert/sample2_S2_L002_R1_001.fastq.gz + md5sum: ebd5ff6fa5603e7d704b5a10598de58c + - path: output/bclconvert/sample2_S2_L002_R2_001.fastq.gz + md5sum: 2f83b460f52620d2548c7ef8845b31d7 + - path: output/stub/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/versions.yml diff --git a/tests/modules/biobambam/bammarkduplicates2/main.nf b/tests/modules/biobambam/bammarkduplicates2/main.nf new file mode 100644 index 00000000..aeab18b9 --- /dev/null +++ b/tests/modules/biobambam/bammarkduplicates2/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BIOBAMBAM_BAMMARKDUPLICATES2 } from '../../../../modules/biobambam/bammarkduplicates2/main.nf' + +workflow test_biobambam_bammarkduplicates2 { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BIOBAMBAM_BAMMARKDUPLICATES2 ( input ) +} diff --git a/tests/modules/biobambam/bammarkduplicates2/nextflow.config b/tests/modules/biobambam/bammarkduplicates2/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biobambam/bammarkduplicates2/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biobambam/bammarkduplicates2/test.yml b/tests/modules/biobambam/bammarkduplicates2/test.yml new file mode 100644 index 00000000..7c16fcf1 --- /dev/null +++ b/tests/modules/biobambam/bammarkduplicates2/test.yml @@ -0,0 +1,12 @@ +- name: biobambam bammarkduplicates2 test_biobambam_bammarkduplicates2 + command: nextflow run tests/modules/biobambam/bammarkduplicates2 -entry test_biobambam_bammarkduplicates2 -c tests/config/nextflow.config + tags: + - biobambam/bammarkduplicates2 + - biobambam + files: + - path: output/biobambam/test.bam + md5sum: 603edff09029096ddf2bb8a3f12d7aa7 + - path: output/biobambam/test.metrics.txt + md5sum: 30d6e7d90bb5df46329d4bc0144ce927 + - path: output/biobambam/versions.yml + md5sum: dfdf2b084655d124acac0bfb4eda86cc diff --git a/tests/modules/biobambam/bamsormadup/main.nf b/tests/modules/biobambam/bamsormadup/main.nf new file mode 100644 index 00000000..741a4433 --- /dev/null +++ b/tests/modules/biobambam/bamsormadup/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BIOBAMBAM_BAMSORMADUP } from '../../../../modules/biobambam/bamsormadup/main.nf' + +workflow test_biobambam_bamsormadup { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)], + ] + + BIOBAMBAM_BAMSORMADUP ( input, [] ) +} diff --git a/tests/modules/biobambam/bamsormadup/nextflow.config b/tests/modules/biobambam/bamsormadup/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biobambam/bamsormadup/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biobambam/bamsormadup/test.yml b/tests/modules/biobambam/bamsormadup/test.yml new file mode 100644 index 00000000..a7a14202 --- /dev/null +++ b/tests/modules/biobambam/bamsormadup/test.yml @@ -0,0 +1,11 @@ +- name: biobambam bamsormadup test_biobambam_bamsormadup + command: nextflow run tests/modules/biobambam/bamsormadup -entry test_biobambam_bamsormadup -c tests/config/nextflow.config + tags: + - biobambam/bamsormadup + - biobambam + files: + - path: output/biobambam/test.bam + md5sum: 243a77fb0642fd46bb16a4d3432d19dc + - path: output/biobambam/test.metrics.txt + md5sum: 1721879bea1f3888ecd33b35e6ee0e72 + - path: output/biobambam/versions.yml diff --git a/tests/modules/biscuit/align/main.nf b/tests/modules/biscuit/align/main.nf new file mode 100644 index 00000000..f3e3cb64 --- /dev/null +++ b/tests/modules/biscuit/align/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_ALIGN as BISCUIT_ALIGN_SE } from '../../../../modules/biscuit/align/main.nf' +include { BISCUIT_ALIGN as BISCUIT_ALIGN_PE } from '../../../../modules/biscuit/align/main.nf' + + +// Single-end test +workflow test_biscuit_align_single { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_ALIGN_SE (input, BISCUIT_INDEX.out.index ) +} + +// paired-end test +workflow test_biscuit_align_paired { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_ALIGN_SE (input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/align/nextflow.config b/tests/modules/biscuit/align/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/align/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/align/test.yml b/tests/modules/biscuit/align/test.yml new file mode 100644 index 00000000..bf778ff5 --- /dev/null +++ b/tests/modules/biscuit/align/test.yml @@ -0,0 +1,53 @@ +- name: biscuit align test_biscuit_align_single + command: nextflow run tests/modules/biscuit/align -entry test_biscuit_align_single -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/align + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bam + md5sum: eb36532425cb9b259410d6464a9e523a + - path: output/biscuit/versions.yml + md5sum: a86c4170bbf90cc75b93eb59ea124acd + +- name: biscuit align test_biscuit_align_paired + command: nextflow run tests/modules/biscuit/align -entry test_biscuit_align_paired -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/align + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bam + md5sum: be3f6aa86c499d6a6b2996e5936e4f50 + - path: output/biscuit/versions.yml + md5sum: f0b7dffd28f5e6bb1466fce6661d133f diff --git a/tests/modules/biscuit/biscuitblaster/main.nf b/tests/modules/biscuit/biscuitblaster/main.nf new file mode 100644 index 00000000..5e4bc95a --- /dev/null +++ b/tests/modules/biscuit/biscuitblaster/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_BLASTER as BISCUIT_BLASTER_SE } from '../../../../modules/biscuit/biscuitblaster/main.nf' +include { BISCUIT_BLASTER as BISCUIT_BLASTER_PE } from '../../../../modules/biscuit/biscuitblaster/main.nf' + +// Single-end test +workflow test_biscuit_blaster_single { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_BLASTER_SE (input, BISCUIT_INDEX.out.index ) +} + +// paired-end test +workflow test_biscuit_blaster_paired { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_BLASTER_PE (input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/biscuitblaster/nextflow.config b/tests/modules/biscuit/biscuitblaster/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/biscuitblaster/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/biscuitblaster/test.yml b/tests/modules/biscuit/biscuitblaster/test.yml new file mode 100644 index 00000000..37bb6543 --- /dev/null +++ b/tests/modules/biscuit/biscuitblaster/test.yml @@ -0,0 +1,57 @@ +- name: biscuit biscuitblaster test_biscuit_blaster_single + command: nextflow run tests/modules/biscuit/biscuitblaster -entry test_biscuit_blaster_single -c tests/config/nextflow.config + tags: + - biscuit/biscuitblaster + - biscuit + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bam + md5sum: 9ece50b67349382d38b20c2702e65675 + - path: output/biscuit/test.bam.bai + md5sum: 8f14bb42fd38cc7ce4a3c3a9d7133ea4 + - path: output/biscuit/versions.yml + md5sum: bfb660b5b0d92dde6817a1c6a2a302bb + +- name: biscuit biscuitblaster test_biscuit_blaster_paired + command: nextflow run tests/modules/biscuit/biscuitblaster -entry test_biscuit_blaster_paired -c tests/config/nextflow.config + tags: + - biscuit/biscuitblaster + - biscuit + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bam + md5sum: 0c6de35f38003df6ea5dd036170df91b + - path: output/biscuit/test.bam.bai + md5sum: 0d76977b2e36046cc176112776c5fa4e + - path: output/biscuit/versions.yml + md5sum: 82160a7ad29ccc3a21e59b1869399c04 diff --git a/tests/modules/biscuit/bsconv/main.nf b/tests/modules/biscuit/bsconv/main.nf new file mode 100644 index 00000000..f7338869 --- /dev/null +++ b/tests/modules/biscuit/bsconv/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_BSCONV } from '../../../../modules/biscuit/bsconv/main.nf' + +workflow test_biscuit_bsconv { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_BSCONV ( input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/bsconv/nextflow.config b/tests/modules/biscuit/bsconv/nextflow.config new file mode 100644 index 00000000..133905d0 --- /dev/null +++ b/tests/modules/biscuit/bsconv/nextflow.config @@ -0,0 +1,10 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: '.*BISCUIT_BSCONV' { + ext.args = '-f 0.1' + } + +} + diff --git a/tests/modules/biscuit/bsconv/test.yml b/tests/modules/biscuit/bsconv/test.yml new file mode 100644 index 00000000..528a4fe5 --- /dev/null +++ b/tests/modules/biscuit/bsconv/test.yml @@ -0,0 +1,26 @@ +- name: biscuit bsconv test_biscuit_bsconv + command: nextflow run tests/modules/biscuit/bsconv -entry test_biscuit_bsconv -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/bsconv + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bam + md5sum: e33e9498d00dd32222b90a6bd981226f + - path: output/biscuit/versions.yml + md5sum: 7deec1f096203542bbb72ac4fa05f9ba diff --git a/tests/modules/biscuit/epiread/main.nf b/tests/modules/biscuit/epiread/main.nf new file mode 100644 index 00000000..54a73ae3 --- /dev/null +++ b/tests/modules/biscuit/epiread/main.nf @@ -0,0 +1,48 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_EPIREAD } from '../../../../modules/biscuit/epiread/main.nf' + +workflow test_biscuit_epiread_nosnp { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true), + [] //SNP BED file + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_EPIREAD ( input, BISCUIT_INDEX.out.index ) +} + +workflow test_biscuit_epiread_snp { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/biscuit/test-snp.bed') + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_EPIREAD ( input, BISCUIT_INDEX.out.index ) +} + +workflow test_biscuit_epiread_snp_decompress { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/biscuit/test-snp.bed.gz') + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_EPIREAD ( input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/epiread/nextflow.config b/tests/modules/biscuit/epiread/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/epiread/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/epiread/test.yml b/tests/modules/biscuit/epiread/test.yml new file mode 100644 index 00000000..1db86982 --- /dev/null +++ b/tests/modules/biscuit/epiread/test.yml @@ -0,0 +1,80 @@ +- name: biscuit epiread test_biscuit_epiread_nosnp + command: nextflow run tests/modules/biscuit/epiread -entry test_biscuit_epiread_nosnp -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/epiread + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bed.gz + md5sum: dbb30b59f4ef6fdfdee38630225c0574 + - path: output/biscuit/versions.yml + md5sum: 674a77ac5ca8f4b42d30e58e30c3a9af + +- name: biscuit epiread test_biscuit_epiread_snp + command: nextflow run tests/modules/biscuit/epiread -entry test_biscuit_epiread_snp -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/epiread + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bed.gz + md5sum: a29fea6ad74453ec94f8220747dab906 + - path: output/biscuit/versions.yml + md5sum: f2f7c4ff3c6a135b1c8a3aff24a44d81 + +- name: biscuit epiread test_biscuit_epiread_snp_decompress + command: nextflow run tests/modules/biscuit/epiread -entry test_biscuit_epiread_snp_decompress -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/epiread + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bed.gz + md5sum: a29fea6ad74453ec94f8220747dab906 + - path: output/biscuit/versions.yml + md5sum: cb0258ebf4e1a731a4310ec17c3dc442 diff --git a/tests/modules/biscuit/index/main.nf b/tests/modules/biscuit/index/main.nf new file mode 100644 index 00000000..c13d441b --- /dev/null +++ b/tests/modules/biscuit/index/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' + +workflow test_biscuit_index { + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) +} diff --git a/tests/modules/biscuit/index/nextflow.config b/tests/modules/biscuit/index/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/index/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/index/test.yml b/tests/modules/biscuit/index/test.yml new file mode 100644 index 00000000..a2e4cb67 --- /dev/null +++ b/tests/modules/biscuit/index/test.yml @@ -0,0 +1,24 @@ +- name: biscuit index test_biscuit_index + command: nextflow run tests/modules/biscuit/index -entry test_biscuit_index -c tests/config/nextflow.config + tags: + - biscuit/index + - biscuit + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/versions.yml + md5sum: 5c5873e482a57966db246648ffddf62f diff --git a/tests/modules/biscuit/mergecg/main.nf b/tests/modules/biscuit/mergecg/main.nf new file mode 100644 index 00000000..7d51f3b8 --- /dev/null +++ b/tests/modules/biscuit/mergecg/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_MERGECG } from '../../../../modules/biscuit/mergecg/main.nf' + +workflow test_biscuit_mergecg { + + input = [ + [ id:'test', single_end:false ], // meta map + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/biscuit/test-cg.bed.gz', checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_MERGECG ( input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/mergecg/nextflow.config b/tests/modules/biscuit/mergecg/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/mergecg/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/mergecg/test.yml b/tests/modules/biscuit/mergecg/test.yml new file mode 100644 index 00000000..7b2408bb --- /dev/null +++ b/tests/modules/biscuit/mergecg/test.yml @@ -0,0 +1,26 @@ +- name: biscuit mergecg test_biscuit_mergecg + command: nextflow run tests/modules/biscuit/mergecg -entry test_biscuit_mergecg -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/mergecg + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test.bed.gz + md5sum: d693b28ddc81265f388860d391fc7c5b + - path: output/biscuit/versions.yml + md5sum: f670d63671af06bf8654677bf373b3a1 diff --git a/tests/modules/biscuit/pileup/main.nf b/tests/modules/biscuit/pileup/main.nf new file mode 100644 index 00000000..cf1914ec --- /dev/null +++ b/tests/modules/biscuit/pileup/main.nf @@ -0,0 +1,38 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_PILEUP } from '../../../../modules/biscuit/pileup/main.nf' + +workflow test_biscuit_pileup { + + input = [ [ id:'test' ], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)], + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true)], + [], //tumor bam + [] //tumor bai + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_PILEUP ( input, BISCUIT_INDEX.out.index ) + +} + +workflow test_biscuit_pileup_somatic { + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX ( fasta ) + BISCUIT_PILEUP ( input, BISCUIT_INDEX.out.index ) + +} diff --git a/tests/modules/biscuit/pileup/nextflow.config b/tests/modules/biscuit/pileup/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/pileup/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/pileup/test.yml b/tests/modules/biscuit/pileup/test.yml new file mode 100644 index 00000000..ad840737 --- /dev/null +++ b/tests/modules/biscuit/pileup/test.yml @@ -0,0 +1,53 @@ +- name: biscuit pileup test_biscuit_pileup + command: nextflow run tests/modules/biscuit/pileup -entry test_biscuit_pileup -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/pileup + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: f315020d899597c1b57e5fe9f60f4c3e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 1891c1de381b3a96d4e72f590fde20c1 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: 2df4aa2d7580639fa0fcdbcad5e2e969 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 8569fbdb2c98c6fb16dfa73d8eacb070 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: 668799eea40aefb8013cbf8ed6c47cfe + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 10541b05bbea44d0344b0345a6522ba8 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 2c38edd64234420add133f5fe1ff975d + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 7deee1aac3395d93bef1df11ab38379e + - path: output/biscuit/test.vcf.gz + md5sum: ef9798c318ead0f8a79ee7fdeb1ffbf9 + - path: output/biscuit/versions.yml + md5sum: ae38b891fdbf9f7ff5c486408f949dc5 + +- name: biscuit pileup test_biscuit_pileup_somatic + command: nextflow run tests/modules/biscuit/pileup -entry test_biscuit_pileup_somatic -c tests/config/nextflow.config + tags: + - biscuit + - biscuit/pileup + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: f315020d899597c1b57e5fe9f60f4c3e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 1891c1de381b3a96d4e72f590fde20c1 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: 2df4aa2d7580639fa0fcdbcad5e2e969 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 8569fbdb2c98c6fb16dfa73d8eacb070 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: 668799eea40aefb8013cbf8ed6c47cfe + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 10541b05bbea44d0344b0345a6522ba8 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 2c38edd64234420add133f5fe1ff975d + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 7deee1aac3395d93bef1df11ab38379e + - path: output/biscuit/test.vcf.gz + md5sum: 692b4a6191b08fabe5efa5abe00da420 + - path: output/biscuit/versions.yml + md5sum: cc51fd498d67fdc7cc067686eb855b93 diff --git a/tests/modules/biscuit/qc/main.nf b/tests/modules/biscuit/qc/main.nf new file mode 100644 index 00000000..7c6d61cd --- /dev/null +++ b/tests/modules/biscuit/qc/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_INDEX } from '../../../../modules/biscuit/index/main.nf' +include { BISCUIT_QC } from '../../../../modules/biscuit/qc/main.nf' + +workflow test_biscuit_qc { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BISCUIT_INDEX( fasta ) + BISCUIT_QC ( input, BISCUIT_INDEX.out.index ) +} diff --git a/tests/modules/biscuit/qc/nextflow.config b/tests/modules/biscuit/qc/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/qc/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/qc/test.yml b/tests/modules/biscuit/qc/test.yml new file mode 100644 index 00000000..ed33dd30 --- /dev/null +++ b/tests/modules/biscuit/qc/test.yml @@ -0,0 +1,38 @@ +- name: biscuit qc test_biscuit_qc + command: nextflow run tests/modules/biscuit/qc -entry test_biscuit_qc -c tests/config/nextflow.config + tags: + - biscuit/qc + - biscuit + files: + - path: output/biscuit/BiscuitIndex/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: output/biscuit/BiscuitIndex/genome.fasta.bis.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.bwt + md5sum: a11bc31775f7b7a4f9cd3bc4f981661a + - path: output/biscuit/BiscuitIndex/genome.fasta.dau.sa + md5sum: 9c9e07fa1c75ef32d764274579c89b08 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.bwt + md5sum: 62eb83cd557a47b59589713d98024fc2 + - path: output/biscuit/BiscuitIndex/genome.fasta.par.sa + md5sum: 55bcd97d7059bf73dc0d221e36e8e901 + - path: output/biscuit/test_CpGRetentionByReadPos.txt + md5sum: 498b6c0af196fb34c8835371b9e9b68a + - path: output/biscuit/test_CpHRetentionByReadPos.txt + md5sum: a266942c5719cecab7f60f63cbe7335d + - path: output/biscuit/test_dup_report.txt + md5sum: 65bddf4fbe9e40d7c6c976060df53e3b + - path: output/biscuit/test_isize_table.txt + md5sum: aadf6f2e271abc334b6146cf164bdda3 + - path: output/biscuit/test_mapq_table.txt + md5sum: c8adaac84bb8db3b7f48e1ed4fccad00 + - path: output/biscuit/test_strand_table.txt + md5sum: 27068382ba6b2dbf313169a85c9dbb3a + - path: output/biscuit/test_totalReadConversionRate.txt + md5sum: 8f0c1fceaebfa74f2757720e3bc85fed + - path: output/biscuit/versions.yml + md5sum: a730fa4888e6882cf1b8ba92645b04ee diff --git a/tests/modules/biscuit/vcf2bed/main.nf b/tests/modules/biscuit/vcf2bed/main.nf new file mode 100644 index 00000000..25597d49 --- /dev/null +++ b/tests/modules/biscuit/vcf2bed/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BISCUIT_VCF2BED } from '../../../../modules/biscuit/vcf2bed/main.nf' + +workflow test_biscuit_vcf2bed { + + input = [ + [ id:'test', single_end:false ], // meta map + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/biscuit/test.vcf.gz', checkIfExists: true) + ] + + BISCUIT_VCF2BED ( input ) + +} diff --git a/tests/modules/biscuit/vcf2bed/nextflow.config b/tests/modules/biscuit/vcf2bed/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/biscuit/vcf2bed/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/biscuit/vcf2bed/test.yml b/tests/modules/biscuit/vcf2bed/test.yml new file mode 100644 index 00000000..7eaa2972 --- /dev/null +++ b/tests/modules/biscuit/vcf2bed/test.yml @@ -0,0 +1,10 @@ +- name: biscuit vcf2bed test_biscuit_vcf2bed + command: nextflow run tests/modules/biscuit/vcf2bed -entry test_biscuit_vcf2bed -c tests/config/nextflow.config + tags: + - biscuit/vcf2bed + - biscuit + files: + - path: output/biscuit/test.bed.gz + md5sum: e2dd492289dc8463f364285e31b9553a + - path: output/biscuit/versions.yml + md5sum: cd784276e2fb6739d55e1b60d12202cd diff --git a/tests/modules/bowtie2/align/main.nf b/tests/modules/bowtie2/align/main.nf index 2d3945e5..4f08b533 100644 --- a/tests/modules/bowtie2/align/main.nf +++ b/tests/modules/bowtie2/align/main.nf @@ -14,9 +14,25 @@ workflow test_bowtie2_align_single_end { ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) save_unaligned = false + sort = false BOWTIE2_BUILD ( fasta ) - BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) +} + +workflow test_bowtie2_align_single_end_sorted { + input = [ + [ id:'test', single_end:true ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false + sort = true + + BOWTIE2_BUILD ( fasta ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) } workflow test_bowtie2_align_paired_end { @@ -29,7 +45,55 @@ workflow test_bowtie2_align_paired_end { ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) save_unaligned = false + sort = false BOWTIE2_BUILD ( fasta ) - BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) +} + +workflow test_bowtie2_align_paired_end_sorted { + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false + sort = true + + BOWTIE2_BUILD ( fasta ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) +} + +workflow test_bowtie2_align_single_end_large_index { + input = [ + [ id:'test', single_end:true ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false + sort = false + + BOWTIE2_BUILD ( fasta ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) +} + +workflow test_bowtie2_align_paired_end_large_index { + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false + sort = false + + BOWTIE2_BUILD ( fasta ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned, sort ) } diff --git a/tests/modules/bowtie2/align/nextflow.config b/tests/modules/bowtie2/align/nextflow.config index 8730f1c4..08f7bed0 100644 --- a/tests/modules/bowtie2/align/nextflow.config +++ b/tests/modules/bowtie2/align/nextflow.config @@ -1,5 +1,17 @@ +params { + force_large_index = false +} + process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } + +if (params.force_large_index) { + process { + withName: BOWTIE2_BUILD { + ext.args = '--large-index' + } + } +} diff --git a/tests/modules/bowtie2/align/test.yml b/tests/modules/bowtie2/align/test.yml index 95d48b88..9c9ff7a1 100644 --- a/tests/modules/bowtie2/align/test.yml +++ b/tests/modules/bowtie2/align/test.yml @@ -1,4 +1,4 @@ -- name: bowtie2 align single-end +- name: bowtie2 align test_bowtie2_align_single_end command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config tags: - bowtie2 @@ -6,36 +6,44 @@ files: - path: ./output/bowtie2/test.bam - path: ./output/bowtie2/test.bowtie2.log - - path: ./output/bowtie2/bowtie2/genome.3.bt2 - md5sum: 4ed93abba181d8dfab2e303e33114777 - - path: ./output/bowtie2/bowtie2/genome.2.bt2 - md5sum: 47b153cd1319abc88dda532462651fcf - - path: ./output/bowtie2/bowtie2/genome.1.bt2 - md5sum: cbe3d0bbea55bc57c99b4bfa25b5fbdf - - path: ./output/bowtie2/bowtie2/genome.4.bt2 - md5sum: c25be5f8b0378abf7a58c8a880b87626 - - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2 - md5sum: 52be6950579598a990570fbcf5372184 - - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 - md5sum: e3b4ef343dea4dd571642010a7d09597 + - path: ./output/bowtie2/versions.yml -- name: bowtie2 align paired-end - command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config +- name: bowtie2 align test_bowtie2_align_single_end_sorted + command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_single_end_sorted -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config tags: - bowtie2 - bowtie2/align files: - path: ./output/bowtie2/test.bam - path: ./output/bowtie2/test.bowtie2.log - - path: ./output/bowtie2/bowtie2/genome.3.bt2 - md5sum: 4ed93abba181d8dfab2e303e33114777 - - path: ./output/bowtie2/bowtie2/genome.2.bt2 - md5sum: 47b153cd1319abc88dda532462651fcf - - path: ./output/bowtie2/bowtie2/genome.1.bt2 - md5sum: cbe3d0bbea55bc57c99b4bfa25b5fbdf - - path: ./output/bowtie2/bowtie2/genome.4.bt2 - md5sum: c25be5f8b0378abf7a58c8a880b87626 - - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2 - md5sum: 52be6950579598a990570fbcf5372184 - - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 - md5sum: e3b4ef343dea4dd571642010a7d09597 + - path: ./output/bowtie2/versions.yml + +- name: bowtie2 align test_bowtie2_align_paired_end + command: nextflow run tests/modules/bowtie2/align -entry test_bowtie2_align_paired_end -c tests/config/nextflow.config -c tests/modules/bowtie2/align/nextflow.config + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/versions.yml + +- name: bowtie2 align test_bowtie2_align_single_end_large_index + command: nextflow run tests/modules/bowtie2/align -entry test_bowtie2_align_single_end_large_index -c tests/config/nextflow.config -c tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/versions.yml + +- name: bowtie2 align test_bowtie2_align_paired_end_large_index + command: nextflow run tests/modules/bowtie2/align -entry test_bowtie2_align_paired_end_large_index -c tests/config/nextflow.config -c tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/versions.yml diff --git a/tests/modules/bracken/bracken/main.nf b/tests/modules/bracken/bracken/main.nf new file mode 100644 index 00000000..f882439b --- /dev/null +++ b/tests/modules/bracken/bracken/main.nf @@ -0,0 +1,57 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { KRAKEN2_KRAKEN2 } from '../../../../modules/kraken2/kraken2/main.nf' +include { BRACKEN_BRACKEN } from '../../../../modules/bracken/bracken/main.nf' + +workflow test_bracken_bracken_single_end_default_args { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = file(params.test_data['sarscov2']['genome']['kraken2_bracken_tar_gz'], checkIfExists: true) + + ch_db = UNTAR ( [[:], db] ).untar + .map { it[1] } + KRAKEN2_KRAKEN2 ( input, ch_db ) + BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db ) +} + +workflow test_bracken_bracken_single_end_custom_args { + input = [ [ id:'test', single_end:true, threshold:0, taxonomic_level:'G', read_length:100 ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = file(params.test_data['sarscov2']['genome']['kraken2_bracken_tar_gz'], checkIfExists: true) + + ch_db = UNTAR ( [[:], db] ).untar + .map { it[1] } + KRAKEN2_KRAKEN2 ( input, ch_db ) + BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db ) +} + +workflow test_bracken_bracken_paired_end_default_args { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + db = file(params.test_data['sarscov2']['genome']['kraken2_bracken_tar_gz'], checkIfExists: true) + + ch_db = UNTAR ( [[:], db] ).untar + .map { it[1] } + KRAKEN2_KRAKEN2 ( input, ch_db ) + BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db ) +} + +workflow test_bracken_bracken_paired_end_custom_args { + input = [ [ id:'test', single_end:false, threshold:0, taxonomic_level:'G', read_length:100 ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + db = file(params.test_data['sarscov2']['genome']['kraken2_bracken_tar_gz'], checkIfExists: true) + + ch_db = UNTAR ( [[:], db] ).untar + .map { it[1] } + KRAKEN2_KRAKEN2 ( input, ch_db ) + BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db ) +} diff --git a/tests/modules/bracken/bracken/nextflow.config b/tests/modules/bracken/bracken/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/bracken/bracken/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/bracken/bracken/test.yml b/tests/modules/bracken/bracken/test.yml new file mode 100644 index 00000000..4c87cda7 --- /dev/null +++ b/tests/modules/bracken/bracken/test.yml @@ -0,0 +1,43 @@ +- name: bracken bracken test_bracken_bracken_single_end_default_args + command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_single_end_default_args -c tests/config/nextflow.config + tags: + - bracken/bracken + - bracken + files: + - path: output/bracken/test_S.tsv + md5sum: 4a21ae14ff8a0311d55f139af5247838 + - path: output/bracken/versions.yml + md5sum: ab8b1550f84a99bae80f050fe718abd0 + +- name: bracken bracken test_bracken_bracken_single_end_custom_args + command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_single_end_custom_args -c tests/config/nextflow.config + tags: + - bracken/bracken + - bracken + files: + - path: output/bracken/test_G.tsv + md5sum: f609b09d6edb5ebc1ea1435d1dd46cde + - path: output/bracken/versions.yml + md5sum: af87e8d4c42fbcb0469ab13912b8a9bd + +- name: bracken bracken test_bracken_bracken_paired_end_default_args + command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_paired_end_default_args -c tests/config/nextflow.config + tags: + - bracken/bracken + - bracken + files: + - path: output/bracken/test_S.tsv + md5sum: 4a21ae14ff8a0311d55f139af5247838 + - path: output/bracken/versions.yml + md5sum: 4602111eb25bd19a7f9d725acc5921f6 + +- name: bracken bracken test_bracken_bracken_paired_end_custom_args + command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_paired_end_custom_args -c tests/config/nextflow.config + tags: + - bracken/bracken + - bracken + files: + - path: output/bracken/test_G.tsv + md5sum: f609b09d6edb5ebc1ea1435d1dd46cde + - path: output/bracken/versions.yml + md5sum: d4618b01df5ac09cc366fe2ae7c13f06 diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf new file mode 100644 index 00000000..598e148a --- /dev/null +++ b/tests/modules/busco/main.nf @@ -0,0 +1,404 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BUSCO } from '../../../modules/busco/main.nf' + +workflow test_busco_genome_single_fasta { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + ['bacteria_odb10', 'bacteroidetes_odb10'], // Launch with 'auto' to use --auto-lineage, and specified lineages // 'auto' removed from test due to memory issues + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpyz_hi62i/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/versions.yml + + Former Output tree -w 'auto': + /tmp/tmp846crjv2/busco/ + ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json + ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidales_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.json + ├── short_summary.specific.bacteroidales_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-auto-busco -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/ + │ ├── genome.fna/ + │ │ ├── auto_lineage/ + │ │ │ ├── run_archaea_odb10/ + │ │ │ ├── run_bacteria_odb10/ + │ │ │ └── run_eukaryota_odb10/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ ├── metaeuk_out.log + │ │ │ ├── prodigal_err.log + │ │ │ ├── prodigal_out.log + │ │ │ ├── sepp_err.log + │ │ │ └── sepp_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10 -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/genome.fna/auto_lineage/run_bacteria_odb10/ [recursive, not followed] + │ │ └── run_bacteroidales_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-auto-busco.batch_summary.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco.batch_summary.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/versions.yml + */ + +} + +workflow test_busco_genome_multi_fasta { + + input = [ + [ id:'test' ], // meta map + [ + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) + ] + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpk19byek7/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fasta.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.json + ├── short_summary.specific.bacteria_odb10.genome.fasta.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/versions.yml + */ + +} + +workflow test_busco_eukaryote_metaeuk { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpeq4dsir5/busco/ + ├── short_summary.specific.eukaryota_odb10.genome.fasta.json -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.json + ├── short_summary.specific.eukaryota_odb10.genome.fasta.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.txt + ├── test-eukaryota_odb10-busco -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ └── metaeuk_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── metaeuk_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/versions.yml + */ + +} + +workflow test_busco_eukaryote_augustus { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp2xqaygjj/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── blast_db/ + │ │ │ ├── genome.fasta.ndb + │ │ │ ├── genome.fasta.nhr + │ │ │ ├── genome.fasta.nin + │ │ │ ├── genome.fasta.not + │ │ │ ├── genome.fasta.nsq + │ │ │ ├── genome.fasta.ntf + │ │ │ └── genome.fasta.nto + │ │ ├── logs/ + │ │ │ ├── makeblastdb_err.log + │ │ │ ├── makeblastdb_out.log + │ │ │ ├── tblastn_err.log + │ │ │ └── tblastn_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── augustus_output/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ └── hmmer_output/ + │ └── logs/ + │ └── busco.log + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/versions.yml + */ + +} + +workflow test_busco_protein { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpzwd5dn56/busco/ + ├── short_summary.specific.bacteria_odb10.proteome.fasta.json -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.json + ├── short_summary.specific.bacteria_odb10.proteome.fasta.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco/ + │ ├── logs/ + │ │ └── busco.log + │ └── proteome.fasta/ + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ └── hmmsearch_out.log + │ └── run_bacteria_odb10/ + │ ├── busco_sequences/ + │ ├── full_table.tsv + │ ├── hmmer_output/ + │ ├── missing_busco_list.tsv + │ ├── short_summary.json + │ └── short_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/versions.yml + */ +} +workflow test_busco_transcriptome { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpitjyvo9g/busco/ + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + ├── test-bacteria_odb10-busco -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco/ + │ ├── logs/ + │ │ └── busco.log + │ └── test1.contigs.fa/ + │ ├── blast_db/ + │ │ ├── test1.contigs.fa.ndb + │ │ ├── test1.contigs.fa.nhr + │ │ ├── test1.contigs.fa.nin + │ │ ├── test1.contigs.fa.not + │ │ ├── test1.contigs.fa.nsq + │ │ ├── test1.contigs.fa.ntf + │ │ └── test1.contigs.fa.nto + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ ├── hmmsearch_out.log + │ │ ├── makeblastdb_err.log + │ │ ├── makeblastdb_out.log + │ │ ├── tblastn_err.log + │ │ └── tblastn_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ ├── short_summary.txt + │ │ └── single_copy_proteins.faa + │ └── translated_proteins/ + │ ├── 1024388at2.faa + │ ├── 1054741at2.faa + │ ├── 1093223at2.faa + │ ├── 1151822at2.faa + │ ├── 143460at2.faa + │ ├── 1491686at2.faa + │ ├── 1504821at2.faa + │ ├── 1574817at2.faa + │ ├── 1592033at2.faa + │ ├── 1623045at2.faa + │ ├── 1661836at2.faa + │ ├── 1674344at2.faa + │ ├── 1698718at2.faa + │ ├── 1990650at2.faa + │ ├── 223233at2.faa + │ ├── 402899at2.faa + │ ├── 505485at2.faa + │ ├── 665824at2.faa + │ ├── 776861at2.faa + │ ├── 874197at2.faa + │ ├── 932854at2.faa + │ └── 95696at2.faa + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/versions.yml + */ + +} diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config new file mode 100644 index 00000000..9e8f718f --- /dev/null +++ b/tests/modules/busco/nextflow.config @@ -0,0 +1,28 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: 'test_busco_genome_single_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_genome_multi_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_metaeuk:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_augustus:BUSCO' { + ext.args = '--mode genome --augustus' + } + + withName: 'test_busco_protein:BUSCO' { + ext.args = '--mode proteins' + } + + withName: 'test_busco_transcriptome:BUSCO'{ + ext.args = '--mode transcriptome' + } +} diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml new file mode 100644 index 00000000..43b810ba --- /dev/null +++ b/tests/modules/busco/test.yml @@ -0,0 +1,159 @@ +- name: busco test_busco_genome_single_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: e50690742e9ae6abdd2bf99334ff9e12 + - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt + md5sum: 4c1b2c4317c88398eddc30877ed740d9 + - path: output/busco/versions.yml + md5sum: 8aa830f71587d859df35c6cfab59f35d + +- name: busco test_busco_genome_multi_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 5360dfe83bec1f5741ee115e53e6b517 + - path: output/busco/versions.yml + md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 + +- name: busco test_busco_eukaryote_metaeuk + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: a70806f99ba5706d7353d3353b3f1d2b + - path: output/busco/versions.yml + md5sum: 34a808c257e6db1b0456f3b4372bc477 + +- name: busco test_busco_eukaryote_augustus + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: 660393dd43cd6a093b952d4b8ad41e40 + - path: output/busco/versions.yml + md5sum: 2caac915461410b16a1524ac064cd0df + +- name: busco test_busco_protein + command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f + - path: output/busco/versions.yml + md5sum: d7392261a57960a7e6aea609dce824f5 + +- name: busco test_busco_transcriptome + command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 9a176cafe66ac0adca89dc34ad2be13f + - path: output/busco/versions.yml + md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 diff --git a/tests/modules/bwa/sampe/test.yml b/tests/modules/bwa/sampe/test.yml index fb6d7708..c3eb42f8 100644 --- a/tests/modules/bwa/sampe/test.yml +++ b/tests/modules/bwa/sampe/test.yml @@ -5,4 +5,4 @@ - bwa/sampe files: - path: output/bwa/test.bam - md5sum: f6ad85d66d44c5d26e692109d2e34100 + md5sum: 67528d633a1a78e3d0e8d1486c1a960a diff --git a/tests/modules/bwa/samse/test.yml b/tests/modules/bwa/samse/test.yml index 5a2fe1e3..3af39258 100644 --- a/tests/modules/bwa/samse/test.yml +++ b/tests/modules/bwa/samse/test.yml @@ -5,4 +5,4 @@ - bwa/samse files: - path: output/bwa/test.bam - md5sum: 27eb91146e45dee65664c18596be4262 + md5sum: 9a0ca9678a03e6fa4bda459c04c99bd6 diff --git a/tests/modules/bwameth/align/test.yml b/tests/modules/bwameth/align/test.yml index f921b5f4..161c627f 100644 --- a/tests/modules/bwameth/align/test.yml +++ b/tests/modules/bwameth/align/test.yml @@ -13,4 +13,3 @@ - bwameth/align files: - path: output/bwameth/test.bam - diff --git a/tests/modules/cat/cat/main.nf b/tests/modules/cat/cat/main.nf index 1fd56851..24e1d00d 100644 --- a/tests/modules/cat/cat/main.nf +++ b/tests/modules/cat/cat/main.nf @@ -2,53 +2,60 @@ nextflow.enable.dsl = 2 -include { CAT_CAT } from '../../../../modules/cat/cat/main.nf' +include { CAT_CAT } from '../../../../modules/cat/cat/main.nf' +include { CAT_CAT as CAT_UNZIPPED_ZIPPED } from '../../../../modules/cat/cat/main.nf' +include { CAT_CAT as CAT_ZIPPED_UNZIPPED } from '../../../../modules/cat/cat/main.nf' workflow test_cat_unzipped_unzipped { input = [ - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true) + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true) ] ] - CAT_CAT ( input, 'cat.txt' ) + CAT_CAT ( input ) } workflow test_cat_zipped_zipped { input = [ - file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true) + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true)] ] - CAT_CAT ( input, 'cat.txt.gz' ) + CAT_CAT ( input ) } workflow test_cat_zipped_unzipped { input = [ - file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true) + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['contigs_genome_maf_gz'], checkIfExists: true)] ] - CAT_CAT ( input, 'cat.txt' ) + CAT_ZIPPED_UNZIPPED ( input ) } workflow test_cat_unzipped_zipped { input = [ - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true) + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)] ] - CAT_CAT ( input, 'cat.txt.gz' ) + CAT_UNZIPPED_ZIPPED ( input ) } workflow test_cat_one_file_unzipped_zipped { input = [ - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - CAT_CAT ( input, 'cat.txt.gz' ) + CAT_UNZIPPED_ZIPPED ( input ) } diff --git a/tests/modules/cat/cat/nextflow.config b/tests/modules/cat/cat/nextflow.config index 8730f1c4..b0077a9c 100644 --- a/tests/modules/cat/cat/nextflow.config +++ b/tests/modules/cat/cat/nextflow.config @@ -2,4 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CAT_UNZIPPED_ZIPPED { + ext.prefix = 'cat.txt.gz' + } + + withName: CAT_ZIPPED_UNZIPPED { + ext.prefix = 'cat.txt' + } } + diff --git a/tests/modules/cat/cat/test.yml b/tests/modules/cat/cat/test.yml index 1244d8d2..9710b665 100644 --- a/tests/modules/cat/cat/test.yml +++ b/tests/modules/cat/cat/test.yml @@ -4,16 +4,32 @@ - cat - cat/cat files: - - path: output/cat/cat.txt + - path: output/cat/test.fasta md5sum: f44b33a0e441ad58b2d3700270e2dbe2 +- name: cat unzipped unzipped stub + command: nextflow run ./tests/modules/cat/cat -entry test_cat_unzipped_unzipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config -stub-run + tags: + - cat + - cat/cat + files: + - path: output/cat/test.fasta + - name: cat zipped zipped command: nextflow run ./tests/modules/cat/cat -entry test_cat_zipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config tags: - cat - cat/cat files: - - path: output/cat/cat.txt.gz + - path: output/cat/test.gz + +- name: cat zipped zipped stub + command: nextflow run ./tests/modules/cat/cat -entry test_cat_zipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config -stub-run + tags: + - cat + - cat/cat + files: + - path: output/cat/test.gz - name: cat zipped unzipped command: nextflow run ./tests/modules/cat/cat -entry test_cat_zipped_unzipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config @@ -24,6 +40,14 @@ - path: output/cat/cat.txt md5sum: c439d3b60e7bc03e8802a451a0d9a5d9 +- name: cat zipped unzipped stub + command: nextflow run ./tests/modules/cat/cat -entry test_cat_zipped_unzipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config -stub-run + tags: + - cat + - cat/cat + files: + - path: output/cat/cat.txt + - name: cat unzipped zipped command: nextflow run ./tests/modules/cat/cat -entry test_cat_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config tags: @@ -32,6 +56,14 @@ files: - path: output/cat/cat.txt.gz +- name: cat unzipped zipped stub + command: nextflow run ./tests/modules/cat/cat -entry test_cat_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config -stub-run + tags: + - cat + - cat/cat + files: + - path: output/cat/cat.txt.gz + - name: cat one file unzipped zipped command: nextflow run ./tests/modules/cat/cat -entry test_cat_one_file_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config tags: @@ -39,3 +71,11 @@ - cat/cat files: - path: output/cat/cat.txt.gz + +- name: cat one file unzipped zipped stub + command: nextflow run ./tests/modules/cat/cat -entry test_cat_one_file_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config -stub-run + tags: + - cat + - cat/cat + files: + - path: output/cat/cat.txt.gz diff --git a/tests/modules/cellranger/mkfastq/main.nf b/tests/modules/cellranger/mkfastq/main.nf index 5e594fd1..7bad0fec 100644 --- a/tests/modules/cellranger/mkfastq/main.nf +++ b/tests/modules/cellranger/mkfastq/main.nf @@ -8,19 +8,19 @@ include { CELLRANGER_MKFASTQ } from '../../../../modules/cellranger/mkfastq/main workflow test_cellranger_mkfastq_simple { simple_csv = file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-simple-1.2.0.csv", checkIfExists: true) - tiny_bcl = file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-1.2.0.tar.gz", checkIfExists: true) + tiny_bcl = [ [], file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-1.2.0.tar.gz", checkIfExists: true) ] UNTAR ( tiny_bcl ) - CELLRANGER_MKFASTQ ( UNTAR.out.untar, simple_csv) + CELLRANGER_MKFASTQ ( UNTAR.out.untar.map{ it[1] }, simple_csv) } workflow test_cellranger_mkfastq_illumina { samplesheet_csv = file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-samplesheet-1.2.0.csv", checkIfExists: true) - tiny_bcl = file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-1.2.0.tar.gz", checkIfExists: true) + tiny_bcl = [ [], file("https://cf.10xgenomics.com/supp/cell-exp/cellranger-tiny-bcl-1.2.0.tar.gz", checkIfExists: true) ] UNTAR ( tiny_bcl ) - CELLRANGER_MKFASTQ ( UNTAR.out.untar, samplesheet_csv) + CELLRANGER_MKFASTQ ( UNTAR.out.untar.map{ it[1] }, samplesheet_csv) } diff --git a/tests/modules/centrifuge/centrifuge/main.nf b/tests/modules/centrifuge/centrifuge/main.nf new file mode 100644 index 00000000..35deeb58 --- /dev/null +++ b/tests/modules/centrifuge/centrifuge/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { CENTRIFUGE_CENTRIFUGE } from '../../../../modules/centrifuge/centrifuge/main.nf' + +workflow test_centrifuge_centrifuge_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ] + save_unaligned = true + save_aligned = false + sam_format = false + + UNTAR ( db ) + CENTRIFUGE_CENTRIFUGE ( input, UNTAR.out.untar.map{ it[1] }, save_unaligned, save_aligned, sam_format ) + +} + +workflow test_centrifuge_centrifuge_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ] + save_unaligned = true + save_aligned = false + sam_format = false + + UNTAR ( db ) + CENTRIFUGE_CENTRIFUGE ( input, UNTAR.out.untar.map{ it[1] }, save_unaligned, save_aligned, sam_format ) + + +} diff --git a/tests/modules/centrifuge/centrifuge/nextflow.config b/tests/modules/centrifuge/centrifuge/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/centrifuge/centrifuge/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/centrifuge/centrifuge/test.yml b/tests/modules/centrifuge/centrifuge/test.yml new file mode 100644 index 00000000..641ca7ef --- /dev/null +++ b/tests/modules/centrifuge/centrifuge/test.yml @@ -0,0 +1,22 @@ +- name: centrifuge centrifuge test_centrifuge_centrifuge_single_end + command: nextflow run tests/modules/centrifuge/centrifuge -entry test_centrifuge_centrifuge_single_end -c tests/config/nextflow.config + tags: + - centrifuge + - centrifuge/centrifuge + files: + - path: output/centrifuge/test.report.txt + - path: output/centrifuge/test.results.txt + - path: output/centrifuge/test.unmapped.fastq.gz + - path: output/centrifuge/versions.yml + +- name: centrifuge centrifuge test_centrifuge_centrifuge_paired_end + command: nextflow run tests/modules/centrifuge/centrifuge -entry test_centrifuge_centrifuge_paired_end -c tests/config/nextflow.config + tags: + - centrifuge + - centrifuge/centrifuge + files: + - path: output/centrifuge/test.report.txt + - path: output/centrifuge/test.results.txt + - path: output/centrifuge/test.unmapped.fastq.1.gz + - path: output/centrifuge/test.unmapped.fastq.2.gz + - path: output/centrifuge/versions.yml diff --git a/tests/modules/centrifuge/kreport/main.nf b/tests/modules/centrifuge/kreport/main.nf new file mode 100644 index 00000000..397d33aa --- /dev/null +++ b/tests/modules/centrifuge/kreport/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { CENTRIFUGE_CENTRIFUGE } from '../../../../modules/centrifuge/centrifuge/main.nf' +include { CENTRIFUGE_KREPORT } from '../../../../modules/centrifuge/kreport/main.nf' + +workflow test_centrifuge_kreport_single_end { + + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ] + + ch_db = UNTAR ( db ) + CENTRIFUGE_CENTRIFUGE ( input, ch_db.untar.map{ it[1] }, false, false, false ) + CENTRIFUGE_KREPORT ( CENTRIFUGE_CENTRIFUGE.out.results, ch_db.untar.map{ it[1] } ) +} + +workflow test_centrifuge_kreport_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ] + + ch_db = UNTAR ( db ) + CENTRIFUGE_CENTRIFUGE ( input, ch_db.untar.map{ it[1] }, false, false, false ) + CENTRIFUGE_KREPORT ( CENTRIFUGE_CENTRIFUGE.out.results, ch_db.untar.map{ it[1] } ) +} + diff --git a/tests/modules/centrifuge/kreport/nextflow.config b/tests/modules/centrifuge/kreport/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/centrifuge/kreport/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/centrifuge/kreport/test.yml b/tests/modules/centrifuge/kreport/test.yml new file mode 100644 index 00000000..167cb0dc --- /dev/null +++ b/tests/modules/centrifuge/kreport/test.yml @@ -0,0 +1,21 @@ +- name: centrifuge kreport test_centrifuge_kreport_single_end + command: nextflow run tests/modules/centrifuge/kreport -entry test_centrifuge_kreport_single_end -c tests/config/nextflow.config + tags: + - centrifuge + - centrifuge/kreport + files: + - path: output/centrifuge/test.txt + md5sum: af1a51fe57eb6d428350ff4a4bf759d4 + contains: ["unclassified"] + - path: output/centrifuge/versions.yml + +- name: centrifuge kreport test_centrifuge_kreport_paired_end + command: nextflow run tests/modules/centrifuge/kreport -entry test_centrifuge_kreport_paired_end -c tests/config/nextflow.config + tags: + - centrifuge + - centrifuge/kreport + files: + - path: output/centrifuge/test.txt + md5sum: af1a51fe57eb6d428350ff4a4bf759d4 + contains: ["unclassified"] + - path: output/centrifuge/versions.yml diff --git a/tests/modules/checkm/lineagewf/test.yml b/tests/modules/checkm/lineagewf/test.yml index 6749f6aa..f81e8c9c 100644 --- a/tests/modules/checkm/lineagewf/test.yml +++ b/tests/modules/checkm/lineagewf/test.yml @@ -32,4 +32,3 @@ - "contigs" - "UID1" - "genome" - diff --git a/tests/modules/chromap/chromap/test.yml b/tests/modules/chromap/chromap/test.yml index 09e5e753..d089922a 100644 --- a/tests/modules/chromap/chromap/test.yml +++ b/tests/modules/chromap/chromap/test.yml @@ -7,6 +7,7 @@ - path: output/chromap/genome.index - path: output/chromap/test.bed.gz md5sum: 25e40bde24c7b447292cd68573728694 + - path: output/chromap/versions.yml - name: chromap chromap test_chromap_chromap_paired_end command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config @@ -17,6 +18,7 @@ - path: output/chromap/genome.index - path: output/chromap/test.bed.gz md5sum: 7cdc8448882b75811e0c784f5f20aef2 + - path: output/chromap/versions.yml - name: chromap chromap test_chromap_chromap_paired_bam command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_bam -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config @@ -26,4 +28,5 @@ files: - path: output/chromap/genome.index - path: output/chromap/test.bam - md5sum: 73e2c76007e3c61df625668e01b3f42f + md5sum: 0cb45628d1abe4b4359650040c501aef + - path: output/chromap/versions.yml diff --git a/tests/modules/chromap/index/test.yml b/tests/modules/chromap/index/test.yml index 430a53b7..3e1d6fa6 100644 --- a/tests/modules/chromap/index/test.yml +++ b/tests/modules/chromap/index/test.yml @@ -5,5 +5,5 @@ - chromap files: - path: output/chromap/genome.index - - + - path: output/chromap/versions.yml + md5sum: fc5c80190d0622ea3e979e6862f8e32b diff --git a/tests/modules/cnvpytor/callcnvs/main.nf b/tests/modules/cnvpytor/callcnvs/main.nf new file mode 100644 index 00000000..96d33250 --- /dev/null +++ b/tests/modules/cnvpytor/callcnvs/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_CALLCNVS } from '../../../../modules/cnvpytor/callcnvs/main.nf' + +workflow test_cnvpytor_callcnvs { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + CNVPYTOR_CALLCNVS ( input ) +} diff --git a/tests/modules/cnvpytor/callcnvs/nextflow.config b/tests/modules/cnvpytor/callcnvs/nextflow.config new file mode 100644 index 00000000..9d132b77 --- /dev/null +++ b/tests/modules/cnvpytor/callcnvs/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_CALLCNVS { + ext.args = '10000' + } +} diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml new file mode 100644 index 00000000..fd07db4c --- /dev/null +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -0,0 +1,17 @@ +- name: cnvpytor callcnvs test_cnvpytor_callcnvs + command: nextflow run tests/modules/cnvpytor/callcnvs -entry test_cnvpytor_callcnvs -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/callcnvs + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor callcnvs test_cnvpytor_callcnvs stub + command: nextflow run tests/modules/cnvpytor/callcnvs -entry test_cnvpytor_callcnvs -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/callcnvs + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/histogram/main.nf b/tests/modules/cnvpytor/histogram/main.nf new file mode 100644 index 00000000..2178dee1 --- /dev/null +++ b/tests/modules/cnvpytor/histogram/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_HISTOGRAM } from '../../../../modules/cnvpytor/histogram/main.nf' + +workflow test_cnvpytor_histogram { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true), + ] + + CNVPYTOR_HISTOGRAM ( input ) +} diff --git a/tests/modules/cnvpytor/histogram/nextflow.config b/tests/modules/cnvpytor/histogram/nextflow.config new file mode 100644 index 00000000..de8cfccf --- /dev/null +++ b/tests/modules/cnvpytor/histogram/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_HISTOGRAM { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/histogram/test.yml b/tests/modules/cnvpytor/histogram/test.yml new file mode 100644 index 00000000..f67901d4 --- /dev/null +++ b/tests/modules/cnvpytor/histogram/test.yml @@ -0,0 +1,17 @@ +- name: cnvpytor histogram test_cnvpytor_histogram + command: nextflow run tests/modules/cnvpytor/histogram -entry test_cnvpytor_histogram -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/histogram + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor histogram test_cnvpytor_histogram stub + command: nextflow run tests/modules/cnvpytor/histogram -entry test_cnvpytor_histogram -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/histogram + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/importreaddepth/main.nf b/tests/modules/cnvpytor/importreaddepth/main.nf new file mode 100644 index 00000000..0d9be324 --- /dev/null +++ b/tests/modules/cnvpytor/importreaddepth/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_IMPORTREADDEPTH } from '../../../../modules/cnvpytor/importreaddepth/main.nf' + + +workflow test_cnvpytor_importreaddepth { + + input = [ + [ id: 'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + + CNVPYTOR_IMPORTREADDEPTH (input, [], []) +} + +workflow test_cnvpytor_importreaddepth_cram { + + input = [ + [ id: 'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + CNVPYTOR_IMPORTREADDEPTH (input, fasta, fai) +} diff --git a/tests/modules/cnvpytor/importreaddepth/nextflow.config b/tests/modules/cnvpytor/importreaddepth/nextflow.config new file mode 100644 index 00000000..4383e375 --- /dev/null +++ b/tests/modules/cnvpytor/importreaddepth/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: CNVPYTOR_IMPORTREADDEPTH { + ext.args = {params.cnvpytor_chr ? "-chrom ${params.cnvpytor_chr}" : '' } + } +} + +params { + cnvpytor_chr = null // specifies chromosome name(s) the same way as they are described in the sam/bam/cram header e.g. '1 2' or 'chr1 chr2'. + } diff --git a/tests/modules/cnvpytor/importreaddepth/test.yml b/tests/modules/cnvpytor/importreaddepth/test.yml new file mode 100644 index 00000000..a2530c26 --- /dev/null +++ b/tests/modules/cnvpytor/importreaddepth/test.yml @@ -0,0 +1,35 @@ +- name: cnvpytor importreaddepth test_cnvpytor_importreaddepth + command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/importreaddepth + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor importreaddepth test_cnvpytor_importreaddepth stub + command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/importreaddepth + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram + command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/importreaddepth + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram stub + command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/importreaddepth + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/partition/main.nf b/tests/modules/cnvpytor/partition/main.nf new file mode 100644 index 00000000..cd8063a4 --- /dev/null +++ b/tests/modules/cnvpytor/partition/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_PARTITION } from '../../../../modules/cnvpytor/partition/main.nf' + +workflow test_cnvpytor_partition { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + CNVPYTOR_PARTITION ( input ) +} diff --git a/tests/modules/cnvpytor/partition/nextflow.config b/tests/modules/cnvpytor/partition/nextflow.config new file mode 100644 index 00000000..b684d42a --- /dev/null +++ b/tests/modules/cnvpytor/partition/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_PARTITION { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/partition/test.yml b/tests/modules/cnvpytor/partition/test.yml new file mode 100644 index 00000000..e24a1200 --- /dev/null +++ b/tests/modules/cnvpytor/partition/test.yml @@ -0,0 +1,17 @@ +- name: cnvpytor partition test_cnvpytor_partition + command: nextflow run tests/modules/cnvpytor/partition -entry test_cnvpytor_partition -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/partition + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml + +- name: cnvpytor partition test_cnvpytor_partition stub + command: nextflow run tests/modules/cnvpytor/partition -entry test_cnvpytor_partition -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/partition + files: + - path: output/cnvpytor/test.pytor + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..3b99c314 --- /dev/null +++ b/tests/modules/cnvpytor/view/main.nf @@ -0,0 +1,42 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_VIEW } from '../../../../modules/cnvpytor/view/main.nf' + +workflow test_cnvpytor_view { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + bin_sizes = "10000 100000" + + CNVPYTOR_VIEW ( input, bin_sizes, [] ) +} + +workflow test_cnvpytor_view_tsvout { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, [], output_suffix ) +} + +workflow test_cnvpytor_view_stub { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + bin_sizes = [] + output_suffix = [] + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} diff --git a/tests/modules/cnvpytor/view/nextflow.config b/tests/modules/cnvpytor/view/nextflow.config new file mode 100644 index 00000000..6d2cc1fb --- /dev/null +++ b/tests/modules/cnvpytor/view/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_VIEW { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml new file mode 100644 index 00000000..ea8ab792 --- /dev/null +++ b/tests/modules/cnvpytor/view/test.yml @@ -0,0 +1,27 @@ +- name: cnvpytor view test_cnvpytor_view + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/test_100000.vcf + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view tsv + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_tsvout -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_1000.tsv + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view stub + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_stub -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.vcf + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/controlfreec/assesssignificance/main.nf b/tests/modules/controlfreec/assesssignificance/main.nf new file mode 100644 index 00000000..e5ed1bf7 --- /dev/null +++ b/tests/modules/controlfreec/assesssignificance/main.nf @@ -0,0 +1,77 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CONTROLFREEC_ASSESSSIGNIFICANCE } from '../../../../modules/controlfreec/assesssignificance/main.nf' +include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' + +workflow test_controlfreec_assesssignificance { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + sig_in = CONTROLFREEC_FREEC.out.CNV.join(CONTROLFREEC_FREEC.out.ratio) + CONTROLFREEC_ASSESSSIGNIFICANCE ( sig_in ) +} + +workflow test_controlfreec_assesssignificance_single { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + [], + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + sig_in = CONTROLFREEC_FREEC.out.CNV.join(CONTROLFREEC_FREEC.out.ratio) + CONTROLFREEC_ASSESSSIGNIFICANCE ( sig_in ) +} diff --git a/tests/modules/controlfreec/assesssignificance/nextflow.config b/tests/modules/controlfreec/assesssignificance/nextflow.config new file mode 100644 index 00000000..65273dea --- /dev/null +++ b/tests/modules/controlfreec/assesssignificance/nextflow.config @@ -0,0 +1,26 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:CONTROLFREEC_FREEC{ + ext.args = { [ + "sample":[ + inputformat: 'pileup', + mateorientation: 'FR' + ], + "general" :[ + bedgraphoutput: "TRUE", + noisydata: "TRUE", + minexpectedgc: "0", + readcountthreshold: "1", + sex: meta.sex, + window: "10", + ], + "control":[ + inputformat: "pileup", + mateorientation: "FR" + ] + ] + } + } +} diff --git a/tests/modules/controlfreec/assesssignificance/test.yml b/tests/modules/controlfreec/assesssignificance/test.yml new file mode 100644 index 00000000..19e54acf --- /dev/null +++ b/tests/modules/controlfreec/assesssignificance/test.yml @@ -0,0 +1,18 @@ +- name: controlfreec assesssignificance test_controlfreec_assesssignificance + command: nextflow run tests/modules/controlfreec/assesssignificance -entry test_controlfreec_assesssignificance -c tests/config/nextflow.config + tags: + - controlfreec/assesssignificance + - controlfreec + files: + - path: output/controlfreec/test.p.value.txt + md5sum: 44e23b916535fbc1a3f47b57fad292df + - path: output/controlfreec/versions.yml + +- name: controlfreec assesssignificance test_controlfreec_assesssignificance_single + command: nextflow run tests/modules/controlfreec/assesssignificance -entry test_controlfreec_assesssignificance_single -c tests/config/nextflow.config -stub-run + tags: + - controlfreec/assesssignificance + - controlfreec + files: + - path: output/controlfreec/test.p.value.txt + - path: output/controlfreec/versions.yml diff --git a/tests/modules/controlfreec/freec/main.nf b/tests/modules/controlfreec/freec/main.nf new file mode 100644 index 00000000..1f4a069b --- /dev/null +++ b/tests/modules/controlfreec/freec/main.nf @@ -0,0 +1,71 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' + +workflow test_controlfreec_freec { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) +} + +workflow test_controlfreec_freec_single { + + input = [ + [ id:'test2', single_end:false, sex:'XX' ], // meta map + [], + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) +} + diff --git a/tests/modules/controlfreec/freec/nextflow.config b/tests/modules/controlfreec/freec/nextflow.config new file mode 100644 index 00000000..65273dea --- /dev/null +++ b/tests/modules/controlfreec/freec/nextflow.config @@ -0,0 +1,26 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:CONTROLFREEC_FREEC{ + ext.args = { [ + "sample":[ + inputformat: 'pileup', + mateorientation: 'FR' + ], + "general" :[ + bedgraphoutput: "TRUE", + noisydata: "TRUE", + minexpectedgc: "0", + readcountthreshold: "1", + sex: meta.sex, + window: "10", + ], + "control":[ + inputformat: "pileup", + mateorientation: "FR" + ] + ] + } + } +} diff --git a/tests/modules/controlfreec/freec/test.yml b/tests/modules/controlfreec/freec/test.yml new file mode 100644 index 00000000..1bd4e3a4 --- /dev/null +++ b/tests/modules/controlfreec/freec/test.yml @@ -0,0 +1,37 @@ +- name: controlfreec test_controlfreec_freec + command: nextflow run tests/modules/controlfreec/freec -entry test_controlfreec_freec -c tests/config/nextflow.config + tags: + - controlfreec + - controlfreec/freec + files: + - path: output/controlfreec/config.txt + - path: output/controlfreec/test.mpileup.gz_control.cpn + md5sum: 1768b571677c418560e5a8fe203bdc79 + - path: output/controlfreec/test2.mpileup.gz_BAF.txt + md5sum: 3bb7437001cf061a77eaf87b8558c48d + - path: output/controlfreec/test2.mpileup.gz_CNVs + md5sum: 1f4f5834dbd1490afdb22f6d3091c4c9 + - path: output/controlfreec/test2.mpileup.gz_info.txt + md5sum: 1a3055d35028525ccc9e693cc9f335e0 + - path: output/controlfreec/test2.mpileup.gz_ratio.BedGraph + md5sum: 8ba455b232be20cdcc5bf1e4035e8032 + - path: output/controlfreec/test2.mpileup.gz_ratio.txt + md5sum: b76b2434de710325069e37fb1e132760 + - path: output/controlfreec/test2.mpileup.gz_sample.cpn + md5sum: c80dad58a77b1d7ba6d273999f4b4b4b + - path: output/controlfreec/versions.yml + +- name: controlfreec test_controlfreec_freec_single + command: nextflow run tests/modules/controlfreec/freec -entry test_controlfreec_freec_single -c tests/config/nextflow.config -stub-run + tags: + - controlfreec + - controlfreec/freec + files: + - path: output/controlfreec/config.txt + - path: output/controlfreec/test2_BAF.txt + - path: output/controlfreec/test2_CNVs + - path: output/controlfreec/test2_info.txt + - path: output/controlfreec/test2_ratio.BedGraph + - path: output/controlfreec/test2_ratio.txt + - path: output/controlfreec/test2_sample.cpn + - path: output/controlfreec/versions.yml diff --git a/tests/modules/controlfreec/freec2bed/main.nf b/tests/modules/controlfreec/freec2bed/main.nf new file mode 100644 index 00000000..c1b0f04e --- /dev/null +++ b/tests/modules/controlfreec/freec2bed/main.nf @@ -0,0 +1,75 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CONTROLFREEC_FREEC2BED } from '../../../../modules/controlfreec/freec2bed/main.nf' +include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' + +workflow test_controlfreec_freec2bed { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + CONTROLFREEC_FREEC2BED ( CONTROLFREEC_FREEC.out.ratio ) +} + +workflow test_controlfreec_freec2bed_single { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + [], + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + CONTROLFREEC_FREEC2BED ( CONTROLFREEC_FREEC.out.ratio ) +} diff --git a/tests/modules/controlfreec/freec2bed/nextflow.config b/tests/modules/controlfreec/freec2bed/nextflow.config new file mode 100644 index 00000000..8c2f77eb --- /dev/null +++ b/tests/modules/controlfreec/freec2bed/nextflow.config @@ -0,0 +1,27 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:CONTROLFREEC_FREEC{ + ext.args = { [ + "sample":[ + inputformat: 'pileup', + mateorientation: 'FR' + ], + "general" :[ + bedgraphoutput: "TRUE", + noisydata: "TRUE", + minexpectedgc: "0", + readcountthreshold: "1", + sex: meta.sex, + window: "10", + ], + "control":[ + inputformat: "pileup", + mateorientation: "FR" + ] + ] + } + } + +} diff --git a/tests/modules/controlfreec/freec2bed/test.yml b/tests/modules/controlfreec/freec2bed/test.yml new file mode 100644 index 00000000..9abb3a54 --- /dev/null +++ b/tests/modules/controlfreec/freec2bed/test.yml @@ -0,0 +1,16 @@ +- name: controlfreec freec2bed test_controlfreec_freec2bed + command: nextflow run tests/modules/controlfreec/freec2bed -entry test_controlfreec_freec2bed -c tests/config/nextflow.config + tags: + - controlfreec/freec2bed + - controlfreec + files: + - path: output/controlfreec/test.bed + md5sum: abe10b7ce94ba903503e697394c17297 + +- name: controlfreec freec2bed test_controlfreec_freec2bed_single + command: nextflow run tests/modules/controlfreec/freec2bed -entry test_controlfreec_freec2bed_single -c tests/config/nextflow.config -stub-run + tags: + - controlfreec/freec2bed + - controlfreec + files: + - path: output/controlfreec/test.bed diff --git a/tests/modules/controlfreec/freec2circos/main.nf b/tests/modules/controlfreec/freec2circos/main.nf new file mode 100644 index 00000000..6b34edb6 --- /dev/null +++ b/tests/modules/controlfreec/freec2circos/main.nf @@ -0,0 +1,75 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CONTROLFREEC_FREEC2CIRCOS } from '../../../../modules/controlfreec/freec2circos/main.nf' +include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' + +workflow test_controlfreec_freec2circos { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + CONTROLFREEC_FREEC2CIRCOS ( CONTROLFREEC_FREEC.out.ratio ) +} + +workflow test_controlfreec_freec2circos_single { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + [], + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + CONTROLFREEC_FREEC2CIRCOS ( CONTROLFREEC_FREEC.out.ratio ) +} diff --git a/tests/modules/controlfreec/freec2circos/nextflow.config b/tests/modules/controlfreec/freec2circos/nextflow.config new file mode 100644 index 00000000..8c2f77eb --- /dev/null +++ b/tests/modules/controlfreec/freec2circos/nextflow.config @@ -0,0 +1,27 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:CONTROLFREEC_FREEC{ + ext.args = { [ + "sample":[ + inputformat: 'pileup', + mateorientation: 'FR' + ], + "general" :[ + bedgraphoutput: "TRUE", + noisydata: "TRUE", + minexpectedgc: "0", + readcountthreshold: "1", + sex: meta.sex, + window: "10", + ], + "control":[ + inputformat: "pileup", + mateorientation: "FR" + ] + ] + } + } + +} diff --git a/tests/modules/controlfreec/freec2circos/test.yml b/tests/modules/controlfreec/freec2circos/test.yml new file mode 100644 index 00000000..c29111de --- /dev/null +++ b/tests/modules/controlfreec/freec2circos/test.yml @@ -0,0 +1,16 @@ +- name: controlfreec freec2circos test_controlfreec_freec2circos + command: nextflow run tests/modules/controlfreec/freec2circos -entry test_controlfreec_freec2circos -c tests/config/nextflow.config + tags: + - controlfreec + - controlfreec/freec2circos + files: + - path: output/controlfreec/test.circos.txt + md5sum: 19cf35f2c36b46f717dc8342b8a5a645 + +- name: controlfreec freec2circos test_controlfreec_freec2circos_single + command: nextflow run tests/modules/controlfreec/freec2circos -entry test_controlfreec_freec2circos_single -c tests/config/nextflow.config -stub-run + tags: + - controlfreec + - controlfreec/freec2circos + files: + - path: output/controlfreec/test.circos.txt diff --git a/tests/modules/controlfreec/makegraph/main.nf b/tests/modules/controlfreec/makegraph/main.nf new file mode 100644 index 00000000..543216e1 --- /dev/null +++ b/tests/modules/controlfreec/makegraph/main.nf @@ -0,0 +1,77 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CONTROLFREEC_MAKEGRAPH } from '../../../../modules/controlfreec/makegraph/main.nf' +include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' + +workflow test_controlfreec_makegraph { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + makegraph_in = CONTROLFREEC_FREEC.out.ratio.join(CONTROLFREEC_FREEC.out.BAF) + CONTROLFREEC_MAKEGRAPH ( makegraph_in ) +} + +workflow test_controlfreec_makegraph_single { + + input = [ + [ id:'test', single_end:false, sex:'XX' ], // meta map + [], + file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true), + [],[],[],[] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + + chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ] + target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + UNTAR(chrfiles) + CONTROLFREEC_FREEC (input, + fasta, + fai, + [], + dbsnp, + dbsnp_tbi, + UNTAR.out.untar.map{ it[1] }, + [], + target_bed, + [] + ) + + makegraph_in = CONTROLFREEC_FREEC.out.ratio.join(CONTROLFREEC_FREEC.out.BAF) + CONTROLFREEC_MAKEGRAPH ( makegraph_in ) +} diff --git a/tests/modules/controlfreec/makegraph/nextflow.config b/tests/modules/controlfreec/makegraph/nextflow.config new file mode 100644 index 00000000..f88fae50 --- /dev/null +++ b/tests/modules/controlfreec/makegraph/nextflow.config @@ -0,0 +1,30 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:CONTROLFREEC_FREEC{ + ext.args = { [ + "sample":[ + inputformat: 'pileup', + mateorientation: 'FR' + ], + "general" :[ + bedgraphoutput: "TRUE", + noisydata: "TRUE", + minexpectedgc: "0", + readcountthreshold: "1", + sex: meta.sex, + window: "10", + ], + "control":[ + inputformat: "pileup", + mateorientation: "FR" + ] + ] + } + } + + withName:CONTROLFREEC_MAKEGRAPH { + ext.args = "2" + } +} diff --git a/tests/modules/controlfreec/makegraph/test.yml b/tests/modules/controlfreec/makegraph/test.yml new file mode 100644 index 00000000..02d1a165 --- /dev/null +++ b/tests/modules/controlfreec/makegraph/test.yml @@ -0,0 +1,22 @@ +- name: controlfreec makegraph test_controlfreec_makegraph + command: nextflow run tests/modules/controlfreec/makegraph -entry test_controlfreec_makegraph -c tests/config/nextflow.config + tags: + - controlfreec + - controlfreec/makegraph + files: + - path: output/controlfreec/test_BAF.png + md5sum: f9d977839e09c7e2472d970bd4aa834c + - path: output/controlfreec/test_ratio.log2.png + md5sum: b3c7916b1b4951a0cc3da20d8e9e0262 + - path: output/controlfreec/test_ratio.png + md5sum: 1435b29536b3b1555b4c423f8f4fb000 + +- name: controlfreec makegraph test_controlfreec_makegraph_single + command: nextflow run tests/modules/controlfreec/makegraph -entry test_controlfreec_makegraph_single -c tests/config/nextflow.config -stub-run + tags: + - controlfreec + - controlfreec/makegraph + files: + - path: output/controlfreec/test_BAF.png + - path: output/controlfreec/test_ratio.log2.png + - path: output/controlfreec/test_ratio.png diff --git a/tests/modules/custom/sratoolsncbisettings/main.nf b/tests/modules/custom/sratoolsncbisettings/main.nf new file mode 100644 index 00000000..9f49f20e --- /dev/null +++ b/tests/modules/custom/sratoolsncbisettings/main.nf @@ -0,0 +1,44 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../../modules/custom/sratoolsncbisettings/main.nf' + +workflow test_sratoolsncbisettings_with_good_existing { + + file(params.settings_path).mkdirs() + def settings = file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true) + settings.copyTo(params.settings_file) + + CUSTOM_SRATOOLSNCBISETTINGS() +} + +workflow test_sratoolsncbisettings_with_bad_existing { + + file(params.settings_path).mkdirs() + def settings = file(params.settings_file) + settings.text = ''' + ## auto-generated configuration file - DO NOT EDIT ## + + config/default = "false" + /repository/remote/main/CGI/resolver-cgi = "https://trace.ncbi.nlm.nih.gov/Traces/names/names.fcgi" + /repository/remote/protected/CGI/resolver-cgi = "https://trace.ncbi.nlm.nih.gov/Traces/names/names.fcgi" + /repository/user/ad/public/apps/file/volumes/flatAd = "." + /repository/user/ad/public/apps/refseq/volumes/refseqAd = "." + /repository/user/ad/public/apps/sra/volumes/sraAd = "." + /repository/user/ad/public/apps/sraPileup/volumes/ad = "." + /repository/user/ad/public/apps/sraRealign/volumes/ad = "." + /repository/user/ad/public/apps/wgs/volumes/wgsAd = "." + /repository/user/ad/public/root = "." + /repository/user/default-path = "/root/ncbi" + '''.stripIndent() + + CUSTOM_SRATOOLSNCBISETTINGS() +} + +workflow test_sratoolsncbisettings_with_nonexisting { + def settings = file(params.settings_file) + settings.delete() + + CUSTOM_SRATOOLSNCBISETTINGS() +} diff --git a/tests/modules/custom/sratoolsncbisettings/nextflow.config b/tests/modules/custom/sratoolsncbisettings/nextflow.config new file mode 100644 index 00000000..a6c70bd3 --- /dev/null +++ b/tests/modules/custom/sratoolsncbisettings/nextflow.config @@ -0,0 +1,8 @@ +params.settings_path = '/tmp/.ncbi' +params.settings_file = "${params.settings_path}/user-settings.mkfg" + +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/custom/sratoolsncbisettings/nextflow_mount.config b/tests/modules/custom/sratoolsncbisettings/nextflow_mount.config new file mode 100644 index 00000000..853844c5 --- /dev/null +++ b/tests/modules/custom/sratoolsncbisettings/nextflow_mount.config @@ -0,0 +1,17 @@ +params.settings_path = '/tmp/.ncbi' +params.settings_file = "${params.settings_path}/user-settings.mkfg" + +env.NCBI_SETTINGS = params.settings_file + +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: CUSTOM_SRATOOLSNCBISETTINGS { + containerOptions = { + (workflow.containerEngine == 'singularity') ? + "-B ${params.settings_path}:${params.settings_path}" : + "-v ${params.settings_path}:${params.settings_path}" + } + } +} diff --git a/tests/modules/custom/sratoolsncbisettings/test.yml b/tests/modules/custom/sratoolsncbisettings/test.yml new file mode 100644 index 00000000..df3cd936 --- /dev/null +++ b/tests/modules/custom/sratoolsncbisettings/test.yml @@ -0,0 +1,44 @@ +- name: "custom sratoolsncbisettings test_sratoolsncbisettings_with_good_existing" + command: nextflow run ./tests/modules/custom/sratoolsncbisettings -entry test_sratoolsncbisettings_with_good_existing -c ./tests/config/nextflow.config -c ./tests/modules/custom/sratoolsncbisettings/nextflow_mount.config + tags: + - "custom" + - "custom/sratoolsncbisettings" + files: + - path: "output/custom/user-settings.mkfg" + md5sum: 955e27aff2c277c2f1f0943a098888c1 + - path: output/custom/versions.yml + contains: + - "sratools: 2.11.0" + +- name: "custom sratoolsncbisettings test_sratoolsncbisettings_with_bad_existing" + command: nextflow run ./tests/modules/custom/sratoolsncbisettings -entry test_sratoolsncbisettings_with_bad_existing -c ./tests/config/nextflow.config -c ./tests/modules/custom/sratoolsncbisettings/nextflow_mount.config + tags: + - "custom" + - "custom/sratoolsncbisettings" + exit_code: 1 + stdout: + contains: + - "Command error:" + - "missing the required entries" + - "/LIBS/GUID" + - "/libs/cloud/report_instance_identity" + - "Feel free to add the following" + files: + - path: "output/custom/user-settings.mkfg" + should_exist: false + - path: output/custom/versions.yml + should_exist: false + +- name: "custom sratoolsncbisettings test_sratoolsncbisettings_with_nonexisting" + command: nextflow run ./tests/modules/custom/sratoolsncbisettings -entry test_sratoolsncbisettings_with_nonexisting -c ./tests/config/nextflow.config -c ./tests/modules/custom/sratoolsncbisettings/nextflow.config + tags: + - "custom" + - "custom/sratoolsncbisettings" + files: + - path: "output/custom/user-settings.mkfg" + contains: + - "/LIBS/GUID" + - "/libs/cloud/report_instance_identity" + - path: output/custom/versions.yml + contains: + - "sratools: 2.11.0" diff --git a/tests/modules/dastool/dastool/main.nf b/tests/modules/dastool/dastool/main.nf index f6f6becf..9853e724 100644 --- a/tests/modules/dastool/dastool/main.nf +++ b/tests/modules/dastool/dastool/main.nf @@ -3,7 +3,7 @@ nextflow.enable.dsl = 2 include { METABAT2_METABAT2 } from '../../../../modules/metabat2/metabat2/main.nf' include { METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS } from '../../../../modules/metabat2/jgisummarizebamcontigdepths/main.nf' -include { DASTOOL_SCAFFOLDS2BIN } from '../../../../modules/dastool/scaffolds2bin/main.nf' +include { DASTOOL_FASTATOCONTIG2BIN } from '../../../../modules/dastool/fastatocontig2bin/main.nf' include { DASTOOL_DASTOOL } from '../../../../modules/dastool/dastool/main.nf' workflow test_dastool_dastool { @@ -21,13 +21,13 @@ workflow test_dastool_dastool { METABAT2_METABAT2 ( input_metabat2 ) - DASTOOL_SCAFFOLDS2BIN ( METABAT2_METABAT2.out.fasta.collect(), "fa") + DASTOOL_FASTATOCONTIG2BIN ( METABAT2_METABAT2.out.fasta.collect(), "fa") Channel.of([ [ id:'test', single_end:false ], // meta map file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)]) - .join(DASTOOL_SCAFFOLDS2BIN.out.scaffolds2bin) + .join( DASTOOL_FASTATOCONTIG2BIN.out.fastatocontig2bin ) .set {input_dastool} - - DASTOOL_DASTOOL ( input_dastool, [], [], [] ) + + DASTOOL_DASTOOL ( input_dastool, [], [] ) } diff --git a/tests/modules/dastool/dastool/test.yml b/tests/modules/dastool/dastool/test.yml index e2161890..cda17bda 100644 --- a/tests/modules/dastool/dastool/test.yml +++ b/tests/modules/dastool/dastool/test.yml @@ -1,29 +1,28 @@ - name: dastool dastool test_dastool_dastool - command: nextflow run ./tests/modules/dastool/dastool -entry test_dastool_dastool -c ./tests/config/nextflow.config -c ./tests/modules/dastool/dastool/nextflow.config + command: nextflow run tests/modules/dastool/dastool -entry test_dastool_dastool -c tests/config/nextflow.config tags: - - dastool - dastool/dastool + - dastool files: - path: output/dastool/test.seqlength md5sum: b815a5811008c36808a59b1d0dcfab24 - path: output/dastool/test.tsv md5sum: 6e46c0be14dded7cb13af38f54feea47 - path: output/dastool/test_DASTool.log - contains: - - 'DAS Tool run on' - - path: output/dastool/test_DASTool_scaffolds2bin.txt + - path: output/dastool/test_DASTool_contig2bin.tsv md5sum: 6e46c0be14dded7cb13af38f54feea47 - - path: output/dastool/test_DASTool_summary.txt - md5sum: a3efa8717b30dfada78dc5ae9a3dc396 + - path: output/dastool/test_DASTool_summary.tsv + md5sum: ab9dd3709a59a69bc66030b9e0ff3d5b + - path: output/dastool/test_proteins.faa + - path: output/dastool/test_proteins.faa.all.b6 + md5sum: 39c11237ef22ac73109aaac267e185d0 - path: output/dastool/test_proteins.faa.archaea.scg md5sum: e79d82eecee25821d1658ea4f082601d - path: output/dastool/test_proteins.faa.bacteria.scg md5sum: 8132cfb17cf398d41c036ead55c96ffe - - path: output/dastool/test_test.tsv.eval - md5sum: a3efa8717b30dfada78dc5ae9a3dc396 - - path: output/metabat2/bins/test.1.fa.gz - md5sum: 2b297bf557cc3831b800348859331268 - - path: output/metabat2/test.tsv.gz - md5sum: 619338fa5019e361d5545ce385a6961f - - path: output/metabat2/test.txt.gz - md5sum: 745a0446af6ef68b930975e9ce5a95d6 + - path: output/dastool/test_proteins.faa.findSCG.b6 + md5sum: 48e90e12cd6c88d00608777dbc48a82a + - path: output/dastool/test_proteins.faa.scg.candidates.faa + md5sum: d94b7bed0f8aa9cf2824d72c548c537c + - path: output/dastool/versions.yml + md5sum: 004e04c6a38652df2e0c59c44e29c9de diff --git a/tests/modules/dastool/fastatocontig2bin/main.nf b/tests/modules/dastool/fastatocontig2bin/main.nf new file mode 100644 index 00000000..0178dbf9 --- /dev/null +++ b/tests/modules/dastool/fastatocontig2bin/main.nf @@ -0,0 +1,48 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GUNZIP } from '../../../../modules/gunzip/main.nf' +include { METABAT2_METABAT2 } from '../../../../modules/metabat2/metabat2/main.nf' +include { METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS } from '../../../../modules/metabat2/jgisummarizebamcontigdepths/main.nf' +include { DASTOOL_FASTATOCONTIG2BIN } from '../../../../modules/dastool/fastatocontig2bin/main.nf' + +workflow test_dastool_fastatocontig2bin { + + input_depth = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam_bai'], checkIfExists: true) ] + + METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS ( input_depth ) + + Channel.fromPath(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + .map { it -> [[ id:'test', single_end:false ], it] } + .join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth) + .set { input_metabat2 } + + METABAT2_METABAT2 ( input_metabat2 ) + + DASTOOL_FASTATOCONTIG2BIN ( METABAT2_METABAT2.out.fasta.collect(), "fa") +} + +workflow test_dastool_fastatocontig2bin_ungzipped { + + input_depth = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam_bai'], checkIfExists: true) ] + + + METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS ( input_depth ) + + Channel.fromPath(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + .map { it -> [[ id:'test', single_end:false ], it] } + .join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth) + .set { input_metabat2 } + + METABAT2_METABAT2 ( input_metabat2 ) + + // TODO test unzipped input files + ch_input_2_fastatocontig2bin = GUNZIP( METABAT2_METABAT2.out.fasta ).gunzip + + DASTOOL_FASTATOCONTIG2BIN ( ch_input_2_fastatocontig2bin, "fa") +} diff --git a/tests/modules/dastool/fastatocontig2bin/nextflow.config b/tests/modules/dastool/fastatocontig2bin/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/dastool/fastatocontig2bin/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/dastool/fastatocontig2bin/test.yml b/tests/modules/dastool/fastatocontig2bin/test.yml new file mode 100644 index 00000000..94881438 --- /dev/null +++ b/tests/modules/dastool/fastatocontig2bin/test.yml @@ -0,0 +1,20 @@ +- name: dastool fastatocontig2bin test_dastool_fastatocontig2bin + command: nextflow run tests/modules/dastool/fastatocontig2bin -entry test_dastool_fastatocontig2bin -c tests/config/nextflow.config + tags: + - dastool + - dastool/fastatocontig2bin + files: + - path: output/dastool/test.tsv + md5sum: 6e46c0be14dded7cb13af38f54feea47 + - path: output/dastool/versions.yml + md5sum: ff4b6f14bee4548bf09b5e602c306595 + +- name: dastool fastatocontig2bin test_dastool_fastatocontig2bin_ungzipped + command: nextflow run tests/modules/dastool/fastatocontig2bin -entry test_dastool_fastatocontig2bin_ungzipped -c tests/config/nextflow.config + tags: + - dastool + - dastool/fastatocontig2bin + files: + - path: output/dastool/test.tsv + md5sum: 6e46c0be14dded7cb13af38f54feea47 + - path: output/dastool/versions.yml diff --git a/tests/modules/dastool/scaffolds2bin/main.nf b/tests/modules/dastool/scaffolds2bin/main.nf index a0cd6726..c45a6f2b 100644 --- a/tests/modules/dastool/scaffolds2bin/main.nf +++ b/tests/modules/dastool/scaffolds2bin/main.nf @@ -2,9 +2,10 @@ nextflow.enable.dsl = 2 -include { METABAT2_METABAT2 } from '../../../../modules/metabat2/metabat2/main.nf' -include { METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS } from '../../../../modules/metabat2/jgisummarizebamcontigdepths/main.nf' -include { DASTOOL_SCAFFOLDS2BIN } from '../../../../modules/dastool/scaffolds2bin/main.nf' +include { GUNZIP } from '../../../../modules/gunzip/main.nf' +include { METABAT2_METABAT2 } from '../../../../modules/metabat2/metabat2/main.nf' +include { METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS } from '../../../../modules/metabat2/jgisummarizebamcontigdepths/main.nf' +include { DASTOOL_SCAFFOLDS2BIN } from '../../../../modules/dastool/scaffolds2bin/main.nf' workflow test_dastool_scaffolds2bin { @@ -22,4 +23,26 @@ workflow test_dastool_scaffolds2bin { METABAT2_METABAT2 ( input_metabat2 ) DASTOOL_SCAFFOLDS2BIN ( METABAT2_METABAT2.out.fasta.collect(), "fa") -} \ No newline at end of file +} + +workflow test_dastool_scaffolds2bin_ungzipped { + + input_depth = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_sorted_bam_bai'], checkIfExists: true) ] + + + METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS ( input_depth ) + + Channel.fromPath(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + .map { it -> [[ id:'test', single_end:false ], it] } + .join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth) + .set { input_metabat2 } + + METABAT2_METABAT2 ( input_metabat2 ) + + // TODO test unzipped input files + ch_input_2_scaffolds2bin = GUNZIP( METABAT2_METABAT2.out.fasta ).gunzip + + DASTOOL_SCAFFOLDS2BIN ( ch_input_2_scaffolds2bin, "fa") +} diff --git a/tests/modules/dastool/scaffolds2bin/test.yml b/tests/modules/dastool/scaffolds2bin/test.yml index 26f528c9..3d91c8c1 100644 --- a/tests/modules/dastool/scaffolds2bin/test.yml +++ b/tests/modules/dastool/scaffolds2bin/test.yml @@ -1,14 +1,20 @@ - name: dastool scaffolds2bin test_dastool_scaffolds2bin - command: nextflow run ./tests/modules/dastool/scaffolds2bin -entry test_dastool_scaffolds2bin -c ./tests/config/nextflow.config -c ./tests/modules/dastool/scaffolds2bin/nextflow.config + command: nextflow run tests/modules/dastool/scaffolds2bin -entry test_dastool_scaffolds2bin -c tests/config/nextflow.config tags: - dastool - dastool/scaffolds2bin files: - path: output/dastool/test.tsv md5sum: 6e46c0be14dded7cb13af38f54feea47 - - path: output/metabat2/bins/test.1.fa.gz - md5sum: 2b297bf557cc3831b800348859331268 - - path: output/metabat2/test.tsv.gz - md5sum: 619338fa5019e361d5545ce385a6961f - - path: output/metabat2/test.txt.gz - md5sum: 745a0446af6ef68b930975e9ce5a95d6 + - path: output/dastool/versions.yml + md5sum: d0831ed159eb5a1a1565d1d211012ad6 +- name: dastool scaffolds2bin test_dastool_scaffolds2bin_ungzipped + command: nextflow run tests/modules/dastool/scaffolds2bin -entry test_dastool_scaffolds2bin_ungzipped -c tests/config/nextflow.config + tags: + - dastool + - dastool/scaffolds2bin + files: + - path: output/dastool/test.tsv + md5sum: 6e46c0be14dded7cb13af38f54feea47 + - path: output/dastool/versions.yml + md5sum: da58e477b7f4c16a9ea495ec1a4a4d4f diff --git a/tests/modules/deeparg/downloaddata/main.nf b/tests/modules/deeparg/downloaddata/main.nf index ed2d48bb..1074b0bc 100644 --- a/tests/modules/deeparg/downloaddata/main.nf +++ b/tests/modules/deeparg/downloaddata/main.nf @@ -5,5 +5,5 @@ nextflow.enable.dsl = 2 include { DEEPARG_DOWNLOADDATA } from '../../../../modules/deeparg/downloaddata/main.nf' workflow test_deeparg_downloaddata { - DEEPARG_DOWNLOADDATA () + DEEPARG_DOWNLOADDATA ( ) } diff --git a/tests/modules/deeparg/predict/main.nf b/tests/modules/deeparg/predict/main.nf index 2758ab58..2ada2374 100644 --- a/tests/modules/deeparg/predict/main.nf +++ b/tests/modules/deeparg/predict/main.nf @@ -13,7 +13,7 @@ workflow test_deeparg_predict { 'LS' ] - DEEPARG_DOWNLOADDATA() + DEEPARG_DOWNLOADDATA( ) DEEPARG_PREDICT ( input, DEEPARG_DOWNLOADDATA.out.db ) } diff --git a/tests/modules/deeptools/bamcoverage/main.nf b/tests/modules/deeptools/bamcoverage/main.nf new file mode 100644 index 00000000..fb5c1c2d --- /dev/null +++ b/tests/modules/deeptools/bamcoverage/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPTOOLS_BAMCOVERAGE } from '../../../../modules/deeptools/bamcoverage/main.nf' + +workflow test_deeptools_bamcoverage_bam { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + + DEEPTOOLS_BAMCOVERAGE ( input ) +} + +workflow test_deeptools_bamcoverage_cram { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) + ] + + DEEPTOOLS_BAMCOVERAGE ( input ) +} diff --git a/tests/modules/deeptools/bamcoverage/nextflow.config b/tests/modules/deeptools/bamcoverage/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/deeptools/bamcoverage/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/deeptools/bamcoverage/test.yml b/tests/modules/deeptools/bamcoverage/test.yml new file mode 100644 index 00000000..736c2e61 --- /dev/null +++ b/tests/modules/deeptools/bamcoverage/test.yml @@ -0,0 +1,21 @@ +- name: deeptools bamcoverage test_deeptools_bamcoverage_bam + command: nextflow run tests/modules/deeptools/bamcoverage -entry test_deeptools_bamcoverage_bam -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/bamcoverage + files: + - path: output/deeptools/test.bigWig + md5sum: 95fe9383a9e6c02aea6b785cf074274f + - path: output/deeptools/versions.yml + md5sum: 68c94e73b7a8c0935578bad61fea54c1 + +- name: deeptools bamcoverage test_deeptools_bamcoverage_cram + command: nextflow run tests/modules/deeptools/bamcoverage -entry test_deeptools_bamcoverage_cram -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/bamcoverage + files: + - path: output/deeptools/test.bigWig + md5sum: 95fe9383a9e6c02aea6b785cf074274f + - path: output/deeptools/versions.yml + md5sum: 665bbd2979c49bf3974a24bd44a88e94 diff --git a/tests/modules/deeptools/plotheatmap/test.yml b/tests/modules/deeptools/plotheatmap/test.yml index 9273f840..ddc468e2 100644 --- a/tests/modules/deeptools/plotheatmap/test.yml +++ b/tests/modules/deeptools/plotheatmap/test.yml @@ -6,4 +6,3 @@ files: - path: output/deeptools/test.plotHeatmap.mat.tab - path: output/deeptools/test.plotHeatmap.pdf - diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 87d05bf9..ff669233 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -7,9 +7,22 @@ include { DIAMOND_BLASTP } from '../../../../modules/diamond/blastp/main.nf' workflow test_diamond_blastp { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + out_ext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) +} + +workflow test_diamond_blastp_daa { + + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + out_ext = 'daa' + blast_columns = [] + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 673563cb..aff4e1c5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,8 +1,17 @@ -- name: diamond blastp - command: nextflow run ./tests/modules/diamond/blastp -entry test_diamond_blastp -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastp/nextflow.config +- name: diamond blastp test_diamond_blastp + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - - diamond - - diamond/blastp + - diamond/blastp + - diamond files: - - path: ./output/diamond/test.diamond_blastp.txt - md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + - path: output/diamond/test.diamond_blastp.txt + - path: output/diamond/versions.yml + +- name: diamond blastp test_diamond_blastp_daa + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config + tags: + - diamond/blastp + - diamond + files: + - path: output/diamond/test.diamond_blastp.daa + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 77eb08ea..8316aa91 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -7,9 +7,22 @@ include { DIAMOND_BLASTX } from '../../../../modules/diamond/blastx/main.nf' workflow test_diamond_blastx { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + out_ext = 'tfdfdt' // Nonsense file extension to check default case. + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) +} + +workflow test_diamond_blastx_daa { + + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + out_ext = 'daa' + blast_columns = [] + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index ee94802f..b2b6149f 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -1,8 +1,18 @@ -- name: diamond blastx - command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config +- name: diamond blastx test_diamond_blastx + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config tags: - - diamond - - diamond/blastx + - diamond + - diamond/blastx files: - - path: ./output/diamond/test.diamond_blastx.txt - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/diamond/test.diamond_blastx.txt + - path: output/diamond/versions.yml + +- name: diamond blastx test_diamond_blastx_daa + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastx + files: + - path: output/diamond/test.diamond_blastx.daa + md5sum: 0df4a833408416f32981415873facc11 + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/makedb/main.nf b/tests/modules/diamond/makedb/main.nf index 70982ae9..d309de6d 100644 --- a/tests/modules/diamond/makedb/main.nf +++ b/tests/modules/diamond/makedb/main.nf @@ -6,7 +6,7 @@ include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' workflow test_diamond_makedb { - input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] DIAMOND_MAKEDB ( input ) } diff --git a/tests/modules/diamond/makedb/test.yml b/tests/modules/diamond/makedb/test.yml index c8f2d79e..cdddf735 100644 --- a/tests/modules/diamond/makedb/test.yml +++ b/tests/modules/diamond/makedb/test.yml @@ -1,8 +1,9 @@ - name: diamond makedb test_diamond_makedb - command: nextflow run ./tests/modules/diamond/makedb -entry test_diamond_makedb -c ./tests/config/nextflow.config -c ./tests/modules/diamond/makedb/nextflow.config + command: nextflow run tests/modules/diamond/makedb -entry test_diamond_makedb -c tests/config/nextflow.config tags: - - diamond - diamond/makedb + - diamond files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/proteome.fasta.dmnd + md5sum: fc28c50b202dd7a7c5451cddff2ba1f4 + - path: output/diamond/versions.yml diff --git a/tests/modules/dragmap/hashtable/test.yml b/tests/modules/dragmap/hashtable/test.yml index 59a3ed55..0534bdc2 100644 --- a/tests/modules/dragmap/hashtable/test.yml +++ b/tests/modules/dragmap/hashtable/test.yml @@ -4,16 +4,16 @@ - dragmap - dragmap/hashtable files: - - path: output/dragmap/dragmap/hash_table.cfg - - path: output/dragmap/dragmap/hash_table.cfg.bin - - path: output/dragmap/dragmap/hash_table.cmp - md5sum: bc210e5358fd65656f9aea297b59ec7d - - path: output/dragmap/dragmap/hash_table_stats.txt - - path: output/dragmap/dragmap/reference.bin - md5sum: b6b5c12a42416b990cd2844de8f33c5d - - path: output/dragmap/dragmap/ref_index.bin - md5sum: 8470be9566ecee77eb4aea6a38922a66 - - path: output/dragmap/dragmap/repeat_mask.bin - md5sum: 2439259a2fd32a1d0f4c53d585f3da3a - - path: output/dragmap/dragmap/str_table.bin - md5sum: 302e2b30993973527e69c6bcd1f093d0 + - path: output/dragmap/dragmap/hash_table.cfg + - path: output/dragmap/dragmap/hash_table.cfg.bin + - path: output/dragmap/dragmap/hash_table.cmp + md5sum: bc210e5358fd65656f9aea297b59ec7d + - path: output/dragmap/dragmap/hash_table_stats.txt + - path: output/dragmap/dragmap/reference.bin + md5sum: b6b5c12a42416b990cd2844de8f33c5d + - path: output/dragmap/dragmap/ref_index.bin + md5sum: 8470be9566ecee77eb4aea6a38922a66 + - path: output/dragmap/dragmap/repeat_mask.bin + md5sum: 2439259a2fd32a1d0f4c53d585f3da3a + - path: output/dragmap/dragmap/str_table.bin + md5sum: 302e2b30993973527e69c6bcd1f093d0 diff --git a/tests/modules/ectyper/test.yml b/tests/modules/ectyper/test.yml index 4f909bd9..15e0327d 100644 --- a/tests/modules/ectyper/test.yml +++ b/tests/modules/ectyper/test.yml @@ -6,6 +6,6 @@ - path: output/ectyper/blast_output_alleles.txt md5sum: 27f3f5e84f7da451b2948d61589cdb06 - path: output/ectyper/ectyper.log - contains: ['Serotype', 'RefSeq', 'O-type', 'finished'] + contains: ["Serotype", "RefSeq", "O-type", "finished"] - path: output/ectyper/test.tsv md5sum: ba923d7c7ee7d1047466aafc9a9df208 diff --git a/tests/modules/elprep/filter/main.nf b/tests/modules/elprep/filter/main.nf new file mode 100644 index 00000000..0a8d43ca --- /dev/null +++ b/tests/modules/elprep/filter/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_FILTER } from '../../../../modules/elprep/filter/main.nf' + +workflow test_elprep_filter { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + reference_elfasta = file(params.test_data['homo_sapiens']['genome']['genome_elfasta'], checkIfExists: true) + known_sites_elsites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_elsites'], checkIfExists: true) + target_regions_bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + ELPREP_FILTER ( input, true, true, [], [], reference_elfasta, known_sites_elsites, target_regions_bed, [], [], true, true) +} diff --git a/tests/modules/elprep/filter/nextflow.config b/tests/modules/elprep/filter/nextflow.config new file mode 100644 index 00000000..d53a3d2d --- /dev/null +++ b/tests/modules/elprep/filter/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: ELPREP_FILTER { + ext.args = "--mark-duplicates " + } +} diff --git a/tests/modules/elprep/filter/test.yml b/tests/modules/elprep/filter/test.yml new file mode 100644 index 00000000..922d7a9b --- /dev/null +++ b/tests/modules/elprep/filter/test.yml @@ -0,0 +1,13 @@ +- name: elprep filter test_elprep_filter + command: nextflow run tests/modules/elprep/filter -entry test_elprep_filter -c tests/config/nextflow.config + tags: + - elprep + - elprep/filter + files: + - path: output/elprep/test.activity_profile.igv + - path: output/elprep/test.assembly_regions.igv + - path: output/elprep/output/test.bam + - path: output/elprep/test.g.vcf.gz + - path: output/elprep/test.metrics.txt + - path: output/elprep/test.recall + - path: output/elprep/versions.yml diff --git a/tests/modules/elprep/merge/main.nf b/tests/modules/elprep/merge/main.nf new file mode 100644 index 00000000..b4a40ce3 --- /dev/null +++ b/tests/modules/elprep/merge/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' +include { ELPREP_MERGE } from '../../../../modules/elprep/merge/main.nf' + +workflow test_elprep_merge { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) + ELPREP_MERGE ( ELPREP_SPLIT.out.bam ) +} diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config new file mode 100644 index 00000000..4e4570f4 --- /dev/null +++ b/tests/modules/elprep/merge/nextflow.config @@ -0,0 +1,5 @@ +process { + withName : ELPREP_MERGE { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } +} diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml new file mode 100644 index 00000000..ad2ecfef --- /dev/null +++ b/tests/modules/elprep/merge/test.yml @@ -0,0 +1,8 @@ +- name: elprep merge test_elprep_merge + command: nextflow run tests/modules/elprep/merge -entry test_elprep_merge -c tests/config/nextflow.config + tags: + - elprep + - elprep/merge + files: + - path: output/elprep/output/test.bam + - path: output/elprep/versions.yml diff --git a/tests/modules/elprep/split/main.nf b/tests/modules/elprep/split/main.nf new file mode 100644 index 00000000..d5a111de --- /dev/null +++ b/tests/modules/elprep/split/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' + +workflow test_elprep_split { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) +} diff --git a/tests/modules/elprep/split/nextflow.config b/tests/modules/elprep/split/nextflow.config new file mode 100644 index 00000000..a3ae0169 --- /dev/null +++ b/tests/modules/elprep/split/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName : ELPREP_SPLIT { + ext.args = "--contig-group-size 1 --output-type bam" + } + +} diff --git a/tests/modules/elprep/split/test.yml b/tests/modules/elprep/split/test.yml new file mode 100644 index 00000000..2de3f99b --- /dev/null +++ b/tests/modules/elprep/split/test.yml @@ -0,0 +1,10 @@ +- name: elprep split test_elprep_split + command: nextflow run tests/modules/elprep/split -entry test_elprep_split -c tests/config/nextflow.config + tags: + - elprep + - elprep/split + files: + - path: output/elprep/output/splits/test-group00001.bam + - path: output/elprep/output/splits/test-unmapped.bam + - path: output/elprep/output/test-spread.bam + - path: output/elprep/versions.yml diff --git a/tests/modules/ensemblvep/main.nf b/tests/modules/ensemblvep/main.nf index 223847c7..30d19957 100644 --- a/tests/modules/ensemblvep/main.nf +++ b/tests/modules/ensemblvep/main.nf @@ -10,5 +10,5 @@ workflow test_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/modules/expansionhunter/main.nf b/tests/modules/expansionhunter/main.nf index 91faeeb8..d0221234 100644 --- a/tests/modules/expansionhunter/main.nf +++ b/tests/modules/expansionhunter/main.nf @@ -7,8 +7,8 @@ include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf' workflow test_expansionhunter { input = [ [ id:'test', gender:'male' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) diff --git a/tests/modules/expansionhunter/test.yml b/tests/modules/expansionhunter/test.yml index 19403588..f9282f8c 100644 --- a/tests/modules/expansionhunter/test.yml +++ b/tests/modules/expansionhunter/test.yml @@ -4,4 +4,4 @@ - expansionhunter files: - path: output/expansionhunter/test.vcf - md5sum: ef6c2101d7bd67211bb5a5a132690e02 + md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76 diff --git a/tests/modules/faqcs/main.nf b/tests/modules/faqcs/main.nf new file mode 100644 index 00000000..eba4bb97 --- /dev/null +++ b/tests/modules/faqcs/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { FAQCS } from '../../../modules/faqcs/main.nf' + + +// +// Test with single-end data +// +workflow test_fastp_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + FAQCS ( input ) +} + +// +// Test with paired-end data +// +workflow test_fastp_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + FAQCS ( input ) +} + diff --git a/tests/modules/faqcs/nextflow.config b/tests/modules/faqcs/nextflow.config new file mode 100644 index 00000000..a75988d0 --- /dev/null +++ b/tests/modules/faqcs/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = {"--debug" } + +} diff --git a/tests/modules/faqcs/test.yml b/tests/modules/faqcs/test.yml new file mode 100644 index 00000000..ef50d30d --- /dev/null +++ b/tests/modules/faqcs/test.yml @@ -0,0 +1,55 @@ +- name: faqcs test_fastp_single_end + command: nextflow run tests/modules/faqcs -entry test_fastp_single_end -c tests/config/nextflow.config + tags: + - faqcs + files: + - path: output/faqcs/qa.test.base_content.txt + md5sum: f992603f01ca430c03c8aae02eba2f5d + - path: output/faqcs/qa.test.for_qual_histogram.txt + md5sum: a3d462ab84151e982f99f85f52c21de3 + - path: output/faqcs/qa.test.length_count.txt + md5sum: 80915f09fbaf5884c32e95acab2d031c + - path: output/faqcs/test.base_content.txt + md5sum: f992603f01ca430c03c8aae02eba2f5d + - path: output/faqcs/test.fastp.log + md5sum: be79dc893f87de1f82faf749cdfb848c + - path: output/faqcs/test.for_qual_histogram.txt + md5sum: a3d462ab84151e982f99f85f52c21de3 + - path: output/faqcs/test.length_count.txt + md5sum: 80915f09fbaf5884c32e95acab2d031c + - path: output/faqcs/test.stats.txt + md5sum: ea20e93706b2e4c676004253baa3cec6 + - path: output/faqcs/test.trimmed.fastq.gz + md5sum: 875863b402f67403dac63ef59b9c9a8a + - path: output/faqcs/test_qc_report.pdf + - path: output/faqcs/versions.yml + md5sum: 2a38d7e7ab5299336e9669c393c9da6c + +- name: faqcs test_fastp_paired_end + command: nextflow run tests/modules/faqcs -entry test_fastp_paired_end -c tests/config/nextflow.config + tags: + - faqcs + files: + - path: output/faqcs/qa.test.base_content.txt + md5sum: 99aa9a775ccd8d6503f0cf80f775203c + - path: output/faqcs/qa.test.for_qual_histogram.txt + md5sum: 4f4b131be5425bdfa4b3237e44fa7d48 + - path: output/faqcs/qa.test.length_count.txt + md5sum: 420298983c762754d5b0ef32c9d5dad4 + - path: output/faqcs/test.base_content.txt + md5sum: 99aa9a775ccd8d6503f0cf80f775203c + - path: output/faqcs/test.fastp.log + md5sum: be79dc893f87de1f82faf749cdfb848c + - path: output/faqcs/test.for_qual_histogram.txt + md5sum: 4f4b131be5425bdfa4b3237e44fa7d48 + - path: output/faqcs/test.length_count.txt + md5sum: 420298983c762754d5b0ef32c9d5dad4 + - path: output/faqcs/test.stats.txt + md5sum: 9a693f8af94ab8c485519d9a523aa622 + - path: output/faqcs/test_1.trimmed.fastq.gz + md5sum: 875863b402f67403dac63ef59b9c9a8a + - path: output/faqcs/test_2.trimmed.fastq.gz + md5sum: 375aeb74819ca3d72203135ac80df78c + - path: output/faqcs/test_qc_report.pdf + - path: output/faqcs/versions.yml + md5sum: 208d54c0cf6dfc54e719b81b990afac9 diff --git a/tests/modules/freebayes/main.nf b/tests/modules/freebayes/main.nf index f8ae0ecb..6ed708c5 100644 --- a/tests/modules/freebayes/main.nf +++ b/tests/modules/freebayes/main.nf @@ -5,91 +5,98 @@ nextflow.enable.dsl = 2 include { FREEBAYES } from '../../../modules/freebayes/main.nf' workflow test_freebayes { - + targets = [] input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), [], - [] + [], + targets ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - targets = [] + samples = [] populations = [] cnv = [] - FREEBAYES (input, fasta, fai, targets, samples, populations, cnv) + FREEBAYES (input, fasta, fai, samples, populations, cnv) } workflow test_freebayes_bed { + targets = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), [], - [] + [], + targets ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - targets = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + samples = [] populations = [] cnv = [] - FREEBAYES (input, fasta, fai, targets, samples, populations, cnv) + FREEBAYES (input, fasta, fai, samples, populations, cnv) } workflow test_freebayes_cram { + targets = [] input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), [], - [] + [], + targets ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - targets = [] samples = [] populations = [] cnv = [] - FREEBAYES (input, fasta, fai, targets, samples, populations, cnv) + FREEBAYES (input, fasta, fai, samples, populations, cnv) } workflow test_freebayes_somatic { + targets = [] input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true), + targets ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - targets = [] + samples = [] populations = [] cnv = [] - FREEBAYES (input, fasta, fai, targets, samples, populations, cnv) + FREEBAYES (input, fasta, fai, samples, populations, cnv) } workflow test_freebayes_somatic_cram_intervals { + targets = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true), + targets ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - targets = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) samples = [] populations = [] cnv = [] - FREEBAYES (input, fasta, fai, targets, samples, populations, cnv) + FREEBAYES (input, fasta, fai, samples, populations, cnv) } diff --git a/tests/modules/freebayes/test.yml b/tests/modules/freebayes/test.yml index 6cca692e..c3c8e30b 100644 --- a/tests/modules/freebayes/test.yml +++ b/tests/modules/freebayes/test.yml @@ -4,7 +4,7 @@ - freebayes files: - path: output/freebayes/test.vcf.gz - md5sum: 81d3e6ce7b6343d088b779567c3803eb + md5sum: f28d0b8e2ccedeac0e590ca2ecaac83d - path: output/freebayes/versions.yml md5sum: 53651eb835af65df829241257584a7d2 @@ -14,7 +14,7 @@ - freebayes files: - path: output/freebayes/test.vcf.gz - md5sum: 02645d014a63485162a7789007373b2a + md5sum: 1927441d1b7a4c48cbb61821de300ad4 - path: output/freebayes/versions.yml md5sum: becc93c8a0be580c09d55b955d60a5e1 @@ -24,7 +24,7 @@ - freebayes files: - path: output/freebayes/test.vcf.gz - md5sum: 3d0bfcd2129c62f8863952fa4c1054db + md5sum: 9b8d1d51d779bbea4086c7f7a2ece641 - path: output/freebayes/versions.yml md5sum: 2e5b266edfc6cab81353cfc72c00f67c @@ -34,7 +34,7 @@ - freebayes files: - path: output/freebayes/test.vcf.gz - md5sum: 22fec868210ba3baf685b214bfd8e74b + md5sum: dcaa639912174055c1380913d6102c01 - path: output/freebayes/versions.yml md5sum: 8fbdb4c052fb3e42b5508a966125fa05 @@ -44,6 +44,6 @@ - freebayes files: - path: output/freebayes/test.vcf.gz - md5sum: 527cf2937067bbd4117d95fd472bb928 + md5sum: b0052a2b83c0ba1b9686d0c96e61712f - path: output/freebayes/versions.yml md5sum: af97e3dfdc086188739907c3460e49e0 diff --git a/tests/modules/gamma/main.nf b/tests/modules/gamma/main.nf new file mode 100644 index 00000000..f9477706 --- /dev/null +++ b/tests/modules/gamma/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GAMMA } from '../../../modules/gamma/main.nf' + +workflow test_gamma { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + + GAMMA ( input, db ) +} diff --git a/tests/modules/gamma/nextflow.config b/tests/modules/gamma/nextflow.config new file mode 100644 index 00000000..bbbf4de0 --- /dev/null +++ b/tests/modules/gamma/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + ext.args = '--fasta' + +} diff --git a/tests/modules/gamma/test.yml b/tests/modules/gamma/test.yml new file mode 100644 index 00000000..1b493b49 --- /dev/null +++ b/tests/modules/gamma/test.yml @@ -0,0 +1,13 @@ +- name: gamma test_gamma + command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config + tags: + - gamma + files: + - path: output/gamma/test.fasta + md5sum: df37b48466181311e0a679f3c5878484 + - path: output/gamma/test.gamma + md5sum: 3256708fa517a65ed01d99e0e3c762ae + - path: output/gamma/test.psl + md5sum: 162a2757ed3b167ae1e0cdb24213f940 + - path: output/gamma/versions.yml + md5sum: 3fefb5b46c94993362243c5f9a472057 diff --git a/tests/modules/gatk4/applybqsr/test.yml b/tests/modules/gatk4/applybqsr/test.yml index 7449c210..c3dd4eef 100644 --- a/tests/modules/gatk4/applybqsr/test.yml +++ b/tests/modules/gatk4/applybqsr/test.yml @@ -5,9 +5,8 @@ - gatk4/applybqsr files: - path: output/gatk4/test.bam - md5sum: 908825edf1f229a072f91d8b753d95dd + md5sum: e11b7eaf2034740a953626518e3c3d6e - path: output/gatk4/versions.yml - md5sum: b65c46529ae9658db0c596cbc26505c2 - name: gatk4 applybqsr test_gatk4_applybqsr_intervals command: nextflow run tests/modules/gatk4/applybqsr -entry test_gatk4_applybqsr_intervals -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsr/nextflow.config @@ -16,9 +15,8 @@ - gatk4/applybqsr files: - path: output/gatk4/test.bam - md5sum: 50f8a79c7d528e02470416f81eb582bc + md5sum: e9e9aa753c106e43f936ad573e23d2e6 - path: output/gatk4/versions.yml - md5sum: 17c8a40b3537e3400edebd1826d28385 - name: gatk4 applybqsr test_gatk4_applybqsr_cram command: nextflow run tests/modules/gatk4/applybqsr -entry test_gatk4_applybqsr_cram -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsr/nextflow.config @@ -27,6 +25,5 @@ - gatk4/applybqsr files: - path: output/gatk4/test.cram - md5sum: cd8d4ba6181f714e74641adeb2f9aa1d + md5sum: bca9d234a5d484ce2a6f4826ca2ea308 - path: output/gatk4/versions.yml - md5sum: 35218922e1929c699ea64de9f4c29fb5 diff --git a/tests/modules/gatk4/applybqsrspark/main.nf b/tests/modules/gatk4/applybqsrspark/main.nf new file mode 100644 index 00000000..ee1f88dd --- /dev/null +++ b/tests/modules/gatk4/applybqsrspark/main.nf @@ -0,0 +1,47 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_APPLYBQSR_SPARK } from '../../../../modules/gatk4/applybqsrspark/main.nf' + +workflow test_gatk4_applybqsr_spark { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_APPLYBQSR_SPARK ( input, fasta, fai, dict ) +} + +workflow test_gatk4_applybqsr_spark_intervals { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_APPLYBQSR_SPARK ( input, fasta, fai, dict ) +} + +workflow test_gatk4_applybqsr_spark_cram { + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_APPLYBQSR_SPARK ( input, fasta, fai, dict ) +} diff --git a/tests/modules/gatk4/applybqsrspark/nextflow.config b/tests/modules/gatk4/applybqsrspark/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/gatk4/applybqsrspark/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/gatk4/applybqsrspark/test.yml b/tests/modules/gatk4/applybqsrspark/test.yml new file mode 100644 index 00000000..1e4f8b47 --- /dev/null +++ b/tests/modules/gatk4/applybqsrspark/test.yml @@ -0,0 +1,29 @@ +- name: gatk4 applybqsr test_gatk4_applybqsr_spark + command: nextflow run tests/modules/gatk4/applybqsrspark -entry test_gatk4_applybqsr_spark -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsrspark/nextflow.config + tags: + - gatk4 + - gatk4/applybqsrspark + files: + - path: output/gatk4/test.bam + md5sum: 1901c819fcba0fdd5e2482e6dc8285ef + - path: output/gatk4/versions.yml + +- name: gatk4 applybqsr test_gatk4_applybqsr_spark_intervals + command: nextflow run tests/modules/gatk4/applybqsrspark -entry test_gatk4_applybqsr_spark_intervals -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsrspark/nextflow.config + tags: + - gatk4 + - gatk4/applybqsrspark + files: + - path: output/gatk4/test.bam + md5sum: 2ca2446f0125890280056fd7da822732 + - path: output/gatk4/versions.yml + +- name: gatk4 applybqsr test_gatk4_applybqsr_spark_cram + command: nextflow run tests/modules/gatk4/applybqsrspark -entry test_gatk4_applybqsr_spark_cram -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsrspark/nextflow.config + tags: + - gatk4 + - gatk4/applybqsrspark + files: + - path: output/gatk4/test.cram + md5sum: 60f7c822a9f2833e11eb7bfd16e4421f + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/applyvqsr/main.nf b/tests/modules/gatk4/applyvqsr/main.nf index 90a57aaa..c6e99d5c 100644 --- a/tests/modules/gatk4/applyvqsr/main.nf +++ b/tests/modules/gatk4/applyvqsr/main.nf @@ -2,7 +2,8 @@ nextflow.enable.dsl = 2 -include { GATK4_APPLYVQSR } from '../../../../modules/gatk4/applyvqsr/main.nf' +include { GATK4_APPLYVQSR as GATK4_APPLYVQSR_NO_ALLELSPECIFICITY } from '../../../../modules/gatk4/applyvqsr/main.nf' +include { GATK4_APPLYVQSR as GATK4_APPLYVQSR_WITH_ALLELSPECIFICITY} from '../../../../modules/gatk4/applyvqsr/main.nf' workflow test_gatk4_applyvqsr { input = [ [ id:'test'], // meta map @@ -15,11 +16,8 @@ workflow test_gatk4_applyvqsr { fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - allelespecific = false - truthsensitivity = '99.0' - mode = 'SNP' - GATK4_APPLYVQSR ( input, fasta, fai, dict, allelespecific, truthsensitivity, mode ) + GATK4_APPLYVQSR_NO_ALLELSPECIFICITY ( input, fasta, fai, dict ) } workflow test_gatk4_applyvqsr_allele_specific { @@ -33,9 +31,6 @@ workflow test_gatk4_applyvqsr_allele_specific { fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - allelespecific = true - truthsensitivity = '99.0' - mode = 'SNP' - GATK4_APPLYVQSR ( input, fasta, fai, dict, allelespecific, truthsensitivity, mode ) + GATK4_APPLYVQSR_WITH_ALLELSPECIFICITY ( input, fasta, fai, dict) } diff --git a/tests/modules/gatk4/applyvqsr/nextflow.config b/tests/modules/gatk4/applyvqsr/nextflow.config index 19934e76..bf943c23 100644 --- a/tests/modules/gatk4/applyvqsr/nextflow.config +++ b/tests/modules/gatk4/applyvqsr/nextflow.config @@ -1,5 +1,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: GATK4_APPLYVQSR_NO_ALLELSPECIFICITY { + ext.args = '--mode SNP --truth-sensitivity-filter-level 99.0' + } -} \ No newline at end of file + withName: GATK4_APPLYVQSR_WITH_ALLELSPECIFICITY { + ext.args = '--mode SNP --truth-sensitivity-filter-level 99.0 -AS' + } +} diff --git a/tests/modules/gatk4/applyvqsr/test.yml b/tests/modules/gatk4/applyvqsr/test.yml index b2acc6d8..5b367bcc 100644 --- a/tests/modules/gatk4/applyvqsr/test.yml +++ b/tests/modules/gatk4/applyvqsr/test.yml @@ -7,7 +7,6 @@ - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml - md5sum: 524a78cdfa56c8b09a4ff3f4cb278261 - name: gatk4 applyvqsr test_gatk4_applyvqsr_allele_specific command: nextflow run tests/modules/gatk4/applyvqsr -entry test_gatk4_applyvqsr_allele_specific -c tests/config/nextflow.config -c ./tests/modules/gatk4/applyvqsr/nextflow.config @@ -18,4 +17,3 @@ - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml - md5sum: 7a3c6e97628bd1f5f4e7fd429bf74a8e diff --git a/tests/modules/gatk4/baserecalibrator/test.yml b/tests/modules/gatk4/baserecalibrator/test.yml index 163fac08..ec103dd4 100644 --- a/tests/modules/gatk4/baserecalibrator/test.yml +++ b/tests/modules/gatk4/baserecalibrator/test.yml @@ -6,6 +6,7 @@ files: - path: output/gatk4/test.table md5sum: e2e43abdc0c943c1a54dae816d0b9ea7 + - path: output/gatk4/versions.yml - name: gatk4 baserecalibrator test_gatk4_baserecalibrator_cram command: nextflow run ./tests/modules/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator_cram -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibrator/nextflow.config @@ -15,6 +16,7 @@ files: - path: output/gatk4/test.table md5sum: 35d89a3811aa31711fc9815b6b80e6ec + - path: output/gatk4/versions.yml - name: gatk4 baserecalibrator test_gatk4_baserecalibrator_intervals command: nextflow run ./tests/modules/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibrator/nextflow.config @@ -24,6 +26,7 @@ files: - path: output/gatk4/test.table md5sum: 9ecb5f00a2229291705addc09c0ec231 + - path: output/gatk4/versions.yml - name: gatk4 baserecalibrator test_gatk4_baserecalibrator_multiple_sites command: nextflow run ./tests/modules/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator_multiple_sites -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibrator/nextflow.config @@ -33,3 +36,4 @@ files: - path: output/gatk4/test.table md5sum: e2e43abdc0c943c1a54dae816d0b9ea7 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/baserecalibratorspark/main.nf b/tests/modules/gatk4/baserecalibratorspark/main.nf new file mode 100644 index 00000000..8419e16b --- /dev/null +++ b/tests/modules/gatk4/baserecalibratorspark/main.nf @@ -0,0 +1,69 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_BASERECALIBRATOR_SPARK } from '../../../../modules/gatk4/baserecalibratorspark/main.nf' + +workflow test_gatk4_baserecalibrator_spark { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + + GATK4_BASERECALIBRATOR_SPARK ( input, fasta, fai, dict, sites, sites_tbi ) +} + +workflow test_gatk4_baserecalibrator_spark_cram { + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + sites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + sites_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + + GATK4_BASERECALIBRATOR_SPARK ( input, fasta, fai, dict, sites, sites_tbi ) +} + +workflow test_gatk4_baserecalibrator_spark_intervals { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + + GATK4_BASERECALIBRATOR_SPARK ( input, fasta, fai, dict, sites, sites_tbi ) +} + +workflow test_gatk4_baserecalibrator_spark_multiple_sites { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + sites = [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) + ] + sites_tbi = [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + ] + + GATK4_BASERECALIBRATOR_SPARK ( input, fasta, fai, dict, sites, sites_tbi ) +} diff --git a/tests/modules/gatk4/baserecalibratorspark/nextflow.config b/tests/modules/gatk4/baserecalibratorspark/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/gatk4/baserecalibratorspark/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/gatk4/baserecalibratorspark/test.yml b/tests/modules/gatk4/baserecalibratorspark/test.yml new file mode 100644 index 00000000..6eb9d91d --- /dev/null +++ b/tests/modules/gatk4/baserecalibratorspark/test.yml @@ -0,0 +1,39 @@ +- name: gatk4 baserecalibrator test_gatk4_baserecalibrator_spark + command: nextflow run ./tests/modules/gatk4/baserecalibratorspark -entry test_gatk4_baserecalibrator_spark -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibratorspark/nextflow.config + tags: + - gatk4 + - gatk4/baserecalibratorspark + files: + - path: output/gatk4/test.table + md5sum: e2e43abdc0c943c1a54dae816d0b9ea7 + - path: output/gatk4/versions.yml + +- name: gatk4 baserecalibrator test_gatk4_baserecalibrator_spark_cram + command: nextflow run ./tests/modules/gatk4/baserecalibratorspark -entry test_gatk4_baserecalibrator_spark_cram -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibratorspark/nextflow.config + tags: + - gatk4 + - gatk4/baserecalibratorspark + files: + - path: output/gatk4/test.table + md5sum: 35d89a3811aa31711fc9815b6b80e6ec + - path: output/gatk4/versions.yml + +- name: gatk4 baserecalibrator test_gatk4_baserecalibrator_spark_intervals + command: nextflow run ./tests/modules/gatk4/baserecalibratorspark -entry test_gatk4_baserecalibrator_spark_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibratorspark/nextflow.config + tags: + - gatk4 + - gatk4/baserecalibratorspark + files: + - path: output/gatk4/test.table + md5sum: 9ecb5f00a2229291705addc09c0ec231 + - path: output/gatk4/versions.yml + +- name: gatk4 baserecalibrator test_gatk4_baserecalibrator_spark_multiple_sites + command: nextflow run ./tests/modules/gatk4/baserecalibratorspark -entry test_gatk4_baserecalibrator_spark_multiple_sites -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/baserecalibratorspark/nextflow.config + tags: + - gatk4 + - gatk4/baserecalibratorspark + files: + - path: output/gatk4/test.table + md5sum: e2e43abdc0c943c1a54dae816d0b9ea7 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/bedtointervallist/test.yml b/tests/modules/gatk4/bedtointervallist/test.yml index 3482fa6c..d8eade51 100644 --- a/tests/modules/gatk4/bedtointervallist/test.yml +++ b/tests/modules/gatk4/bedtointervallist/test.yml @@ -6,3 +6,4 @@ files: - path: output/gatk4/test.interval_list md5sum: e51101c9357fb2d59fd30e370eefa39c + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/calculatecontamination/main.nf b/tests/modules/gatk4/calculatecontamination/main.nf index 4b659ed3..c6e085b1 100644 --- a/tests/modules/gatk4/calculatecontamination/main.nf +++ b/tests/modules/gatk4/calculatecontamination/main.nf @@ -2,7 +2,8 @@ nextflow.enable.dsl = 2 -include { GATK4_CALCULATECONTAMINATION } from '../../../../modules/gatk4/calculatecontamination/main.nf' +include { GATK4_CALCULATECONTAMINATION } from '../../../../modules/gatk4/calculatecontamination/main.nf' +include { GATK4_CALCULATECONTAMINATION as GATK4_CALCULATECONTAMINATION_SEGMENTATION } from '../../../../modules/gatk4/calculatecontamination/main.nf' workflow test_gatk4_calculatecontamination_tumor_only { @@ -10,9 +11,7 @@ workflow test_gatk4_calculatecontamination_tumor_only { file(params.test_data['homo_sapiens']['illumina']['test2_pileups_table'], checkIfExists: true), [] ] - segmentout = false - - GATK4_CALCULATECONTAMINATION ( input, segmentout ) + GATK4_CALCULATECONTAMINATION ( input ) } workflow test_gatk4_calculatecontamination_matched_pair { @@ -21,9 +20,7 @@ workflow test_gatk4_calculatecontamination_matched_pair { file(params.test_data['homo_sapiens']['illumina']['test2_pileups_table'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true) ] - segmentout = false - - GATK4_CALCULATECONTAMINATION ( input, segmentout ) + GATK4_CALCULATECONTAMINATION ( input ) } workflow test_gatk4_calculatecontamination_segmentation { @@ -32,7 +29,5 @@ workflow test_gatk4_calculatecontamination_segmentation { file(params.test_data['homo_sapiens']['illumina']['test2_pileups_table'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true) ] - segmentout = true - - GATK4_CALCULATECONTAMINATION ( input, segmentout ) + GATK4_CALCULATECONTAMINATION_SEGMENTATION ( input ) } diff --git a/tests/modules/gatk4/calculatecontamination/nextflow.config b/tests/modules/gatk4/calculatecontamination/nextflow.config index 8730f1c4..3789a000 100644 --- a/tests/modules/gatk4/calculatecontamination/nextflow.config +++ b/tests/modules/gatk4/calculatecontamination/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: GATK4_CALCULATECONTAMINATION_SEGMENTATION { + ext.args = { "--tumor-segmentation ${meta.id}.segmentation.table" } + } + } diff --git a/tests/modules/gatk4/calculatecontamination/test.yml b/tests/modules/gatk4/calculatecontamination/test.yml index d598d1c0..a00e26f0 100644 --- a/tests/modules/gatk4/calculatecontamination/test.yml +++ b/tests/modules/gatk4/calculatecontamination/test.yml @@ -4,10 +4,9 @@ - gatk4 - gatk4/calculatecontamination files: - - path: output/gatk4/test.contamination.table + - path: output/gatk4/test.contamination.table md5sum: 46c708c943b453da89a3da08acfdb2a7 - - path: output/gatk4/versions.yml - md5sum: 79575dc2e6a7f0361f2d8b090c496070 + - path: output/gatk4/versions.yml - name: gatk4 calculatecontamination test_gatk4_calculatecontamination_matched_pair command: nextflow run tests/modules/gatk4/calculatecontamination -entry test_gatk4_calculatecontamination_matched_pair -c tests/config/nextflow.config -c ./tests/modules/gatk4/calculatecontamination/nextflow.config @@ -15,10 +14,9 @@ - gatk4 - gatk4/calculatecontamination files: - - path: output/gatk4/test.contamination.table + - path: output/gatk4/test.contamination.table md5sum: 46c708c943b453da89a3da08acfdb2a7 - - path: output/gatk4/versions.yml - md5sum: 733f15ef7eb504daec9fd8cd9beef71a + - path: output/gatk4/versions.yml - name: gatk4 calculatecontamination test_gatk4_calculatecontamination_segmentation command: nextflow run tests/modules/gatk4/calculatecontamination -entry test_gatk4_calculatecontamination_segmentation -c tests/config/nextflow.config -c ./tests/modules/gatk4/calculatecontamination/nextflow.config @@ -26,9 +24,8 @@ - gatk4 - gatk4/calculatecontamination files: - - path: output/gatk4/test.contamination.table + - path: output/gatk4/test.contamination.table md5sum: 46c708c943b453da89a3da08acfdb2a7 - - path: output/gatk4/test.segmentation.table + - path: output/gatk4/test.segmentation.table md5sum: f4643d9319bde4efbfbe516d6fb13052 - - path: output/gatk4/versions.yml - md5sum: 5396e33146addbe4a59d0f30cb573a3a + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/combinegvcfs/main.nf b/tests/modules/gatk4/combinegvcfs/main.nf new file mode 100644 index 00000000..50d42625 --- /dev/null +++ b/tests/modules/gatk4/combinegvcfs/main.nf @@ -0,0 +1,24 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_COMBINEGVCFS } from '../../../../modules/gatk4/combinegvcfs/main.nf' + +workflow test_gatk4_combinegvcfs { + + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_genome_vcf'], checkIfExists: true) ], + [ file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_genome_vcf_idx'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + fasta_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + fasta_dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_COMBINEGVCFS ( input, fasta, fasta_fai, fasta_dict ) +} + diff --git a/tests/modules/gatk4/combinegvcfs/nextflow.config b/tests/modules/gatk4/combinegvcfs/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/gatk4/combinegvcfs/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/gatk4/combinegvcfs/test.yml b/tests/modules/gatk4/combinegvcfs/test.yml new file mode 100644 index 00000000..762a72f3 --- /dev/null +++ b/tests/modules/gatk4/combinegvcfs/test.yml @@ -0,0 +1,9 @@ +- name: gatk4 combinegvcfs test_gatk4_combinegvcfs + command: nextflow run tests/modules/gatk4/combinegvcfs -entry test_gatk4_combinegvcfs -c tests/config/nextflow.config + tags: + - gatk4 + - gatk4/combinegvcfs + files: + - path: output/gatk4/test.combined.g.vcf.gz + contains: ["VCFv4.2"] + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/createsequencedictionary/test.yml b/tests/modules/gatk4/createsequencedictionary/test.yml index 134a9d74..3656e0e2 100644 --- a/tests/modules/gatk4/createsequencedictionary/test.yml +++ b/tests/modules/gatk4/createsequencedictionary/test.yml @@ -6,3 +6,4 @@ files: - path: output/gatk4/genome.dict md5sum: 7362679f176e0f52add03c08f457f646 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/createsomaticpanelofnormals/main.nf b/tests/modules/gatk4/createsomaticpanelofnormals/main.nf index 5e1d1904..3316f73a 100644 --- a/tests/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/tests/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -6,12 +6,12 @@ include { UNTAR } from '../../../../modules/untar/main.nf' include { GATK4_CREATESOMATICPANELOFNORMALS } from '../../../../modules/gatk4/createsomaticpanelofnormals/main.nf' workflow test_gatk4_createsomaticpanelofnormals { - db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + db = [[], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( db ) input = Channel.of([ id:'test']) - .combine(UNTAR.out.untar) + .combine(UNTAR.out.untar.map{ it[1] }) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fastaidx = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/gatk4/createsomaticpanelofnormals/test.yml b/tests/modules/gatk4/createsomaticpanelofnormals/test.yml index a0e2bf26..00d8cae9 100644 --- a/tests/modules/gatk4/createsomaticpanelofnormals/test.yml +++ b/tests/modules/gatk4/createsomaticpanelofnormals/test.yml @@ -7,3 +7,4 @@ - path: output/gatk4/test.pon.vcf.gz - path: output/gatk4/test.pon.vcf.gz.tbi md5sum: e7ca7e9fe76ce12198fd54ec9a64fad4 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/estimatelibrarycomplexity/test.yml b/tests/modules/gatk4/estimatelibrarycomplexity/test.yml index a33e4ec1..cf5d187f 100644 --- a/tests/modules/gatk4/estimatelibrarycomplexity/test.yml +++ b/tests/modules/gatk4/estimatelibrarycomplexity/test.yml @@ -5,3 +5,4 @@ - gatk4 files: - path: output/gatk4/test.metrics + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/fastqtosam/test.yml b/tests/modules/gatk4/fastqtosam/test.yml index 7f6357e8..f4b2c561 100644 --- a/tests/modules/gatk4/fastqtosam/test.yml +++ b/tests/modules/gatk4/fastqtosam/test.yml @@ -6,7 +6,6 @@ files: - path: output/gatk4/test.bam - path: output/gatk4/versions.yml - md5sum: 03f3accdc3e3c392c1179213286a0b67 - name: gatk4 fastqtosam test_gatk4_fastqtosam_paired_end command: nextflow run tests/modules/gatk4/fastqtosam -entry test_gatk4_fastqtosam_paired_end -c tests/config/nextflow.config -c ./tests/modules/gatk4/fastqtosam/nextflow.config @@ -16,4 +15,3 @@ files: - path: output/gatk4/test.bam - path: output/gatk4/versions.yml - md5sum: 144e7118d5f277ad5fba863213c810b0 diff --git a/tests/modules/gatk4/filtermutectcalls/test.yml b/tests/modules/gatk4/filtermutectcalls/test.yml index 12cf4e69..6f650f32 100644 --- a/tests/modules/gatk4/filtermutectcalls/test.yml +++ b/tests/modules/gatk4/filtermutectcalls/test.yml @@ -8,6 +8,7 @@ - path: output/gatk4/test.filtered.vcf.gz.filteringStats.tsv md5sum: 55f228e5520c8b9fbac017d3a3a6c5fd - path: output/gatk4/test.filtered.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 filtermutectcalls test_gatk4_filtermutectcalls_with_files command: nextflow run ./tests/modules/gatk4/filtermutectcalls -entry test_gatk4_filtermutectcalls_with_files -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/filtermutectcalls/nextflow.config @@ -19,6 +20,7 @@ - path: output/gatk4/test.filtered.vcf.gz.filteringStats.tsv md5sum: 9ae27fbd04af1a2ea574e2ff1c3a683b - path: output/gatk4/test.filtered.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 filtermutectcalls test_gatk4_filtermutectcalls_use_val command: nextflow run ./tests/modules/gatk4/filtermutectcalls -entry test_gatk4_filtermutectcalls_use_val -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/filtermutectcalls/nextflow.config @@ -30,3 +32,4 @@ - path: output/gatk4/test.filtered.vcf.gz.filteringStats.tsv md5sum: 95cc3e37705bd3b97a292c5d46ab82f3 - path: output/gatk4/test.filtered.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/gatherbqsrreports/test.yml b/tests/modules/gatk4/gatherbqsrreports/test.yml index 521f2197..2fb4917a 100644 --- a/tests/modules/gatk4/gatherbqsrreports/test.yml +++ b/tests/modules/gatk4/gatherbqsrreports/test.yml @@ -7,7 +7,6 @@ - path: output/gatk4/test.table md5sum: 9603b69fdc3b5090de2e0dd78bfcc4bf - path: output/gatk4/versions.yml - md5sum: b53101f71b0763e80855703ba4e1f101 - name: gatk4 gatherbqsrreports test_gatk4_gatherbqsrreports_multiple command: nextflow run tests/modules/gatk4/gatherbqsrreports -entry test_gatk4_gatherbqsrreports_multiple -c tests/config/nextflow.config @@ -18,4 +17,3 @@ - path: output/gatk4/test.table md5sum: 0c1257eececf95db8ca378272d0f21f9 - path: output/gatk4/versions.yml - md5sum: 584a6ebf04f54abcfcf4c8255e13ff2a diff --git a/tests/modules/gatk4/gatherpileupsummaries/main.nf b/tests/modules/gatk4/gatherpileupsummaries/main.nf new file mode 100644 index 00000000..2bd7e98c --- /dev/null +++ b/tests/modules/gatk4/gatherpileupsummaries/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_GATHERPILEUPSUMMARIES } from '../../../../modules/gatk4/gatherpileupsummaries/main.nf' + +workflow test_gatk4_gatherpileupsummaries { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true)] + //file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true)] + ] + + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + + GATK4_GATHERPILEUPSUMMARIES ( input, dict ) +} diff --git a/tests/modules/gatk4/gatherpileupsummaries/nextflow.config b/tests/modules/gatk4/gatherpileupsummaries/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/gatk4/gatherpileupsummaries/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/gatk4/gatherpileupsummaries/test.yml b/tests/modules/gatk4/gatherpileupsummaries/test.yml new file mode 100644 index 00000000..efd02f52 --- /dev/null +++ b/tests/modules/gatk4/gatherpileupsummaries/test.yml @@ -0,0 +1,9 @@ +- name: gatk4 gatherpileupsummaries + command: nextflow run ./tests/modules/gatk4/gatherpileupsummaries -entry test_gatk4_gatherpileupsummaries -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/gatherpileupsummaries/nextflow.config + tags: + - gatk4 + - gatk4/gatherpileupsummaries + files: + - path: output/gatk4/test.pileupsummaries.table + md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/genomicsdbimport/main.nf b/tests/modules/gatk4/genomicsdbimport/main.nf index 417a08a4..6d990f4e 100644 --- a/tests/modules/gatk4/genomicsdbimport/main.nf +++ b/tests/modules/gatk4/genomicsdbimport/main.nf @@ -22,7 +22,7 @@ workflow test_gatk4_genomicsdbimport_create_genomicsdb { } workflow test_gatk4_genomicsdbimport_get_intervalslist { - db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + db = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( db ) @@ -31,7 +31,7 @@ workflow test_gatk4_genomicsdbimport_get_intervalslist { [] , [] , [] ]) - .combine(UNTAR.out.untar) + .combine(UNTAR.out.untar.map{ it[1] }) run_intlist = true run_updatewspace = false @@ -41,7 +41,7 @@ workflow test_gatk4_genomicsdbimport_get_intervalslist { } workflow test_gatk4_genomicsdbimport_update_genomicsdb { - db = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + db = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( db ) @@ -50,7 +50,7 @@ workflow test_gatk4_genomicsdbimport_update_genomicsdb { file( params.test_data['homo_sapiens']['illumina']['test2_genome_vcf_gz_tbi'] , checkIfExists: true) , [] , [] ]) - .combine(UNTAR.out.untar) + .combine(UNTAR.out.untar.map{ it[1] }) run_intlist = false run_updatewspace = true diff --git a/tests/modules/gatk4/genomicsdbimport/test.yml b/tests/modules/gatk4/genomicsdbimport/test.yml index d1a8f073..765cbfbe 100644 --- a/tests/modules/gatk4/genomicsdbimport/test.yml +++ b/tests/modules/gatk4/genomicsdbimport/test.yml @@ -5,11 +5,9 @@ - gatk4/genomicsdbimport files: - path: output/gatk4/test/__tiledb_workspace.tdb - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/gatk4/test/callset.json md5sum: a7d07d1c86449bbb1091ff29368da07a - path: output/gatk4/test/chr22$1$40001/.__consolidation_lock - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/gatk4/test/chr22$1$40001/__array_schema.tdb - path: output/gatk4/test/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json md5sum: 2502f79658bc000578ebcfddfc1194c0 @@ -19,7 +17,6 @@ - path: output/gatk4/test/vidmap.json md5sum: 18d3f68bd2cb6f4474990507ff95017a - path: output/gatk4/versions.yml - md5sum: 6fffaf981f099659cf820277d1f3c606 - name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_get_intervalslist command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_get_intervalslist -c tests/config/nextflow.config -c ./tests/modules/gatk4/genomicsdbimport/nextflow.config @@ -30,9 +27,7 @@ - path: output/gatk4/test.interval_list md5sum: 4c85812ac15fc1cd29711a851d23c0bf - path: output/gatk4/versions.yml - md5sum: 4a56022d6e08d54e8ba853637bf3b5f1 - path: output/untar/versions.yml - md5sum: 8f080677b109aea2cfca50208b077534 - name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_update_genomicsdb command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_update_genomicsdb -c tests/config/nextflow.config -c ./tests/modules/gatk4/genomicsdbimport/nextflow.config @@ -41,11 +36,9 @@ - gatk4/genomicsdbimport files: - path: output/gatk4/test_genomicsdb/__tiledb_workspace.tdb - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/gatk4/test_genomicsdb/callset.json md5sum: 1ea31b59b9a218dd5681164aff4a5e07 - path: output/gatk4/test_genomicsdb/chr22$1$40001/.__consolidation_lock - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/gatk4/test_genomicsdb/chr22$1$40001/__array_schema.tdb md5sum: 6709e67921ae840bf61fbfb192554eda - path: output/gatk4/test_genomicsdb/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json @@ -55,6 +48,4 @@ - path: output/gatk4/test_genomicsdb/vidmap.json md5sum: 18d3f68bd2cb6f4474990507ff95017a - path: output/gatk4/versions.yml - md5sum: da6a815b7340683b1a56bdfd7e66d463 - path: output/untar/versions.yml - md5sum: 9b2916aea9790bdf427c0cb38109110c diff --git a/tests/modules/gatk4/genotypegvcfs/main.nf b/tests/modules/gatk4/genotypegvcfs/main.nf index 6191df26..cd7d3a03 100644 --- a/tests/modules/gatk4/genotypegvcfs/main.nf +++ b/tests/modules/gatk4/genotypegvcfs/main.nf @@ -9,162 +9,174 @@ include { UNTAR } from '../../../../modules/untar/main.nf' workflow test_gatk4_genotypegvcfs_vcf_input { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true), - [] - ] + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true), + [], + [] + ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], []) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) } // Basic parameters with compressed VCF input workflow test_gatk4_genotypegvcfs_gz_input { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - [] - ] + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), + [], + [] + ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], []) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) } // Basic parameters + optional dbSNP workflow test_gatk4_genotypegvcfs_gz_input_dbsnp { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - [] - ] + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), + [], + [] + ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi) } // Basic parameters + optional intervals workflow test_gatk4_genotypegvcfs_gz_input_intervals { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) , + [] + ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], []) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) } // Basic parameters + optional dbSNP + optional intervals workflow test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) - ] + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true), + [] + ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex ) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi ) } // Basic parameters with GenomicsDB input workflow test_gatk4_genotypegvcfs_gendb_input { - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.collect() + gendb = UNTAR.out.untar.map{ it[1] }.collect() + gendb.add([]) gendb.add([]) gendb.add([]) input = Channel.of([ id:'test' ]).combine(gendb) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], []) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) } // Basic parameters with GenomicsDB + optional dbSNP workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp { - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.collect() + gendb = UNTAR.out.untar.map{ it[1] }.collect() + gendb.add([]) gendb.add([]) gendb.add([]) input = Channel.of([ id:'test' ]).combine(gendb) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi) } // Basic parameters with GenomicsDB + optional intervals workflow test_gatk4_genotypegvcfs_gendb_input_intervals { - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.collect() + gendb = UNTAR.out.untar.map{ it[1] }.collect() gendb.add([]) gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]) + gendb.add([]) + input = Channel.of([ id:'test' ]).combine(gendb) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [] ) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], [] ) } // Basic parameters with GenomicsDB + optional dbSNP + optional intervals workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals { - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) + test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.collect() + gendb = UNTAR.out.untar.map{ it[1] }.collect() gendb.add([]) gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]) + gendb.add([]) + input = Channel.of([ id:'test' ]).combine(gendb) - GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex ) + GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi ) } diff --git a/tests/modules/gatk4/genotypegvcfs/test.yml b/tests/modules/gatk4/genotypegvcfs/test.yml index 128a2238..ec8ee951 100644 --- a/tests/modules/gatk4/genotypegvcfs/test.yml +++ b/tests/modules/gatk4/genotypegvcfs/test.yml @@ -5,8 +5,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -15,8 +19,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_dbsnp command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_dbsnp -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -25,8 +33,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_intervals command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -35,8 +47,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -45,8 +61,9 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=2;AF=1.00;AN=2;DB;DP=20;ExcessHet=0.0000;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=60.00;QD=24.05;SOR=0.693'] + contains: ["AC=2;AF=1.00;AN=2;DB;DP=20;ExcessHet=0.0000;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=60.00;QD=24.05;SOR=0.693"] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -55,8 +72,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_dbsnp command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_dbsnp -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -65,8 +86,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_intervals command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -75,8 +100,12 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680'] + contains: + [ + "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", + ] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals command: nextflow run ./tests/modules/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -85,5 +114,6 @@ - gatk4/genotypegvcfs files: - path: output/gatk4/test.genotyped.vcf.gz - contains: ['AC=2;AF=1.00;AN=2;DP=2;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;QD=18.66;SOR=0.693'] + contains: ["AC=2;AF=1.00;AN=2;DP=2;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;QD=18.66;SOR=0.693"] - path: output/gatk4/test.genotyped.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/getpileupsummaries/main.nf b/tests/modules/gatk4/getpileupsummaries/main.nf index 54a9b1f5..2a53e35e 100644 --- a/tests/modules/gatk4/getpileupsummaries/main.nf +++ b/tests/modules/gatk4/getpileupsummaries/main.nf @@ -4,28 +4,34 @@ nextflow.enable.dsl = 2 include { GATK4_GETPILEUPSUMMARIES } from '../../../../modules/gatk4/getpileupsummaries/main.nf' -workflow test_gatk4_getpileupsummaries_just_variants { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true) , - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) ] - - variants = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - variants_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - sites = [] - - GATK4_GETPILEUPSUMMARIES ( input , variants , variants_tbi , sites ) -} workflow test_gatk4_getpileupsummaries_separate_sites { input = [ [ id:'test' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true) , - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true) ] variants = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) variants_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - sites = file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true) - - GATK4_GETPILEUPSUMMARIES ( input , variants , variants_tbi , sites ) + fasta = [] + fai = [] + dict = [] + GATK4_GETPILEUPSUMMARIES ( input , fasta, fai, dict, variants , variants_tbi) +} + +workflow test_gatk4_getpileupsummaries_separate_sites_cram { + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true) , + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true) + ] + + variants = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + variants_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + GATK4_GETPILEUPSUMMARIES ( input , fasta, fai, dict, variants , variants_tbi) } diff --git a/tests/modules/gatk4/getpileupsummaries/test.yml b/tests/modules/gatk4/getpileupsummaries/test.yml index 65ea30e7..2529fbc5 100644 --- a/tests/modules/gatk4/getpileupsummaries/test.yml +++ b/tests/modules/gatk4/getpileupsummaries/test.yml @@ -1,17 +1,19 @@ -- name: gatk4 getpileupsummaries test_gatk4_getpileupsummaries_just_variants - command: nextflow run ./tests/modules/gatk4/getpileupsummaries -entry test_gatk4_getpileupsummaries_just_variants -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/getpileupsummaries/nextflow.config - tags: - - gatk4 - - gatk4/getpileupsummaries - files: - - path: output/gatk4/test.pileups.table - md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469 - - name: gatk4 getpileupsummaries test_gatk4_getpileupsummaries_separate_sites - command: nextflow run ./tests/modules/gatk4/getpileupsummaries -entry test_gatk4_getpileupsummaries_separate_sites -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/getpileupsummaries/nextflow.config + command: nextflow run tests/modules/gatk4/getpileupsummaries -entry test_gatk4_getpileupsummaries_separate_sites -c tests/config/nextflow.config tags: - - gatk4 - gatk4/getpileupsummaries + - gatk4 files: - path: output/gatk4/test.pileups.table md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469 + - path: output/gatk4/versions.yml + +- name: gatk4 getpileupsummaries test_gatk4_getpileupsummaries_separate_sites_cram + command: nextflow run tests/modules/gatk4/getpileupsummaries -entry test_gatk4_getpileupsummaries_separate_sites_cram -c tests/config/nextflow.config + tags: + - gatk4/getpileupsummaries + - gatk4 + files: + - path: output/gatk4/test.pileups.table + md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/haplotypecaller/test.yml b/tests/modules/gatk4/haplotypecaller/test.yml index 31dd23fd..3d416a0d 100644 --- a/tests/modules/gatk4/haplotypecaller/test.yml +++ b/tests/modules/gatk4/haplotypecaller/test.yml @@ -6,6 +6,7 @@ files: - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 haplotypecaller test_gatk4_haplotypecaller_cram command: nextflow run ./tests/modules/gatk4/haplotypecaller -entry test_gatk4_haplotypecaller_cram -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/haplotypecaller/nextflow.config @@ -15,6 +16,7 @@ files: - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 haplotypecaller test_gatk4_haplotypecaller_intervals_dbsnp command: nextflow run ./tests/modules/gatk4/haplotypecaller -entry test_gatk4_haplotypecaller_intervals_dbsnp -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/haplotypecaller/nextflow.config @@ -24,3 +26,4 @@ files: - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/indexfeaturefile/test.yml b/tests/modules/gatk4/indexfeaturefile/test.yml index 04c71ea2..9187fa4a 100644 --- a/tests/modules/gatk4/indexfeaturefile/test.yml +++ b/tests/modules/gatk4/indexfeaturefile/test.yml @@ -5,6 +5,7 @@ - gatk4/indexfeaturefile files: - path: output/gatk4/genome.bed.idx + - path: output/gatk4/versions.yml - name: gatk4 indexfeaturefile test_gatk4_indexfeaturefile_bed_gz command: nextflow run tests/modules/gatk4/indexfeaturefile -entry test_gatk4_indexfeaturefile_bed_gz -c tests/config/nextflow.config -c ./tests/modules/gatk4/indexfeaturefile/nextflow.config @@ -15,7 +16,6 @@ - path: output/gatk4/genome.bed.gz.tbi md5sum: 4bc51e2351a6e83f20e13be75861f941 - path: output/gatk4/versions.yml - md5sum: 9eb24dc17c96971b7991b3e154279aa7 - name: gatk4 indexfeaturefile test_gatk4_indexfeaturefile_vcf command: nextflow run tests/modules/gatk4/indexfeaturefile -entry test_gatk4_indexfeaturefile_vcf -c tests/config/nextflow.config -c ./tests/modules/gatk4/indexfeaturefile/nextflow.config @@ -25,7 +25,6 @@ files: - path: output/gatk4/test.genome.vcf.idx - path: output/gatk4/versions.yml - md5sum: f76543e715342bf1fcdeb20385e01fe9 - name: gatk4 indexfeaturefile test_gatk4_indexfeaturefile_vcf_gz command: nextflow run tests/modules/gatk4/indexfeaturefile -entry test_gatk4_indexfeaturefile_vcf_gz -c tests/config/nextflow.config @@ -36,4 +35,3 @@ - path: output/gatk4/test.genome.vcf.gz.tbi md5sum: fedd68eaddf8d31257853d9da8325bd3 - path: output/gatk4/versions.yml - md5sum: a5d988cf62648f700ffac7257e72b2c0 diff --git a/tests/modules/gatk4/intervallisttobed/main.nf b/tests/modules/gatk4/intervallisttobed/main.nf new file mode 100644 index 00000000..2963979f --- /dev/null +++ b/tests/modules/gatk4/intervallisttobed/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_INTERVALLISTTOBED } from '../../../../modules/gatk4/intervallisttobed/main.nf' + +workflow test_gatk4_intervallisttobed { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true) + ] + + GATK4_INTERVALLISTTOBED ( input ) +} diff --git a/tests/modules/gatk4/intervallisttobed/nextflow.config b/tests/modules/gatk4/intervallisttobed/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/gatk4/intervallisttobed/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/gatk4/intervallisttobed/test.yml b/tests/modules/gatk4/intervallisttobed/test.yml new file mode 100644 index 00000000..a148f745 --- /dev/null +++ b/tests/modules/gatk4/intervallisttobed/test.yml @@ -0,0 +1,9 @@ +- name: gatk4 intervallisttobed + command: nextflow run ./tests/modules/gatk4/intervallisttobed -entry test_gatk4_intervallisttobed -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/intervallisttobed/nextflow.config + tags: + - gatk4 + - gatk4/intervallisttobed + files: + - path: output/gatk4/test.bed + md5sum: 9046675d01199fbbee79f2bc1c5dce52 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/intervallisttools/test.yml b/tests/modules/gatk4/intervallisttools/test.yml index c9cb23b8..89367a09 100644 --- a/tests/modules/gatk4/intervallisttools/test.yml +++ b/tests/modules/gatk4/intervallisttools/test.yml @@ -7,10 +7,11 @@ - path: output/gatk4/test.interval_list md5sum: e51101c9357fb2d59fd30e370eefa39c - path: output/gatk4/test_split/temp_0001_of_6/1scattered.interval_list - md5sum: b8ba8a387200df76a0d1c577626dc265 + md5sum: 39385d38ac6cb7c05190026fc3b81411 - path: output/gatk4/test_split/temp_0002_of_6/2scattered.interval_list - md5sum: 0728d164666d9264ef442a493e008dee + md5sum: 59f1978c5f4ef3fce3b110816283d9f5 - path: output/gatk4/test_split/temp_0003_of_6/3scattered.interval_list - md5sum: 55da0f3c69504148f4e7002a0e072cfe + md5sum: 709fe81bfcf700bd80d96c62a71629fd - path: output/gatk4/test_split/temp_0004_of_6/4scattered.interval_list - md5sum: d29ca4447f32547f2936567fa902796a + md5sum: c24044490cfedbcba61dbc646d3aa570 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/learnreadorientationmodel/test.yml b/tests/modules/gatk4/learnreadorientationmodel/test.yml index b88df15f..d3d64c50 100644 --- a/tests/modules/gatk4/learnreadorientationmodel/test.yml +++ b/tests/modules/gatk4/learnreadorientationmodel/test.yml @@ -5,3 +5,4 @@ - gatk4/learnreadorientationmodel files: - path: output/gatk4/test.artifact-prior.tar.gz + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/markduplicates/nextflow.config b/tests/modules/gatk4/markduplicates/nextflow.config index 8730f1c4..787c9589 100644 --- a/tests/modules/gatk4/markduplicates/nextflow.config +++ b/tests/modules/gatk4/markduplicates/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: GATK4_MARKDUPLICATES { + ext.args = '--CREATE_INDEX true' + } + } diff --git a/tests/modules/gatk4/markduplicates/test.yml b/tests/modules/gatk4/markduplicates/test.yml index 333de7c9..d3a9f269 100644 --- a/tests/modules/gatk4/markduplicates/test.yml +++ b/tests/modules/gatk4/markduplicates/test.yml @@ -7,10 +7,9 @@ - path: output/gatk4/test.bai md5sum: c8f7a9e426c768577f88f59cb1336bf3 - path: output/gatk4/test.bam - md5sum: fba0c99a0b087c90113a210e4465f91b + md5sum: 58533ddab47f7ac07f7b10e7f4aac234 - path: output/gatk4/test.metrics - path: output/gatk4/versions.yml - md5sum: dacbab0e112d2403b09df138d4e62895 - name: gatk4 markduplicates test_gatk4_markduplicates_multiple_bams command: nextflow run tests/modules/gatk4/markduplicates -entry test_gatk4_markduplicates_multiple_bams -c tests/config/nextflow.config -c ./tests/modules/gatk4/markduplicates/nextflow.config @@ -19,9 +18,8 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: 325932c51f6898b02dfec469c984ba28 + md5sum: bad71df9c876e72a5bc0a3e0fd755f92 - path: output/gatk4/test.bam - md5sum: f7cba8104e3a7024a5e00c02304f7dea + md5sum: 112580c24b43331950f24f9adea30788 - path: output/gatk4/test.metrics - path: output/gatk4/versions.yml - md5sum: 14d0d085df7d2f9e770578d92c329299 diff --git a/tests/modules/gatk4/markduplicatesspark/main.nf b/tests/modules/gatk4/markduplicatesspark/main.nf new file mode 100644 index 00000000..2f294f59 --- /dev/null +++ b/tests/modules/gatk4/markduplicatesspark/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_MARKDUPLICATES_SPARK } from '../../../../modules/gatk4/markduplicatesspark/main.nf' + +workflow test_gatk4_markduplicates_spark { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + + GATK4_MARKDUPLICATES_SPARK ( input, fasta, fai, dict ) +} + +workflow test_gatk4_markduplicates_spark_multiple_bams { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + + GATK4_MARKDUPLICATES_SPARK ( input, fasta, fai, dict ) +} diff --git a/tests/modules/gatk4/markduplicatesspark/nextflow.config b/tests/modules/gatk4/markduplicatesspark/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/gatk4/markduplicatesspark/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/gatk4/markduplicatesspark/test.yml b/tests/modules/gatk4/markduplicatesspark/test.yml new file mode 100644 index 00000000..b0c0b40d --- /dev/null +++ b/tests/modules/gatk4/markduplicatesspark/test.yml @@ -0,0 +1,25 @@ +- name: gatk4 markduplicates test_gatk4_markduplicates_spark + command: nextflow run tests/modules/gatk4/markduplicatesspark -entry test_gatk4_markduplicates_spark -c tests/config/nextflow.config -c ./tests/modules/gatk4/markduplicatesspark/nextflow.config + tags: + - gatk4 + - gatk4/markduplicatesspark + files: + - path: output/gatk4/test.bai + md5sum: e9c125e82553209933883b4fe2b8d7c2 + - path: output/gatk4/test.bam + md5sum: 2efd50b2e6b7fd9bdf242cd9e266cfa9 + - path: output/gatk4/test.metrics + - path: output/gatk4/versions.yml + +- name: gatk4 markduplicates test_gatk4_markduplicates_spark_multiple_bams + command: nextflow run tests/modules/gatk4/markduplicatesspark -entry test_gatk4_markduplicates_spark_multiple_bams -c tests/config/nextflow.config -c ./tests/modules/gatk4/markduplicatesspark/nextflow.config + tags: + - gatk4 + - gatk4/markduplicatesspark + files: + - path: output/gatk4/test.bai + md5sum: bad71df9c876e72a5bc0a3e0fd755f92 + - path: output/gatk4/test.bam + md5sum: 8187febc6108ffef7f907e89b9c091a4 + - path: output/gatk4/test.metrics + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 8a38c129..d0949a52 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -14,3 +14,14 @@ workflow test_gatk4_mergebamalignment { GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } + +workflow test_gatk4_mergebamalignment_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) +} diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index 5e1ab8d5..01d9bf46 100644 --- a/tests/modules/gatk4/mergebamalignment/test.yml +++ b/tests/modules/gatk4/mergebamalignment/test.yml @@ -6,3 +6,13 @@ files: - path: output/gatk4/test.bam md5sum: e6f1b343700b7ccb94e81ae127433988 + - path: output/gatk4/versions.yml + +- name: gatk4 mergebamalignment test_gatk4_mergebamalignment_stubs + command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mergebamalignment + files: + - path: output/gatk4/test.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mergemutectstats/main.nf b/tests/modules/gatk4/mergemutectstats/main.nf new file mode 100644 index 00000000..bf65a6a6 --- /dev/null +++ b/tests/modules/gatk4/mergemutectstats/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_MERGEMUTECTSTATS } from '../../../../modules/gatk4/mergemutectstats/main.nf' + +workflow test_gatk4_mergemutectstats { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_test2_paired_mutect2_calls_vcf_gz_stats'], checkIfExists: true) + ] + + GATK4_MERGEMUTECTSTATS ( input ) +} diff --git a/tests/modules/gatk4/mergemutectstats/nextflow.config b/tests/modules/gatk4/mergemutectstats/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/gatk4/mergemutectstats/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/gatk4/mergemutectstats/test.yml b/tests/modules/gatk4/mergemutectstats/test.yml new file mode 100644 index 00000000..cc71854e --- /dev/null +++ b/tests/modules/gatk4/mergemutectstats/test.yml @@ -0,0 +1,9 @@ +- name: gatk4 mergemutectstats + command: nextflow run ./tests/modules/gatk4/mergemutectstats -entry test_gatk4_mergemutectstats -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergemutectstats/nextflow.config + tags: + - gatk4 + - gatk4/mergemutectstats + files: + - path: output/gatk4/test.vcf.gz.stats + md5sum: 17d2091015d04cbd4a26b7a67dc659e6 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mergevcfs/main.nf b/tests/modules/gatk4/mergevcfs/main.nf index fa09d758..99a2158d 100644 --- a/tests/modules/gatk4/mergevcfs/main.nf +++ b/tests/modules/gatk4/mergevcfs/main.nf @@ -5,22 +5,22 @@ nextflow.enable.dsl = 2 include { GATK4_MERGEVCFS } from '../../../../modules/gatk4/mergevcfs/main.nf' workflow test_gatk4_mergevcfs { - input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] - ] - dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - - GATK4_MERGEVCFS ( input, dict, false ) -} - -workflow test_gatk4_mergevcfs_refdict { def input = [] input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] ] + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - GATK4_MERGEVCFS ( input, dict, true ) + GATK4_MERGEVCFS ( input, dict ) +} + +workflow test_gatk4_mergevcfs_no_dict { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] + ] + + GATK4_MERGEVCFS ( input, [] ) } diff --git a/tests/modules/gatk4/mergevcfs/test.yml b/tests/modules/gatk4/mergevcfs/test.yml index 3ff2bf93..da2f7578 100644 --- a/tests/modules/gatk4/mergevcfs/test.yml +++ b/tests/modules/gatk4/mergevcfs/test.yml @@ -6,12 +6,14 @@ files: - path: output/gatk4/test.vcf.gz md5sum: 5b289bda88d3a3504f2e19ee8cff177c + - path: output/gatk4/versions.yml -- name: gatk4 mergevcfs test_gatk4_mergevcfs_refdict - command: nextflow run ./tests/modules/gatk4/mergevcfs -entry test_gatk4_mergevcfs_refdict -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergevcfs/nextflow.config +- name: gatk4 mergevcfs test_gatk4_mergevcfs_no_dict + command: nextflow run ./tests/modules/gatk4/mergevcfs -entry test_gatk4_mergevcfs_no_dict -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergevcfs/nextflow.config tags: - gatk4/mergevcfs - gatk4 files: - path: output/gatk4/test.vcf.gz md5sum: 5b289bda88d3a3504f2e19ee8cff177c + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 94cf0416..fa229eff 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -2,22 +2,22 @@ nextflow.enable.dsl = 2 -include { GATK4_MUTECT2 } from '../../../../modules/gatk4/mutect2/main.nf' +include { GATK4_MUTECT2 } from '../../../../modules/gatk4/mutect2/main.nf' +include { GATK4_MUTECT2 as GATK4_MUTECT2_PAIR } from '../../../../modules/gatk4/mutect2/main.nf' +include { GATK4_MUTECT2 as GATK4_MUTECT2_MITO } from '../../../../modules/gatk4/mutect2/main.nf' +include { GATK4_MUTECT2 as GATK4_MUTECT2_F1R2 } from '../../../../modules/gatk4/mutect2/main.nf' workflow test_gatk4_mutect2_tumor_normal_pair { - input = [ [ id:'test'], // meta map + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) ], [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) ], - ["normal"] + [] ] - run_single = false - run_pon = false - run_mito = false - interval_label = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) @@ -26,7 +26,29 @@ workflow test_gatk4_mutect2_tumor_normal_pair { panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) - GATK4_MUTECT2 ( input, run_single, run_pon, run_mito, interval_label, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2_PAIR ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) +} + +workflow test_gatk4_mutect2_tumor_normal_pair_f1r2 { + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + ], + [] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + + GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } workflow test_gatk4_mutect2_tumor_single { @@ -35,10 +57,7 @@ workflow test_gatk4_mutect2_tumor_single { [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], [] ] - run_single = true - run_pon = false - run_mito = false - interval_label = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) @@ -47,7 +66,7 @@ workflow test_gatk4_mutect2_tumor_single { panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) - GATK4_MUTECT2 ( input, run_single, run_pon, run_mito, interval_label, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } workflow test_gatk4_mutect2_cram_input { @@ -56,10 +75,7 @@ workflow test_gatk4_mutect2_cram_input { [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)], [] ] - run_single = true - run_pon = false - run_mito = false - interval_label = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) @@ -68,7 +84,7 @@ workflow test_gatk4_mutect2_cram_input { panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) - GATK4_MUTECT2 ( input, run_single, run_pon, run_mito, interval_label, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } workflow test_gatk4_mutect2_generate_pon { @@ -77,39 +93,50 @@ workflow test_gatk4_mutect2_generate_pon { [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], [] ] - run_single = false - run_pon = true - run_mito = false - interval_label = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - germline_resource = [] - germline_resource_tbi = [] - panel_of_normals = [] - panel_of_normals_tbi = [] - GATK4_MUTECT2 ( input, run_single, run_pon, run_mito, interval_label, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2 ( input, fasta, fai, dict, [], [], [], [] ) } -// mitochondria mode would ideally have some mitochondria test data, but since the mitochondria settings only increase detection sensitivity, we can use the chr22 data as a stand in as it is already a small dataset, the extra variants detected compared to generate_pon shows the mode is working. +// mitochondria mode would ideally have some mitochondria test data +// but since the mitochondria settings only increase detection sensitivity +// we can use the chr22 data as a stand in as it is already a small dataset +// the extra variants detected compared to generate_pon shows the mode is working workflow test_gatk4_mutect2_mitochondria { input = [ [ id:'test'], // meta map [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam'], checkIfExists: true)], [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam_bai'], checkIfExists: true)], - [] + [ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)] ] - run_single = false - run_pon = false - run_mito = true - interval_label = 'chr22' + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - germline_resource = [] - germline_resource_tbi = [] - panel_of_normals = [] - panel_of_normals_tbi = [] - GATK4_MUTECT2 ( input, run_single, run_pon, run_mito, interval_label, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) +} + +workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + ], + [] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + + GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/mutect2/nextflow.config b/tests/modules/gatk4/mutect2/nextflow.config index 0966fc15..3b5f6c62 100644 --- a/tests/modules/gatk4/mutect2/nextflow.config +++ b/tests/modules/gatk4/mutect2/nextflow.config @@ -2,8 +2,16 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: GATK4_TEMPFIX_MUTECT2 { - ext.args = '--mitochondria-mode' + withName: GATK4_MUTECT2_PAIR { + ext.args = { "--normal-sample $meta.normal_id" } + } + + withName: GATK4_MUTECT2_MITO { + ext.args = { "--mitochondria-mode" } + } + + withName: GATK4_MUTECT2_F1R2 { + ext.args = { "--normal-sample $meta.normal_id --f1r2-tar-gz ${meta.id}.f1r2.tar.gz" } } } diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index f8107e6d..27fb40b9 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -1,5 +1,16 @@ - name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config + tags: + - gatk4 + - gatk4/mutect2 + files: + - path: output/gatk4/test.vcf.gz + - path: output/gatk4/test.vcf.gz.stats + md5sum: 17d2091015d04cbd4a26b7a67dc659e6 + - path: output/gatk4/test.vcf.gz.tbi + +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2 + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2 -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config tags: - gatk4 - gatk4/mutect2 @@ -9,6 +20,7 @@ - path: output/gatk4/test.vcf.gz.stats md5sum: 17d2091015d04cbd4a26b7a67dc659e6 - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 mutect2 test_gatk4_mutect2_tumor_single command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_single -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config @@ -20,6 +32,7 @@ - path: output/gatk4/test.vcf.gz.stats md5sum: 55ed641e16089afb33cdbc478e202d3d - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 mutect2 test_gatk4_mutect2_cram_input command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_cram_input -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config @@ -31,6 +44,7 @@ - path: output/gatk4/test.vcf.gz.stats md5sum: 55ed641e16089afb33cdbc478e202d3d - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 mutect2 test_gatk4_mutect2_generate_pon command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_generate_pon -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config @@ -42,6 +56,7 @@ - path: output/gatk4/test.vcf.gz.stats md5sum: b569ce66bbffe9588b3d221e821023ee - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 mutect2 test_gatk4_mutect2_mitochondria command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_mitochondria -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config @@ -53,3 +68,16 @@ - path: output/gatk4/test.vcf.gz.stats md5sum: fc6ea14ca2da346babe78161beea28c9 - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml + +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mutect2 + files: + - path: output/gatk4/test.f1r2.tar.gz + - path: output/gatk4/test.vcf.gz + - path: output/gatk4/test.vcf.gz.stats + - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index ab5dddee..5b14d471 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -11,3 +11,11 @@ workflow test_gatk4_revertsam { GATK4_REVERTSAM ( input ) } + +workflow test_gatk4_revertsam_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + GATK4_REVERTSAM ( input ) +} diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 4199b118..fd26d06f 100644 --- a/tests/modules/gatk4/revertsam/test.yml +++ b/tests/modules/gatk4/revertsam/test.yml @@ -6,3 +6,13 @@ files: - path: output/gatk4/test.reverted.bam md5sum: f783a88deb45c3a2c20ca12cbe1c5652 + - path: output/gatk4/versions.yml + +- name: gatk4 revertsam test_gatk4_revertsam_stubs + command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/revertsam + files: + - path: output/gatk4/test.reverted.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index 26a8ce2d..757b080f 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -19,3 +19,11 @@ workflow test_gatk4_samtofastq_paired_end { GATK4_SAMTOFASTQ ( input ) } + +workflow test_gatk4_samtofastq_paired_end_stubs { + input = [ [ id:'test', single_end: true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + ] + + GATK4_SAMTOFASTQ ( input ) +} diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index 66d3ee4c..bab7fc7a 100644 --- a/tests/modules/gatk4/samtofastq/test.yml +++ b/tests/modules/gatk4/samtofastq/test.yml @@ -6,6 +6,7 @@ files: - path: output/gatk4/test.fastq.gz md5sum: 50ace41d4c24467f24f8b929540a7797 + - path: output/gatk4/versions.yml - name: gatk4 samtofastq test_gatk4_samtofastq_paired_end command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config @@ -17,3 +18,14 @@ md5sum: cfea607c9d75fd9ea9704780ad3a499c - path: output/gatk4/test_2.fastq.gz md5sum: 613bf64c023609e1c62ad6ce9e4be8d7 + - path: output/gatk4/versions.yml + +- name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs + command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/samtofastq + files: + - path: output/gatk4/test_1.fastq.gz + - path: output/gatk4/test_2.fastq.gz + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/selectvariants/main.nf b/tests/modules/gatk4/selectvariants/main.nf new file mode 100644 index 00000000..7005dcd3 --- /dev/null +++ b/tests/modules/gatk4/selectvariants/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_SELECTVARIANTS } from '../../../../modules/gatk4/selectvariants/main.nf' + +// Basic parameters with uncompressed VCF input +workflow test_gatk4_selectvariants_vcf_input { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true) + ] + + GATK4_SELECTVARIANTS ( input) +} + +// Basic parameters with compressed VCF input +workflow test_gatk4_selectvariants_gz_input { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) + ] + + GATK4_SELECTVARIANTS ( input ) +} diff --git a/tests/modules/gatk4/selectvariants/nextflow.config b/tests/modules/gatk4/selectvariants/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/gatk4/selectvariants/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/gatk4/selectvariants/test.yml b/tests/modules/gatk4/selectvariants/test.yml new file mode 100644 index 00000000..42d9dbd8 --- /dev/null +++ b/tests/modules/gatk4/selectvariants/test.yml @@ -0,0 +1,19 @@ +- name: gatk4 selectvariants test_gatk4_selectvariants_vcf_input + command: nextflow run tests/modules/gatk4/selectvariants -entry test_gatk4_selectvariants_vcf_input -c tests/config/nextflow.config + tags: + - gatk4/selectvariants + - gatk4 + files: + - path: output/gatk4/test.selectvariants.vcf.gz + - path: output/gatk4/test.selectvariants.vcf.gz.tbi + - path: output/gatk4/versions.yml + +- name: gatk4 selectvariants test_gatk4_selectvariants_gz_input + command: nextflow run tests/modules/gatk4/selectvariants -entry test_gatk4_selectvariants_gz_input -c tests/config/nextflow.config + tags: + - gatk4/selectvariants + - gatk4 + files: + - path: output/gatk4/test.selectvariants.vcf.gz + - path: output/gatk4/test.selectvariants.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/splitintervals/main.nf b/tests/modules/gatk4/splitintervals/main.nf new file mode 100644 index 00000000..f507ece5 --- /dev/null +++ b/tests/modules/gatk4/splitintervals/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_SPLITINTERVALS } from '../../../../modules/gatk4/splitintervals/main.nf' + +workflow test_gatk4_splitintervals_bed { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + fasta_dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_SPLITINTERVALS ( input, fasta, fasta_fai, fasta_dict) +} + +workflow test_gatk4_splitintervals_intervals { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_interval_list'], checkIfExists: true) + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + fasta_dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_SPLITINTERVALS ( input, fasta, fasta_fai, fasta_dict) +} \ No newline at end of file diff --git a/tests/modules/gatk4/splitintervals/nextflow.config b/tests/modules/gatk4/splitintervals/nextflow.config new file mode 100644 index 00000000..10fda96c --- /dev/null +++ b/tests/modules/gatk4/splitintervals/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + + withName: GATK4_SPLITINTERVALS { + ext.args = "--scatter-count 2" + } +} \ No newline at end of file diff --git a/tests/modules/gatk4/splitintervals/test.yml b/tests/modules/gatk4/splitintervals/test.yml new file mode 100644 index 00000000..741c6bec --- /dev/null +++ b/tests/modules/gatk4/splitintervals/test.yml @@ -0,0 +1,23 @@ +- name: gatk4 splitintervals test_gatk4_splitintervals_bed + command: nextflow run tests/modules/gatk4/splitintervals -entry test_gatk4_splitintervals_bed -c tests/config/nextflow.config + tags: + - gatk4/splitintervals + - gatk4 + files: + - path: output/gatk4/test/0000-scattered.interval_list + md5sum: c8d6b19e7a92535b6ce9608eae558faa + - path: output/gatk4/test/0001-scattered.interval_list + md5sum: b1877ad96aec308906594c50ebbe3ded + - path: output/gatk4/versions.yml + +- name: gatk4 splitintervals test_gatk4_splitintervals_intervals + command: nextflow run tests/modules/gatk4/splitintervals -entry test_gatk4_splitintervals_intervals -c tests/config/nextflow.config + tags: + - gatk4/splitintervals + - gatk4 + files: + - path: output/gatk4/test/0000-scattered.interval_list + md5sum: ebd6b34a335efc6732ff541936c6d2d5 + - path: output/gatk4/test/0001-scattered.interval_list + md5sum: 9459b0e124fa84ec1e64ac4615bc9af7 + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/splitncigarreads/main.nf b/tests/modules/gatk4/splitncigarreads/main.nf index 7e5b7c9a..31e45cec 100644 --- a/tests/modules/gatk4/splitncigarreads/main.nf +++ b/tests/modules/gatk4/splitncigarreads/main.nf @@ -6,7 +6,23 @@ include { GATK4_SPLITNCIGARREADS } from '../../../../modules/gatk4/splitncigarre workflow test_gatk4_splitncigarreads { input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [], + [] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_SPLITNCIGARREADS ( input, fasta, fai, dict ) +} + +workflow test_gatk4_splitncigarreads_intervals { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/gatk4/splitncigarreads/test.yml b/tests/modules/gatk4/splitncigarreads/test.yml index a18fbb04..261f7bc3 100644 --- a/tests/modules/gatk4/splitncigarreads/test.yml +++ b/tests/modules/gatk4/splitncigarreads/test.yml @@ -5,6 +5,14 @@ - gatk4/splitncigarreads files: - path: output/gatk4/test.bam - md5sum: 1d54057d9f403fba2068ac1aaa4b8a28 + md5sum: 37e5dbce8692b54c3292b539c91dfbd7 + - path: output/gatk4/versions.yml +- name: gatk4 splitncigarreads test_gatk4_splitncigarreads_intervals + command: nextflow run tests/modules/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads_intervals -c tests/config/nextflow.config + tags: + - gatk4 + - gatk4/splitncigarreads + files: + - path: output/gatk4/test.bam + md5sum: e5cd2fd1822298a9bf7bc8b8d42146af - path: output/gatk4/versions.yml - md5sum: f0f29af552075dc6bf8a13028e09f8e4 diff --git a/tests/modules/gatk4/variantfiltration/test.yml b/tests/modules/gatk4/variantfiltration/test.yml index b5da0e5c..0ab91091 100644 --- a/tests/modules/gatk4/variantfiltration/test.yml +++ b/tests/modules/gatk4/variantfiltration/test.yml @@ -5,8 +5,12 @@ - gatk4 files: - path: output/gatk4/test.filtered.vcf.gz - contains: ['BaseQRankSum=-1.318;DP=17;ExcessHet=3.0103;MLEAC=1,0,0;MLEAF=0.500,0.00,0.00;MQRankSum=0.000;RAW_MQandDP=61200,17;ReadPosRankSum=2.365'] + contains: + [ + "BaseQRankSum=-1.318;DP=17;ExcessHet=3.0103;MLEAC=1,0,0;MLEAF=0.500,0.00,0.00;MQRankSum=0.000;RAW_MQandDP=61200,17;ReadPosRankSum=2.365", + ] - path: output/gatk4/test.filtered.vcf.gz.tbi + - path: output/gatk4/versions.yml - name: gatk4 variantfiltration test_gatk4_variantfiltration_gz_input command: nextflow run ./tests/modules/gatk4/variantfiltration -entry test_gatk4_variantfiltration_gz_input -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/variantfiltration/nextflow.config @@ -15,5 +19,9 @@ - gatk4 files: - path: output/gatk4/test.filtered.vcf.gz - contains: ['BaseQRankSum=-1.318;DP=17;ExcessHet=3.0103;MLEAC=1,0,0;MLEAF=0.500,0.00,0.00;MQRankSum=0.000;RAW_MQandDP=61200,17;ReadPosRankSum=2.365'] + contains: + [ + "BaseQRankSum=-1.318;DP=17;ExcessHet=3.0103;MLEAC=1,0,0;MLEAF=0.500,0.00,0.00;MQRankSum=0.000;RAW_MQandDP=61200,17;ReadPosRankSum=2.365", + ] - path: output/gatk4/test.filtered.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/variantrecalibrator/main.nf b/tests/modules/gatk4/variantrecalibrator/main.nf index bbc1dff5..66dde5dd 100644 --- a/tests/modules/gatk4/variantrecalibrator/main.nf +++ b/tests/modules/gatk4/variantrecalibrator/main.nf @@ -2,80 +2,67 @@ nextflow.enable.dsl = 2 -include { GATK4_VARIANTRECALIBRATOR } from '../../../../modules/gatk4/variantrecalibrator/main.nf' +include { GATK4_VARIANTRECALIBRATOR as GATK4_VARIANTRECALIBRATOR_NO_ALLELESPECIFICTY } from '../../../../modules/gatk4/variantrecalibrator/main.nf' +include { GATK4_VARIANTRECALIBRATOR as GATK4_VARIANTRECALIBRATOR_WITH_ALLELESPECIFICTY } from '../../../../modules/gatk4/variantrecalibrator/main.nf' workflow test_gatk4_variantrecalibrator { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) ] + resources = [[ + file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + ], [ + file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + ], [ + 'hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38.vcf.gz', + 'omni,known=false,training=true,truth=false,prior=12.0 1000G_omni2.5.hg38.vcf.gz', + '1000G,known=false,training=true,truth=false,prior=10.0 1000G_phase1.snps.hg38.vcf.gz', + 'dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp_138.hg38.vcf.gz' + ]] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - allelespecific = false - resources = [ - [ - file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) - ], - [ - file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) - ], - [ - 'hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38.vcf.gz', - 'omni,known=false,training=true,truth=false,prior=12.0 1000G_omni2.5.hg38.vcf.gz', - '1000G,known=false,training=true,truth=false,prior=10.0 1000G_phase1.snps.hg38.vcf.gz', - 'dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp_138.hg38.vcf.gz' - ] - ] - annotation = ['QD', 'MQ', 'FS', 'SOR'] - mode = 'SNP' - create_rscript = false - GATK4_VARIANTRECALIBRATOR ( input, fasta, fai, dict, allelespecific, resources, annotation, mode, create_rscript) + GATK4_VARIANTRECALIBRATOR_NO_ALLELESPECIFICTY(input, resources, fasta, fai, dict) } workflow test_gatk4_variantrecalibrator_allele_specific { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) ] + resources = [[ + file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) + ], [ + file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) + ], [ + 'hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38.vcf.gz', + 'omni,known=false,training=true,truth=false,prior=12.0 1000G_omni2.5.hg38.vcf.gz', + '1000G,known=false,training=true,truth=false,prior=10.0 1000G_phase1.snps.hg38.vcf.gz', + 'dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp_138.hg38.vcf.gz' + ]] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - allelespecific = true - resources = [ - [ - file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true) - ], - [ - file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true) - ], - [ - 'hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38.vcf.gz', - 'omni,known=false,training=true,truth=false,prior=12.0 1000G_omni2.5.hg38.vcf.gz', - '1000G,known=false,training=true,truth=false,prior=10.0 1000G_phase1.snps.hg38.vcf.gz', - 'dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp_138.hg38.vcf.gz' - ] - ] - annotation = ['QD', 'MQ', 'FS'] - mode = 'SNP' - create_rscript = false - GATK4_VARIANTRECALIBRATOR ( input, fasta, fai, dict, allelespecific, resources, annotation, mode, create_rscript) + GATK4_VARIANTRECALIBRATOR_WITH_ALLELESPECIFICTY(input, resources, fasta, fai, dict) } diff --git a/tests/modules/gatk4/variantrecalibrator/nextflow.config b/tests/modules/gatk4/variantrecalibrator/nextflow.config index 19934e76..6c3a9116 100644 --- a/tests/modules/gatk4/variantrecalibrator/nextflow.config +++ b/tests/modules/gatk4/variantrecalibrator/nextflow.config @@ -2,4 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } -} \ No newline at end of file + withName: GATK4_VARIANTRECALIBRATOR { + ext.args = '--mode SNP -an QD -an MQ -an FS -an SOR' + } + + withName: GATK4_VARIANTRECALIBRATOR_WITH_ALLELESPECIFICTY { + ext.args = '--mode SNP -an QD -an MQ -an FS -AS' + } +} diff --git a/tests/modules/gatk4/variantrecalibrator/test.yml b/tests/modules/gatk4/variantrecalibrator/test.yml index 42b18e36..39931137 100644 --- a/tests/modules/gatk4/variantrecalibrator/test.yml +++ b/tests/modules/gatk4/variantrecalibrator/test.yml @@ -9,7 +9,8 @@ - "#CHROM POS ID REF ALT QUAL FILTER INFO" - path: output/gatk4/test.recal.idx - path: output/gatk4/test.tranches - md5sum: d238e97bf996863969dac7751e345549 + md5sum: c029e52fd63a893e1154cc9144a19eeb + - path: output/gatk4/versions.yml - name: gatk4 variantrecalibrator test_gatk4_variantrecalibrator_allele_specific command: nextflow run tests/modules/gatk4/variantrecalibrator -entry test_gatk4_variantrecalibrator_allele_specific -c tests/config/nextflow.config -c ./tests/modules/gatk4/variantrecalibrator/nextflow.config @@ -22,4 +23,5 @@ - "#CHROM POS ID REF ALT QUAL FILTER INFO" - path: output/gatk4/test.recal.idx - path: output/gatk4/test.tranches - md5sum: 444438d46716593634a6817958099292 + md5sum: ad52fa69325c758f458a30ee5b43d6b5 + - path: output/gatk4/versions.yml diff --git a/tests/modules/genomescope2/main.nf b/tests/modules/genomescope2/main.nf new file mode 100644 index 00000000..5ceebfd6 --- /dev/null +++ b/tests/modules/genomescope2/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../modules/meryl/count/main.nf' +include { MERYL_HISTOGRAM } from '../../../modules/meryl/histogram/main.nf' +include { GENOMESCOPE2 } from '../../../modules/genomescope2/main.nf' + +workflow test_genomescope2 { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) + MERYL_HISTOGRAM ( MERYL_COUNT.out.meryl_db ) + GENOMESCOPE2 ( MERYL_HISTOGRAM.out.hist ) +} diff --git a/tests/modules/genomescope2/nextflow.config b/tests/modules/genomescope2/nextflow.config new file mode 100644 index 00000000..29a0be3a --- /dev/null +++ b/tests/modules/genomescope2/nextflow.config @@ -0,0 +1,13 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: 'MERYL.*' { + ext.args = 'k=21' + } + + withName: 'GENOMESCOPE2' { + ext.args = '-k 21 -p 1' + } + +} diff --git a/tests/modules/genomescope2/test.yml b/tests/modules/genomescope2/test.yml new file mode 100644 index 00000000..5b03f545 --- /dev/null +++ b/tests/modules/genomescope2/test.yml @@ -0,0 +1,22 @@ +- name: genomescope2 test_genomescope2 + command: nextflow run tests/modules/genomescope2 -entry test_genomescope2 -c tests/config/nextflow.config + tags: + - genomescope2 + files: + - path: output/genomescope2/test_linear_plot.png + md5sum: 94c165c5028156299a1d4d05766cac51 + - path: output/genomescope2/test_log_plot.png + md5sum: 9d25ca463d92a0c73a893da7fd3979ba + - path: output/genomescope2/test_model.txt + md5sum: 3caf62f715f64a2f2b8fdff5d079cb84 + - path: output/genomescope2/test_summary.txt + md5sum: 7452860e2cea99b85f3ff60daeac77f5 + - path: output/genomescope2/test_transformed_linear_plot.png + md5sum: 99a64c1c18d8670f64cb863d4334abbb + - path: output/genomescope2/test_transformed_log_plot.png + md5sum: b4e029c9fb9987ca33b17392a691c1b4 + - path: output/genomescope2/versions.yml + md5sum: 18afeb26f62a47f680b2bb3e27da9cbc + - path: output/meryl/test.hist + md5sum: f75362ab9cd70d96621b3690e952085f + - path: output/meryl/versions.yml diff --git a/tests/modules/gstama/polyacleanup/main.nf b/tests/modules/gstama/polyacleanup/main.nf new file mode 100644 index 00000000..67b3fa87 --- /dev/null +++ b/tests/modules/gstama/polyacleanup/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GSTAMA_POLYACLEANUP } from '../../../../modules/gstama/polyacleanup/main.nf' + +workflow test_gstama_polyacleanup { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['genome']['transcriptome_fasta'], checkIfExists: true) + ] + + GSTAMA_POLYACLEANUP ( input ) +} diff --git a/tests/modules/gstama/polyacleanup/nextflow.config b/tests/modules/gstama/polyacleanup/nextflow.config new file mode 100644 index 00000000..ff407702 --- /dev/null +++ b/tests/modules/gstama/polyacleanup/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.prefix = { "${meta.id}_tama" } + +} diff --git a/tests/modules/gstama/polyacleanup/test.yml b/tests/modules/gstama/polyacleanup/test.yml new file mode 100644 index 00000000..7f9f4260 --- /dev/null +++ b/tests/modules/gstama/polyacleanup/test.yml @@ -0,0 +1,14 @@ +- name: gstama polyacleanup test_gstama_polyacleanup + command: nextflow run tests/modules/gstama/polyacleanup -entry test_gstama_polyacleanup -c tests/config/nextflow.config + tags: + - gstama + - gstama/polyacleanup + files: + - path: output/gstama/test_tama.fa.gz + md5sum: 9c768387478e5f966a42c369c0270b09 + - path: output/gstama/test_tama_polya_flnc_report.txt.gz + md5sum: fe3606979ed11538aacd83159f4cff03 + - path: output/gstama/test_tama_tails.fa.gz + md5sum: ba21256c0afe0bda71b3ee66b4c761bf + - path: output/gstama/versions.yml + md5sum: 07ebb812ae13a350d955fab7600b2542 diff --git a/tests/modules/hamronization/deeparg/main.nf b/tests/modules/hamronization/deeparg/main.nf new file mode 100644 index 00000000..9888bc42 --- /dev/null +++ b/tests/modules/hamronization/deeparg/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAMRONIZATION_DEEPARG } from '../../../../modules/hamronization/deeparg/main.nf' + +workflow test_hamronization_deeparg { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_mapping_potential_arg'], checkIfExists: true), + ] + + HAMRONIZATION_DEEPARG ( input, 'tsv', '1.0.2', '2' ) +} diff --git a/tests/modules/hamronization/deeparg/nextflow.config b/tests/modules/hamronization/deeparg/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/hamronization/deeparg/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/hamronization/deeparg/test.yml b/tests/modules/hamronization/deeparg/test.yml new file mode 100644 index 00000000..4884ac6c --- /dev/null +++ b/tests/modules/hamronization/deeparg/test.yml @@ -0,0 +1,8 @@ +- name: hamronization deeparg test_hamronization_deeparg + command: nextflow run tests/modules/hamronization/deeparg -entry test_hamronization_deeparg -c tests/config/nextflow.config + tags: + - hamronization + - hamronization/deeparg + files: + - path: output/hamronization/test.tsv + md5sum: 3c315605aca0c5964796bb5fd4cdd522 diff --git a/tests/modules/hamronization/summarize/main.nf b/tests/modules/hamronization/summarize/main.nf new file mode 100644 index 00000000..e0eae4a4 --- /dev/null +++ b/tests/modules/hamronization/summarize/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAMRONIZATION_DEEPARG } from '../../../../modules/hamronization/deeparg/main.nf' +include { HAMRONIZATION_DEEPARG as HAMRONIZATION_DEEPARG_SECOND } from '../../../../modules/hamronization/deeparg/main.nf' +include { HAMRONIZATION_SUMMARIZE } from '../../../../modules/hamronization/summarize/main.nf' + +workflow test_hamronization_summarize { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_mapping_potential_arg'], checkIfExists: true), + ] + + input2 = [ + [ id:'test2', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_mapping_potential_arg'], checkIfExists: true), + ] + + HAMRONIZATION_DEEPARG ( input, 'tsv', '1.0.2', '2' ) + HAMRONIZATION_DEEPARG_SECOND ( input2, 'tsv', '1.0.2', '2' ) + + ch_deeparg_run_one = HAMRONIZATION_DEEPARG.out.tsv + ch_deeparg_run_two = HAMRONIZATION_DEEPARG_SECOND.out.tsv + + ch_deeparg_run_one + .mix( ch_deeparg_run_two ) + .map{ + [ it[1] ] + } + .collect() + .set { ch_input_for_summarize } + + HAMRONIZATION_SUMMARIZE ( ch_input_for_summarize , 'json' ) +} diff --git a/tests/modules/hamronization/summarize/nextflow.config b/tests/modules/hamronization/summarize/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/hamronization/summarize/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/hamronization/summarize/test.yml b/tests/modules/hamronization/summarize/test.yml new file mode 100644 index 00000000..ad883971 --- /dev/null +++ b/tests/modules/hamronization/summarize/test.yml @@ -0,0 +1,14 @@ +- name: hamronization summarize test_hamronization_summarize + command: nextflow run tests/modules/hamronization/summarize -entry test_hamronization_summarize -c tests/config/nextflow.config + tags: + - hamronization + - hamronization/summarize + files: + - path: output/hamronization/hamronization_combined_report.json + md5sum: 1623b6cc3b213208a425e023edd94691 + - path: output/hamronization/test.tsv + md5sum: 3c315605aca0c5964796bb5fd4cdd522 + - path: output/hamronization/test2.tsv + md5sum: 453f38502e35261a50a0849dca34f05b + - path: output/hamronization/versions.yml + md5sum: 99b5046fac643e16ca3362d1baf3284b diff --git a/tests/modules/happy/happy/main.nf b/tests/modules/happy/happy/main.nf new file mode 100644 index 00000000..515a657b --- /dev/null +++ b/tests/modules/happy/happy/main.nf @@ -0,0 +1,39 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_HAPPY } from '../../../../modules/happy/happy/main.nf' + +workflow test_happy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_HAPPY ( input, fasta ) +} + +workflow test_happy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_HAPPY ( input, fasta ) +} diff --git a/tests/modules/happy/happy/nextflow.config b/tests/modules/happy/happy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/happy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/happy/test.yml b/tests/modules/happy/happy/test.yml new file mode 100644 index 00000000..89a1f012 --- /dev/null +++ b/tests/modules/happy/happy/test.yml @@ -0,0 +1,27 @@ +- name: happy happy test_happy_vcf + command: nextflow run tests/modules/happy/happy -entry test_happy_vcf -c tests/config/nextflow.config + tags: + - happy + - happy/happy + files: + - path: output/happy/test.extended.csv + md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 + - path: output/happy/test.runinfo.json + - path: output/happy/test.summary.csv + md5sum: f8aa5d36d3c48dede2f607fd565894ad + - path: output/happy/versions.yml + md5sum: 82243bf6dbdc71aa63211ee2a89f47f2 + +- name: happy happy test_happy_gvcf + command: nextflow run tests/modules/happy/happy -entry test_happy_gvcf -c tests/config/nextflow.config + tags: + - happy + - happy/happy + files: + - path: output/happy/test.extended.csv + md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 + - path: output/happy/test.runinfo.json + - path: output/happy/test.summary.csv + md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 + - path: output/happy/versions.yml + md5sum: 551fa216952d6f5de78e6e453b92aaab diff --git a/tests/modules/happy/prepy/main.nf b/tests/modules/happy/prepy/main.nf new file mode 100644 index 00000000..0b511104 --- /dev/null +++ b/tests/modules/happy/prepy/main.nf @@ -0,0 +1,37 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_PREPY } from '../../../../modules/happy/prepy/main.nf' + +workflow test_happy_prepy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} + +workflow test_happy_prepy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} diff --git a/tests/modules/happy/prepy/nextflow.config b/tests/modules/happy/prepy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/prepy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/prepy/test.yml b/tests/modules/happy/prepy/test.yml new file mode 100644 index 00000000..a0a45c38 --- /dev/null +++ b/tests/modules/happy/prepy/test.yml @@ -0,0 +1,19 @@ +- name: happy prepy test_happy_prepy_vcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_vcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 814d20f1f29f23a3d21012748a5d6393 + +- name: happy prepy test_happy_prepy_gvcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_gvcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 970a54de46e68ef6d5228a26eaa4c8e7 diff --git a/tests/modules/hmmer/hmmalign/main.nf b/tests/modules/hmmer/hmmalign/main.nf index 3bf6d452..0a462a7a 100644 --- a/tests/modules/hmmer/hmmalign/main.nf +++ b/tests/modules/hmmer/hmmalign/main.nf @@ -8,10 +8,10 @@ workflow test_hmmer_hmmalign { input = [ [ id:'test' ], // meta map - file('https://raw.githubusercontent.com/erikrikarddaniel/test-datasets/modules/data/delete_me/e_coli_k12_16s.fna') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/e_coli_k12_16s.fna.gz') // Change to params.test_data syntax after the data is included in tests/config/test_data.config ] - hmm = file('https://raw.githubusercontent.com/erikrikarddaniel/test-datasets/modules/data/delete_me/bac.16S_rRNA.hmm') + hmm = file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/bac.16S_rRNA.hmm.gz') HMMER_HMMALIGN ( input, hmm ) } diff --git a/tests/modules/hmmer/hmmsearch/main.nf b/tests/modules/hmmer/hmmsearch/main.nf new file mode 100644 index 00000000..b181a529 --- /dev/null +++ b/tests/modules/hmmer/hmmsearch/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HMMER_HMMSEARCH } from '../../../../modules/hmmer/hmmsearch/main.nf' + +workflow test_hmmer_hmmsearch { + + input = [ + [ id:'test', single_end:false ], // meta map + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/bac.16S_rRNA.hmm.gz', checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/e_coli_k12_16s.fna.gz', checkIfExists: true), + false, + false, + false + ] + + HMMER_HMMSEARCH ( input ) +} + +workflow test_hmmer_hmmsearch_optional { + + input = [ + [ id:'test', single_end:false ], // meta map + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/bac.16S_rRNA.hmm.gz', checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/hmmer/e_coli_k12_16s.fna.gz', checkIfExists: true), + true, + true, + true + ] + + HMMER_HMMSEARCH ( input ) +} diff --git a/tests/modules/hmmer/hmmsearch/nextflow.config b/tests/modules/hmmer/hmmsearch/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/hmmer/hmmsearch/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/hmmer/hmmsearch/test.yml b/tests/modules/hmmer/hmmsearch/test.yml new file mode 100644 index 00000000..dd3e16ef --- /dev/null +++ b/tests/modules/hmmer/hmmsearch/test.yml @@ -0,0 +1,31 @@ +- name: hmmer hmmsearch test_hmmer_hmmsearch + command: nextflow run tests/modules/hmmer/hmmsearch -entry test_hmmer_hmmsearch -c tests/config/nextflow.config + tags: + - hmmer/hmmsearch + - hmmer + files: + - path: output/hmmer/test.txt.gz + contains: + - "[ok]" + - path: output/hmmer/versions.yml + md5sum: ed0808c10abd205c6bd0fb01f45259bb + +- name: hmmer hmmsearch test_hmmer_hmmsearch_optional + command: nextflow run tests/modules/hmmer/hmmsearch -entry test_hmmer_hmmsearch_optional -c tests/config/nextflow.config + tags: + - hmmer/hmmsearch + - hmmer + files: + - path: output/hmmer/test.sto.gz + md5sum: d3121aa33455074c566fb7f8fdcda7b0 + - path: output/hmmer/test.domtbl.gz + contains: + - "# [ok]" + - path: output/hmmer/test.tbl.gz + contains: + - "# [ok]" + - path: output/hmmer/test.txt.gz + contains: + - "[ok]" + - path: output/hmmer/versions.yml + md5sum: ebdcb08ae540e840f7b5c4c75a3a2993 diff --git a/tests/modules/homer/findpeaks/test.yml b/tests/modules/homer/findpeaks/test.yml index 75e94529..b5225404 100644 --- a/tests/modules/homer/findpeaks/test.yml +++ b/tests/modules/homer/findpeaks/test.yml @@ -5,4 +5,4 @@ - homer/findpeaks files: - path: output/homer/test.peaks.txt - md5sum: f75ac1fea67f1e307a1ad4d059a9b6cc + md5sum: 86e15beaa4b439585786478e58418c0c diff --git a/tests/modules/homer/maketagdirectory/main.nf b/tests/modules/homer/maketagdirectory/main.nf index 766aff0d..7de693e6 100644 --- a/tests/modules/homer/maketagdirectory/main.nf +++ b/tests/modules/homer/maketagdirectory/main.nf @@ -2,19 +2,22 @@ nextflow.enable.dsl = 2 -include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main.nf' +include { + HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BED + HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BAM +} from '../../../../modules/homer/maketagdirectory/main.nf' -workflow test_homer_maketagdirectory { +workflow test_homer_maketagdirectory_bed { input = [[id:'test'], [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - HOMER_MAKETAGDIRECTORY (input, fasta) + HOMER_MAKETAGDIRECTORY_BED (input, fasta) } -workflow test_homer_meta_maketagdirectory { +workflow test_homer_maketagdirectory_meta { input = [[[ id:'test1'], [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]], @@ -25,8 +28,14 @@ workflow test_homer_meta_maketagdirectory { meta_input = [[id: 'meta_test']] + [ input.collect{it[1]}.flatten() ] - HOMER_MAKETAGDIRECTORY (meta_input, fasta) + HOMER_MAKETAGDIRECTORY_BED (meta_input, fasta) } -// TODO Make a failing bam test -// TODO Make a pass bam test that feeds the bam through samtools first +workflow test_homer_maketagdirectory_bam { + input = [[id:'test'], + [file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)]] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + HOMER_MAKETAGDIRECTORY_BAM (input, fasta) +} diff --git a/tests/modules/homer/maketagdirectory/nextflow.config b/tests/modules/homer/maketagdirectory/nextflow.config index 81587d69..9d7a3f9f 100644 --- a/tests/modules/homer/maketagdirectory/nextflow.config +++ b/tests/modules/homer/maketagdirectory/nextflow.config @@ -2,8 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: HOMER_MAKETAGDIRECTORY { + withName: HOMER_MAKETAGDIRECTORY_BED { ext.args = '-format bed' } + withName: HOMER_MAKETAGDIRECTORY_BAM { + ext.args = '-format sam' + } + } diff --git a/tests/modules/homer/maketagdirectory/test.yml b/tests/modules/homer/maketagdirectory/test.yml index 746c6ef6..970ca906 100644 --- a/tests/modules/homer/maketagdirectory/test.yml +++ b/tests/modules/homer/maketagdirectory/test.yml @@ -1,33 +1,50 @@ -- name: homer maketagdirectory - command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config +- name: homer maketagdirectory bed + command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_bed -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config tags: - homer - homer/maketagdirectory files: - - path: output/homer/tag_dir/MT192765.1.tags.tsv + - path: output/homer/test_tagdir/MT192765.1.tags.tsv md5sum: e29522171ca2169b57396495f8b97485 - - path: output/homer/tag_dir/tagAutocorrelation.txt + - path: output/homer/test_tagdir/tagAutocorrelation.txt md5sum: 62b107c4971b94126fb89a0bc2800455 - - path: output/homer/tag_dir/tagCountDistribution.txt + - path: output/homer/test_tagdir/tagCountDistribution.txt md5sum: fd4ee7ce7c5dfd7c9d739534b8180578 - - path: output/homer/tag_dir/tagInfo.txt - md5sum: 816baa642c946f8284eaa465638e9abb - - path: output/homer/tag_dir/tagLengthDistribution.txt + - path: output/homer/test_tagdir/tagInfo.txt + md5sum: c9bb2ca53bb101d74c1ec92d2b0ad26e + - path: output/homer/test_tagdir/tagLengthDistribution.txt md5sum: e5aa2b9843ca9c04ace297280aed6af4 -- name: homer meta maketagdirectory - command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_meta_maketagdirectory -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config +- name: homer maketagdirectory meta + command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_meta -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config tags: - homer - homer/maketagdirectory files: - - path: output/homer/tag_dir/MT192765.1.tags.tsv + - path: output/homer/meta_test_tagdir/MT192765.1.tags.tsv md5sum: e29522171ca2169b57396495f8b97485 - - path: output/homer/tag_dir/tagAutocorrelation.txt + - path: output/homer/meta_test_tagdir/tagAutocorrelation.txt md5sum: 62b107c4971b94126fb89a0bc2800455 - - path: output/homer/tag_dir/tagCountDistribution.txt + - path: output/homer/meta_test_tagdir/tagCountDistribution.txt md5sum: fd4ee7ce7c5dfd7c9d739534b8180578 - - path: output/homer/tag_dir/tagInfo.txt - md5sum: 816baa642c946f8284eaa465638e9abb - - path: output/homer/tag_dir/tagLengthDistribution.txt + - path: output/homer/meta_test_tagdir/tagInfo.txt + md5sum: cb907ebf9afc042bb61196d624e793c8 + - path: output/homer/meta_test_tagdir/tagLengthDistribution.txt md5sum: e5aa2b9843ca9c04ace297280aed6af4 + +- name: homer maketagdirectory bam + command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_bam -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config + tags: + - homer + - homer/maketagdirectory + files: + - path: output/homer/test_tagdir/MT192765.1.tags.tsv + md5sum: 365808c4751ef6dd7085ac52037a22bc + - path: output/homer/test_tagdir/tagAutocorrelation.txt + md5sum: 8b396f2aef1cdd3af4fab57b142d3250 + - path: output/homer/test_tagdir/tagCountDistribution.txt + md5sum: afc6d007096c3872bbe84c9dc8edb832 + - path: output/homer/test_tagdir/tagInfo.txt + md5sum: aebf6ff15fd0a238ee6a94d623c578ca + - path: output/homer/test_tagdir/tagLengthDistribution.txt + md5sum: 44f231adb2a705ae81950808c55cf248 diff --git a/tests/modules/homer/makeucscfile/test.yml b/tests/modules/homer/makeucscfile/test.yml index cf3d1b4d..e6ccb9fa 100644 --- a/tests/modules/homer/makeucscfile/test.yml +++ b/tests/modules/homer/makeucscfile/test.yml @@ -4,4 +4,4 @@ - homer - homer/makeucscfile files: - - path: output/homer/tag_dir/tag_dir.ucsc.bedGraph.gz + - path: output/homer/test.bedGraph.gz diff --git a/tests/modules/homer/pos2bed/main.nf b/tests/modules/homer/pos2bed/main.nf new file mode 100644 index 00000000..bcfdc0bc --- /dev/null +++ b/tests/modules/homer/pos2bed/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main.nf' +include { HOMER_FINDPEAKS } from '../../../../modules/homer/findpeaks/main.nf' +include { HOMER_POS2BED } from '../../../../modules/homer/pos2bed/main.nf' + +workflow test_homer_pos2bed { + input = [[id:'test'], + [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + HOMER_MAKETAGDIRECTORY (input, fasta) + HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir ) + + HOMER_POS2BED ( HOMER_FINDPEAKS.out.txt ) +} diff --git a/tests/modules/homer/pos2bed/nextflow.config b/tests/modules/homer/pos2bed/nextflow.config new file mode 100644 index 00000000..a4c88475 --- /dev/null +++ b/tests/modules/homer/pos2bed/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: HOMER_MAKETAGDIRECTORY { + ext.args = '-format bed' + } + +} diff --git a/tests/modules/homer/pos2bed/test.yml b/tests/modules/homer/pos2bed/test.yml new file mode 100644 index 00000000..6aad55bc --- /dev/null +++ b/tests/modules/homer/pos2bed/test.yml @@ -0,0 +1,10 @@ +- name: "homer pos2bed" + command: nextflow run ./tests/modules/homer/pos2bed -entry test_homer_pos2bed -c ./tests/config/nextflow.config -c ./tests/modules/homer/pos2bed/nextflow.config + tags: + - "homer" + - "homer/pos2bed" + files: + - path: output/homer/test.bed + md5sum: 5d6ddd9c7e621a66f6f045b9b5abecb4 + - path: output/homer/versions.yml + md5sum: 1485f4b2d76484e8fe3310e2505de2fd diff --git a/tests/modules/hpsuissero/main.nf b/tests/modules/hpsuissero/main.nf new file mode 100644 index 00000000..f66fcd93 --- /dev/null +++ b/tests/modules/hpsuissero/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HPSUISSERO } from '../../../modules/hpsuissero/main.nf' + +workflow test_hpsuissero { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + HPSUISSERO ( input ) +} diff --git a/tests/modules/hpsuissero/nextflow.config b/tests/modules/hpsuissero/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/hpsuissero/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/hpsuissero/test.yml b/tests/modules/hpsuissero/test.yml new file mode 100644 index 00000000..33b26eb2 --- /dev/null +++ b/tests/modules/hpsuissero/test.yml @@ -0,0 +1,9 @@ +- name: hpsuissero test_hpsuissero + command: nextflow run tests/modules/hpsuissero -entry test_hpsuissero -c tests/config/nextflow.config + tags: + - hpsuissero + files: + - path: output/hpsuissero/test_serotyping_res.tsv + md5sum: 559dd2ca386eeb58f3975e3204ce9d43 + - path: output/hpsuissero/versions.yml + md5sum: f65438e63a74ac6ee365bfdbbd3f996a diff --git a/tests/modules/ichorcna/createpon/main.nf b/tests/modules/ichorcna/createpon/main.nf new file mode 100644 index 00000000..0e86fb92 --- /dev/null +++ b/tests/modules/ichorcna/createpon/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ICHORCNA_CREATEPON } from '../../../../modules/ichorcna/createpon/main.nf' + +workflow test_ichorcna_createpon { + + input = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + + gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + + centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + + ICHORCNA_CREATEPON ( input, gcwig, mapwig, centromere ) +} + +workflow test_ichorcna_createpon2 { + + input = [file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true), + file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315_T2.ctDNA.reads.wig", checkIfExists: true)] + + gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + + centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + + ICHORCNA_CREATEPON ( input, gcwig, mapwig, centromere ) +} diff --git a/tests/modules/ichorcna/createpon/nextflow.config b/tests/modules/ichorcna/createpon/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/ichorcna/createpon/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/ichorcna/createpon/test.yml b/tests/modules/ichorcna/createpon/test.yml new file mode 100644 index 00000000..c8fe63c8 --- /dev/null +++ b/tests/modules/ichorcna/createpon/test.yml @@ -0,0 +1,21 @@ +- name: ichorcna createpon test_ichorcna_createpon + command: nextflow run tests/modules/ichorcna/createpon -entry test_ichorcna_createpon -c tests/config/nextflow.config + tags: + - ichorcna/createpon + - ichorcna + files: + - path: output/ichorcna/PoN_median.txt + contains: ["seqnames"] + - path: output/ichorcna/versions.yml + md5sum: 59a2121301113cc013bfae65935e07f1 + +- name: ichorcna createpon test_ichorcna_createpon2 + command: nextflow run tests/modules/ichorcna/createpon -entry test_ichorcna_createpon2 -c tests/config/nextflow.config + tags: + - ichorcna/createpon + - ichorcna + files: + - path: output/ichorcna/PoN_median.txt + contains: ["seqnames"] + - path: output/ichorcna/versions.yml + md5sum: 31a5fcc0075dbe747f7736efbdb99644 diff --git a/tests/modules/ichorcna/run/main.nf b/tests/modules/ichorcna/run/main.nf new file mode 100644 index 00000000..8a830f62 --- /dev/null +++ b/tests/modules/ichorcna/run/main.nf @@ -0,0 +1,40 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ICHORCNA_RUN } from '../../../../modules/ichorcna/run/main.nf' +include { HMMCOPY_READCOUNTER } from '../../../../modules/hmmcopy/readcounter/main.nf' +include { HMMCOPY_GCCOUNTER } from '../../../../modules/hmmcopy/gccounter/main.nf' +include { HMMCOPY_MAPCOUNTER } from '../../../../modules/hmmcopy/mapcounter/main.nf' +include { HMMCOPY_GENERATEMAP } from '../../../../modules/hmmcopy/generatemap/main.nf' + +workflow test_ichorcna_run_no_panel { + + input = [ [ id:'test'], // meta map + file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + ] + + gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + + panel_of_normals = [] + centromere = [] + + ICHORCNA_RUN ( input, gcwig, mapwig, panel_of_normals, centromere) +} + +workflow test_ichorcna_run_inc_panel { + + input = [ [ id:'test'], // meta map + file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + ] + + gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + + panel_of_normals = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds", checkIfExists: true) + + centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + + ICHORCNA_RUN ( input, gcwig, mapwig, panel_of_normals, centromere) +} diff --git a/tests/modules/ichorcna/run/nextflow.config b/tests/modules/ichorcna/run/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/ichorcna/run/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/ichorcna/run/test.yml b/tests/modules/ichorcna/run/test.yml new file mode 100644 index 00000000..4be83774 --- /dev/null +++ b/tests/modules/ichorcna/run/test.yml @@ -0,0 +1,25 @@ +- name: ichorcna run test_ichorcna_run_no_panel + command: nextflow run tests/modules/ichorcna/run -entry test_ichorcna_run_no_panel -c tests/config/nextflow.config + tags: + - ichorcna + - ichorcna/run + files: + - path: output/ichorcna/test.cna.seg + contains: ["Corrected_Copy_Number"] + - path: output/ichorcna/test.params.txt + md5sum: e39a579cdcc9576679f06dc5c22605a7 + - path: output/ichorcna/versions.yml + md5sum: effb37e19bec3609417aaccad4b6a294 + +- name: ichorcna run test_ichorcna_run_inc_panel + command: nextflow run tests/modules/ichorcna/run -entry test_ichorcna_run_inc_panel -c tests/config/nextflow.config + tags: + - ichorcna + - ichorcna/run + files: + - path: output/ichorcna/test.cna.seg + contains: ["Corrected_Copy_Number"] + - path: output/ichorcna/test.params.txt + md5sum: 0b97e0269cd0b571f5a85890f6ddb181 + - path: output/ichorcna/versions.yml + md5sum: fc9d96de0a1c15cea59208305b14e535 diff --git a/tests/modules/imputeme/vcftoprs/test.yml b/tests/modules/imputeme/vcftoprs/test.yml index e5152a03..89f2d540 100644 --- a/tests/modules/imputeme/vcftoprs/test.yml +++ b/tests/modules/imputeme/vcftoprs/test.yml @@ -5,4 +5,4 @@ - imputeme/vcftoprs files: - path: output/imputeme/output.json - contains: [ 'type_2_diabetes_32541925":{"GRS":[24.01]' ] + contains: ['type_2_diabetes_32541925":{"GRS":[24.01]'] diff --git a/tests/modules/iqtree/test.yml b/tests/modules/iqtree/test.yml index 06de90d9..291472b0 100644 --- a/tests/modules/iqtree/test.yml +++ b/tests/modules/iqtree/test.yml @@ -5,7 +5,7 @@ files: - path: output/iqtree/informative_sites.fas.treefile contains: - - '(sample1:0.002' - - '(sample2:0.005' - - 'sample3:0.0005' - - 'sample4:0.001' + - "(sample1:0.002" + - "(sample2:0.005" + - "sample3:0.0005" + - "sample4:0.001" diff --git a/tests/modules/isoseq3/cluster/test.yml b/tests/modules/isoseq3/cluster/test.yml index b1f12df7..2df3024c 100644 --- a/tests/modules/isoseq3/cluster/test.yml +++ b/tests/modules/isoseq3/cluster/test.yml @@ -25,4 +25,4 @@ - path: output/isoseq3/test.transcripts.singletons.bam.pbi md5sum: 8e0e0681179c0c36209b49fa60783841 - path: output/isoseq3/test.transcripts.transcriptset.xml - contains: [ 'PacBio.DataSet.TranscriptSet' ] + contains: ["PacBio.DataSet.TranscriptSet"] diff --git a/tests/modules/isoseq3/refine/test.yml b/tests/modules/isoseq3/refine/test.yml index f2c63fda..82180ed9 100644 --- a/tests/modules/isoseq3/refine/test.yml +++ b/tests/modules/isoseq3/refine/test.yml @@ -9,7 +9,7 @@ - path: output/isoseq3/test.refine.bam.pbi md5sum: 8097cad9e472f2f79de6de5fe3dcc822 - path: output/isoseq3/test.refine.consensusreadset.xml - contains: [ 'pbds:ConsensusReadSet' ] + contains: ["pbds:ConsensusReadSet"] - path: output/isoseq3/test.refine.filter_summary.json md5sum: 87f8bdd5c60741f47b8a991e002f7ef3 - path: output/isoseq3/test.refine.report.csv diff --git a/tests/modules/ivar/variants/main.nf b/tests/modules/ivar/variants/main.nf index 96835c60..2d8e77c5 100644 --- a/tests/modules/ivar/variants/main.nf +++ b/tests/modules/ivar/variants/main.nf @@ -11,10 +11,11 @@ workflow test_ivar_variants_no_gff_no_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = [] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = [] save_mpileup = false - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) } workflow test_ivar_variants_no_gff_with_mpileup { @@ -24,10 +25,11 @@ workflow test_ivar_variants_no_gff_with_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = [] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = [] save_mpileup = true - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) } workflow test_ivar_variants_with_gff_with_mpileup { @@ -37,8 +39,9 @@ workflow test_ivar_variants_with_gff_with_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) save_mpileup = true - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) } diff --git a/tests/modules/kaiju/kaiju/main.nf b/tests/modules/kaiju/kaiju/main.nf new file mode 100644 index 00000000..10849ff8 --- /dev/null +++ b/tests/modules/kaiju/kaiju/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf' + +workflow test_kaiju_kaiju_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } ) +} + +workflow test_kaiju_kaiju_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KAIJU_KAIJU ( input, UNTAR.out.untar.map{ it[1] } ) + +} diff --git a/tests/modules/kaiju/kaiju/nextflow.config b/tests/modules/kaiju/kaiju/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/kaiju/kaiju/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/kaiju/kaiju/test.yml b/tests/modules/kaiju/kaiju/test.yml new file mode 100644 index 00000000..72eb64c5 --- /dev/null +++ b/tests/modules/kaiju/kaiju/test.yml @@ -0,0 +1,21 @@ +- name: kaiju kaiju test_kaiju_kaiju_single_end + command: nextflow run tests/modules/kaiju/kaiju -entry test_kaiju_kaiju_single_end -c tests/config/nextflow.config + tags: + - kaiju/kaiju + - kaiju + files: + - path: output/kaiju/test.tsv + contains: ["C\tERR5069949.2257580\t2697049"] + - path: output/kaiju/versions.yml + md5sum: 7e218c0ea00a71dd3a5ec5aaf28804f4 + +- name: kaiju kaiju test_kaiju_kaiju_paired_end + command: nextflow run tests/modules/kaiju/kaiju -entry test_kaiju_kaiju_paired_end -c tests/config/nextflow.config + tags: + - kaiju/kaiju + - kaiju + files: + - path: output/kaiju/test.tsv + contains: ["C\tERR5069949.2257580\t2697049"] + - path: output/kaiju/versions.yml + md5sum: a74215f6f69979ae046fb1d65c56ac67 diff --git a/tests/modules/kaiju/kaiju2table/main.nf b/tests/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..b7169ba5 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf' +include { KAIJU_KAIJU2TABLE } from '../../../../modules/kaiju/kaiju2table/main.nf' + +workflow test_kaiju_kaiju_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ] + taxon_rank = "species" + + ch_db = UNTAR ( db ) + KAIJU_KAIJU ( input, ch_db.untar.map{ it[1] } ) + KAIJU_KAIJU2TABLE ( KAIJU_KAIJU.out.results, ch_db.untar.map{ it[1] }, taxon_rank ) +} diff --git a/tests/modules/kaiju/kaiju2table/nextflow.config b/tests/modules/kaiju/kaiju2table/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/kaiju/kaiju2table/test.yml b/tests/modules/kaiju/kaiju2table/test.yml new file mode 100644 index 00000000..47d99c89 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/test.yml @@ -0,0 +1,9 @@ +- name: kaiju kaiju2table test_kaiju_kaiju_single_end + command: nextflow run tests/modules/kaiju/kaiju2table -entry test_kaiju_kaiju_single_end -c tests/config/nextflow.config + tags: + - kaiju + - kaiju/kaiju2table + files: + - path: output/kaiju/test.txt + md5sum: 0d9f8fd36fcf2888296ae12632c5f0a8 + - path: output/kaiju/versions.yml diff --git a/tests/modules/khmer/normalizebymedian/test.yml b/tests/modules/khmer/normalizebymedian/test.yml index 0e61588f..f4d687ef 100644 --- a/tests/modules/khmer/normalizebymedian/test.yml +++ b/tests/modules/khmer/normalizebymedian/test.yml @@ -6,9 +6,9 @@ - khmer/normalizebymedian files: - path: output/khmer/only_pe.fastq.gz - # md5sum not stable even locally with docker (gzip done by tool) - #md5sum: 75e05f2e80cf4bd0b534d4b73f7c059c - + # md5sum not stable even locally with docker (gzip done by tool) + # md5sum: 75e05f2e80cf4bd0b534d4b73f7c059c + - name: khmer normalizebymedian only se reads command: nextflow run ./tests/modules/khmer/normalizebymedian -entry test_khmer_normalizebymedian_only_se -c ./tests/config/nextflow.config -c ./tests/modules/khmer/normalizebymedian/nextflow.config tags: @@ -16,7 +16,7 @@ - khmer/normalizebymedian files: - path: output/khmer/only_se.fastq.gz - + - name: khmer normalizebymedian mixed reads command: nextflow run ./tests/modules/khmer/normalizebymedian -entry test_khmer_normalizebymedian_mixed -c ./tests/config/nextflow.config -c ./tests/modules/khmer/normalizebymedian/nextflow.config tags: diff --git a/tests/modules/kleborate/test.yml b/tests/modules/kleborate/test.yml index 30d854d5..413ac2ae 100644 --- a/tests/modules/kleborate/test.yml +++ b/tests/modules/kleborate/test.yml @@ -4,4 +4,4 @@ - kleborate files: - path: output/kleborate/test.results.txt - contains: ['strain', 'genome', 'scaffolds'] + contains: ["strain", "genome", "scaffolds"] diff --git a/tests/modules/kraken2/kraken2/main.nf b/tests/modules/kraken2/kraken2/main.nf index 12399e9e..4a3593e4 100644 --- a/tests/modules/kraken2/kraken2/main.nf +++ b/tests/modules/kraken2/kraken2/main.nf @@ -9,10 +9,10 @@ workflow test_kraken2_kraken2_single_end { input = [ [ id:'test', single_end:true ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] - db = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) } workflow test_kraken2_kraken2_paired_end { @@ -20,8 +20,18 @@ workflow test_kraken2_kraken2_paired_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] - db = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) - + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) +} + +workflow test_kraken2_kraken2_classifyreads { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, true ) } diff --git a/tests/modules/kraken2/kraken2/test.yml b/tests/modules/kraken2/kraken2/test.yml index 1ec413bf..af1e6e0d 100644 --- a/tests/modules/kraken2/kraken2/test.yml +++ b/tests/modules/kraken2/kraken2/test.yml @@ -1,29 +1,43 @@ -- name: kraken2 kraken2 single-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_single_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 6e3ad947ac8dee841a89216071c181cc + - path: output/untar/versions.yml -- name: kraken2 kraken2 paired-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_paired_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified_1.fastq.gz - should_exist: true - path: output/kraken2/test.classified_2.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_1.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_2.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified_1.fastq.gz + - path: output/kraken2/test.unclassified_2.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 604482fe7a4519f890fae9c8beb1bd6e + - path: output/untar/versions.yml + +- name: kraken2 kraken2 test_kraken2_kraken2_classifyreads + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_classifyreads -c tests/config/nextflow.config + tags: + - kraken2 + - kraken2/kraken2 + files: + - path: output/kraken2/test.kraken2.classifiedreads.txt + md5sum: e7a90531f0d8d777316515c36fe4cae0 + - path: output/kraken2/test.kraken2.report.txt + md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/versions.yml + md5sum: 3488c304259e83c5bea573403293fce9 + - path: output/untar/versions.yml diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index a23e6fcb..7b39ee82 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,15 +2,27 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -workflow test_krona_ktimporttaxonomy { +workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) +} + +workflow test_krona_ktimporttaxonomy_report { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) + ] + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) + + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 8730f1c4..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,4 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: KRONA_KTIMPORTTAXONOMY_READS { + ext.args = '-t 3' + } + + withName: KRONA_KTIMPORTTAXONOMY_REPORT { + ext.args = '-m 3 -t 5' + } + } diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b7748980..ffcb5669 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,9 +1,23 @@ -- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy - command: nextflow run ./tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktimporttaxonomy/nextflow.config +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html contains: - "DOCTYPE html PUBLIC" + - path: output/krona/versions.yml + md5sum: 660a8c151191bf4c63bd96db2c7fe503 + +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttaxonomy + files: + - path: output/krona/taxonomy.krona.html + contains: + - "DOCTYPE html PUBLIC" + - path: output/krona/versions.yml + md5sum: 8a593c16bb2d4132638fb0fc342fe2b7 diff --git a/tests/modules/krona/ktimporttext/main.nf b/tests/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..3d288b7b --- /dev/null +++ b/tests/modules/krona/ktimporttext/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTIMPORTTEXT } from '../../../../modules/krona/ktimporttext/main.nf' + +workflow test_krona_ktimporttext_multi { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/ktimporttext.txt', checkIfExists: true), // krona default test file + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true), //Kraken2 report file + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/kaiju_out4krona.txt', checkIfExists: true) // Kaiju output 4 krona + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} + +workflow test_krona_ktimporttext_single { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('http://krona.sourceforge.net/examples/text.txt', checkIfExists: true) // krona default test file + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} diff --git a/tests/modules/krona/ktimporttext/nextflow.config b/tests/modules/krona/ktimporttext/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/krona/ktimporttext/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/krona/ktimporttext/test.yml b/tests/modules/krona/ktimporttext/test.yml new file mode 100644 index 00000000..93ae12da --- /dev/null +++ b/tests/modules/krona/ktimporttext/test.yml @@ -0,0 +1,19 @@ +- name: krona ktimporttext test_krona_ktimporttext_multi + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_multi -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" + +- name: krona ktimporttext test_krona_ktimporttext_single + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_single -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" diff --git a/tests/modules/krona/ktupdatetaxonomy/main.nf b/tests/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..d2d18f31 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTUPDATETAXONOMY } from '../../../../modules/krona/ktupdatetaxonomy/main.nf' + +workflow test_krona_ktupdatetaxonomy { + KRONA_KTUPDATETAXONOMY ( ) +} diff --git a/tests/modules/krona/ktupdatetaxonomy/nextflow.config b/tests/modules/krona/ktupdatetaxonomy/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/krona/ktupdatetaxonomy/test.yml b/tests/modules/krona/ktupdatetaxonomy/test.yml new file mode 100644 index 00000000..b50fe8f2 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/test.yml @@ -0,0 +1,7 @@ +- name: krona ktupdatetaxonomy test_krona_ktupdatetaxonomy + command: nextflow run ./tests/modules/krona/ktupdatetaxonomy -entry test_krona_ktupdatetaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktupdatetaxonomy/nextflow.config + tags: + - krona + - krona/ktupdatetaxonomy + files: + - path: output/krona/taxonomy/taxonomy.tab diff --git a/tests/modules/last/lastal/main.nf b/tests/modules/last/lastal/main.nf index 95c2f917..76e124c3 100644 --- a/tests/modules/last/lastal/main.nf +++ b/tests/modules/last/lastal/main.nf @@ -10,10 +10,10 @@ workflow test_last_lastal_with_dummy_param_file { input = [ [ id:'contigs', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true), [] ] - db = [ file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] + db = [ [], file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - LAST_LASTAL ( input, UNTAR.out.untar) + LAST_LASTAL ( input, UNTAR.out.untar.map{ it[1] }) } workflow test_last_lastal_with_real_param_file { @@ -21,8 +21,8 @@ workflow test_last_lastal_with_real_param_file { input = [ [ id:'contigs', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['contigs_genome_par'], checkIfExists: true) ] - db = [ file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] + db = [ [], file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - LAST_LASTAL ( input, UNTAR.out.untar) + LAST_LASTAL ( input, UNTAR.out.untar.map{ it[1] }) } diff --git a/tests/modules/last/train/main.nf b/tests/modules/last/train/main.nf index 0f280a82..2e10735e 100644 --- a/tests/modules/last/train/main.nf +++ b/tests/modules/last/train/main.nf @@ -7,9 +7,9 @@ include { LAST_TRAIN } from '../../../../modules/last/train/main.nf' workflow test_last_train { - db = [ file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] + db = [ [], file(params.test_data['sarscov2']['genome']['lastdb_tar_gz'], checkIfExists: true) ] input = [ [ id:'contigs' ], // meta map file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) ] UNTAR ( db ) - LAST_TRAIN ( input, UNTAR.out.untar ) + LAST_TRAIN ( input, UNTAR.out.untar.map{ it[1] } ) } diff --git a/tests/modules/legsta/main.nf b/tests/modules/legsta/main.nf new file mode 100644 index 00000000..606d8209 --- /dev/null +++ b/tests/modules/legsta/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { LEGSTA } from '../../../modules/legsta/main.nf' + +workflow test_legsta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + LEGSTA ( input ) +} diff --git a/tests/modules/legsta/nextflow.config b/tests/modules/legsta/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/legsta/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/legsta/test.yml b/tests/modules/legsta/test.yml new file mode 100644 index 00000000..8ac28a7e --- /dev/null +++ b/tests/modules/legsta/test.yml @@ -0,0 +1,9 @@ +- name: legsta test_legsta + command: nextflow run tests/modules/legsta -entry test_legsta -c tests/config/nextflow.config + tags: + - legsta + files: + - path: output/legsta/test.tsv + md5sum: c493bdd19335de4828aa8b4e3ce7e1f8 + - path: output/legsta/versions.yml + md5sum: d16c5f6fd68d2bcc2c71954e3342aabe diff --git a/tests/modules/lima/test.yml b/tests/modules/lima/test.yml index 8d927624..2278cc90 100644 --- a/tests/modules/lima/test.yml +++ b/tests/modules/lima/test.yml @@ -8,9 +8,9 @@ - path: output/lima/test.fl.NEB_5p--NEB_Clontech_3p.bam.pbi md5sum: 6ae7f057304ad17dd9d5f565d72d3f7b - path: output/lima/test.fl.NEB_5p--NEB_Clontech_3p.consensusreadset.xml - contains: [ 'ConsensusReadSet' ] + contains: ["ConsensusReadSet"] - path: output/lima/test.fl.json - contains: [ 'ConsensusReadSet' ] + contains: ["ConsensusReadSet"] - path: output/lima/test.fl.lima.clips md5sum: fa03bc75bd78b2648a139fd67c69208f - path: output/lima/test.fl.lima.counts diff --git a/tests/modules/lissero/test.yml b/tests/modules/lissero/test.yml index 8dd7339e..688cfa82 100644 --- a/tests/modules/lissero/test.yml +++ b/tests/modules/lissero/test.yml @@ -4,4 +4,4 @@ - lissero files: - path: output/lissero/test.tsv - contains: ['ID', 'SEROTYPE', 'FULL'] + contains: ["ID", "SEROTYPE", "FULL"] diff --git a/tests/modules/lofreq/call/test.yml b/tests/modules/lofreq/call/test.yml index b9f42542..c84d08fb 100644 --- a/tests/modules/lofreq/call/test.yml +++ b/tests/modules/lofreq/call/test.yml @@ -5,4 +5,7 @@ - lofreq/call files: - path: output/lofreq/test.vcf.gz - contains: ['##INFO='] + contains: + [ + '##INFO=', + ] diff --git a/tests/modules/lofreq/callparallel/test.yml b/tests/modules/lofreq/callparallel/test.yml index db281012..c21eeaa7 100644 --- a/tests/modules/lofreq/callparallel/test.yml +++ b/tests/modules/lofreq/callparallel/test.yml @@ -5,4 +5,7 @@ - lofreq files: - path: output/lofreq/test.vcf.gz - contains: ['##INFO='] + contains: + [ + '##INFO=', + ] diff --git a/tests/modules/mafft/main.nf b/tests/modules/mafft/main.nf new file mode 100644 index 00000000..7f50b35a --- /dev/null +++ b/tests/modules/mafft/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MAFFT } from '../../../modules/mafft/main.nf' + +workflow test_mafft { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['scaffolds_fasta'], checkIfExists: true) + ] + + MAFFT ( input ) +} diff --git a/tests/modules/mafft/nextflow.config b/tests/modules/mafft/nextflow.config new file mode 100644 index 00000000..46cc926e --- /dev/null +++ b/tests/modules/mafft/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = "--auto" + +} diff --git a/tests/modules/mafft/test.yml b/tests/modules/mafft/test.yml new file mode 100644 index 00000000..cd40caa7 --- /dev/null +++ b/tests/modules/mafft/test.yml @@ -0,0 +1,9 @@ +- name: mafft test_mafft + command: nextflow run tests/modules/mafft -entry test_mafft -c tests/config/nextflow.config + tags: + - mafft + files: + - path: output/mafft/test.fas + md5sum: 23426611f4a0df532b6708f072bd445b + - path: output/mafft/versions.yml + md5sum: b1b5ab3728ae17401808335f1c8f8215 diff --git a/tests/modules/malt/build_test/main.nf b/tests/modules/malt/build_test/main.nf index 2542da0c..c314d82c 100644 --- a/tests/modules/malt/build_test/main.nf +++ b/tests/modules/malt/build_test/main.nf @@ -9,18 +9,18 @@ workflow test_malt_build { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) seq_type = "DNA" gff = [] - map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) + map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] UNZIP ( map_db ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive.map{ it[1] } ) } workflow test_malt_build_gff { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) seq_type = "DNA" gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) - map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) + map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] UNZIP ( map_db ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive.map{ it[1] } ) } diff --git a/tests/modules/malt/run/main.nf b/tests/modules/malt/run/main.nf index 292a3fcf..7501652d 100644 --- a/tests/modules/malt/run/main.nf +++ b/tests/modules/malt/run/main.nf @@ -2,20 +2,24 @@ nextflow.enable.dsl = 2 -include { UNZIP } from '../../../../modules/unzip/main.nf' +include { UNZIP } from '../../../../modules/unzip/main.nf' include { MALT_BUILD } from '../../../../modules/malt/build/main.nf' -include { MALT_RUN } from '../../../../modules/malt/run/main.nf' +include { MALT_RUN } from '../../../../modules/malt/run/main.nf' workflow test_malt_run { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) seq_type = "DNA" - map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) - input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] mode = "BlastN" UNZIP ( map_db ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive.map { it[1] } ) MALT_RUN ( input, mode, MALT_BUILD.out.index ) } + diff --git a/tests/modules/malt/run/test.yml b/tests/modules/malt/run/test.yml index 5b0742e4..8ad44094 100644 --- a/tests/modules/malt/run/test.yml +++ b/tests/modules/malt/run/test.yml @@ -5,5 +5,4 @@ - malt/run files: - path: output/malt/test_1.rma6 - - path: output/malt/malt-run.log - + - path: output/malt/test-malt-run.log diff --git a/tests/modules/maltextract/main.nf b/tests/modules/maltextract/main.nf index 8e0a2241..ed1e32c9 100644 --- a/tests/modules/maltextract/main.nf +++ b/tests/modules/maltextract/main.nf @@ -4,24 +4,28 @@ nextflow.enable.dsl = 2 include { UNZIP as UNZIP_MALT } from '../../../modules/unzip/main.nf' include { UNZIP as UNZIP_MALTEXTRACT } from '../../../modules/unzip/main.nf' -include { MALT_BUILD } from '../../../modules/malt/build/main.nf' -include { MALT_RUN } from '../../../modules/malt/run/main.nf' -include { MALTEXTRACT } from '../../../modules/maltextract/main.nf' +include { MALT_BUILD } from '../../../modules/malt/build/main.nf' +include { MALT_RUN } from '../../../modules/malt/run/main.nf' +include { MALTEXTRACT } from '../../../modules/maltextract/main.nf' workflow test_maltextract { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) gff = [] seq_type = "DNA" - map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) - input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] mode = "BlastN" taxon_list = file(params.test_data['sarscov2']['genome']['taxon_list_txt'], checkIfExists: true) - ncbi_dir = file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) + ncbi_dir = [ [], file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) ] UNZIP_MALT ( map_db ) UNZIP_MALTEXTRACT ( ncbi_dir ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP_MALT.out.unzipped_archive ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP_MALT.out.unzipped_archive.map{ it[1] } ) MALT_RUN ( input, mode, MALT_BUILD.out.index ) - MALTEXTRACT ( MALT_RUN.out.rma6, taxon_list, UNZIP_MALTEXTRACT.out.unzipped_archive) + ch_input_to_maltextract = MALT_RUN.out.rma6.map{ it[1] } + MALTEXTRACT ( ch_input_to_maltextract, taxon_list, UNZIP_MALTEXTRACT.out.unzipped_archive.map{ it[1] }) } diff --git a/tests/modules/maltextract/test.yml b/tests/modules/maltextract/test.yml index 2440c100..6802fe8b 100644 --- a/tests/modules/maltextract/test.yml +++ b/tests/modules/maltextract/test.yml @@ -3,8 +3,6 @@ tags: - maltextract files: - - path: output/maltextract/results/error.txt - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/maltextract/results/error.txt - path: output/maltextract/results/log.txt contains: diff --git a/tests/modules/manta/germline/main.nf b/tests/modules/manta/germline/main.nf index f8adedb0..5f6687b2 100644 --- a/tests/modules/manta/germline/main.nf +++ b/tests/modules/manta/germline/main.nf @@ -7,29 +7,42 @@ include { MANTA_GERMLINE } from '../../../../modules/manta/germline/main.nf' workflow test_manta_germline { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)], + [],[] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = [] - bed_tbi = [] - MANTA_GERMLINE ( input, fasta, fai, bed, bed_tbi ) + MANTA_GERMLINE ( input, fasta, fai ) } workflow test_manta_germline_target_bed { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)], + file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true), ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) - MANTA_GERMLINE ( input, fasta, fai, bed, bed_tbi ) + MANTA_GERMLINE ( input, fasta, fai ) +} + +workflow test_manta_germline_target_bed_jointcalling { + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram'], checkIfExists: true)], + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true),], + file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true), + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + MANTA_GERMLINE ( input, fasta, fai ) } diff --git a/tests/modules/manta/germline/nextflow.config b/tests/modules/manta/germline/nextflow.config index 8730f1c4..c82e3c5c 100644 --- a/tests/modules/manta/germline/nextflow.config +++ b/tests/modules/manta/germline/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: MANTA_GERMLINE { + ext.args = '--exome ' + } + } diff --git a/tests/modules/manta/germline/test.yml b/tests/modules/manta/germline/test.yml index c6ead9eb..7ded24ad 100644 --- a/tests/modules/manta/germline/test.yml +++ b/tests/modules/manta/germline/test.yml @@ -22,3 +22,15 @@ - path: output/manta/test.candidate_sv.vcf.gz.tbi - path: output/manta/test.diploid_sv.vcf.gz - path: output/manta/test.diploid_sv.vcf.gz.tbi +- name: manta germline target bed jointcalling + command: nextflow run ./tests/modules/manta/germline -entry test_manta_germline_target_bed_jointcalling -c ./tests/config/nextflow.config -c ./tests/modules/manta/germline/nextflow.config + tags: + - manta + - manta/germline + files: + - path: output/manta/test.candidate_small_indels.vcf.gz + - path: output/manta/test.candidate_small_indels.vcf.gz.tbi + - path: output/manta/test.candidate_sv.vcf.gz + - path: output/manta/test.candidate_sv.vcf.gz.tbi + - path: output/manta/test.diploid_sv.vcf.gz + - path: output/manta/test.diploid_sv.vcf.gz.tbi diff --git a/tests/modules/manta/somatic/main.nf b/tests/modules/manta/somatic/main.nf index 7da41bea..b32a273e 100644 --- a/tests/modules/manta/somatic/main.nf +++ b/tests/modules/manta/somatic/main.nf @@ -11,13 +11,30 @@ workflow test_manta_somatic { file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + [], [] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - MANTA_SOMATIC ( input, fasta, fai, bed, bed_tbi ) + MANTA_SOMATIC ( input, fasta, fai ) +} + +workflow test_manta_somatic_target_bed { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz_tbi'], checkIfExists: true), + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + + MANTA_SOMATIC ( input, fasta, fai ) } diff --git a/tests/modules/manta/tumoronly/main.nf b/tests/modules/manta/tumoronly/main.nf index be0d3dbb..dbe07914 100644 --- a/tests/modules/manta/tumoronly/main.nf +++ b/tests/modules/manta/tumoronly/main.nf @@ -8,28 +8,27 @@ workflow test_manta_tumoronly { input = [ [ id:'test'], // meta map file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + [], [] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = [] - bed_tbi = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - MANTA_TUMORONLY ( input, fasta, fai, bed, bed_tbi ) + MANTA_TUMORONLY ( input, fasta, fai ) } workflow test_manta_tumoronly_target_bed { input = [ [ id:'test'], // meta map file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz_tbi'], checkIfExists: true) ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - MANTA_TUMORONLY ( input, fasta, fai, bed, bed_tbi ) + MANTA_TUMORONLY ( input, fasta, fai ) } diff --git a/tests/modules/md5sum/main.nf b/tests/modules/md5sum/main.nf new file mode 100644 index 00000000..f90642b6 --- /dev/null +++ b/tests/modules/md5sum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MD5SUM } from '../../../modules/md5sum/main.nf' + +workflow test_md5sum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MD5SUM ( input ) +} diff --git a/tests/modules/md5sum/nextflow.config b/tests/modules/md5sum/nextflow.config new file mode 100644 index 00000000..0293c16f --- /dev/null +++ b/tests/modules/md5sum/nextflow.config @@ -0,0 +1,3 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } +} diff --git a/tests/modules/md5sum/test.yml b/tests/modules/md5sum/test.yml new file mode 100644 index 00000000..1e6517a7 --- /dev/null +++ b/tests/modules/md5sum/test.yml @@ -0,0 +1,8 @@ +- name: md5sum test_md5sum + command: nextflow run tests/modules/md5sum -entry test_md5sum -c tests/config/nextflow.config + tags: + - md5sum + files: + - path: output/md5sum/test.paired_end.bam.md5 + md5sum: 1163095be8fdfb2acb3cc6c027389c4b + - path: output/md5sum/versions.yml diff --git a/tests/modules/medaka/test.yml b/tests/modules/medaka/test.yml index 54146bdc..02bd8927 100644 --- a/tests/modules/medaka/test.yml +++ b/tests/modules/medaka/test.yml @@ -4,4 +4,4 @@ - medaka files: - path: output/medaka/test.polished.genome.fa.gz - md5sum: f42303f1d6c2c79175faeb00e10b9a6e \ No newline at end of file + md5sum: f42303f1d6c2c79175faeb00e10b9a6e diff --git a/tests/modules/megan/rma2info/main.nf b/tests/modules/megan/rma2info/main.nf new file mode 100644 index 00000000..edbe9a49 --- /dev/null +++ b/tests/modules/megan/rma2info/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MEGAN_RMA2INFO } from '../../../../modules/megan/rma2info/main.nf' + +workflow test_megan_rma2info { + + input = [ + [ id:'test', single_end:false ], // meta map + file('https://github.com/nf-core/test-datasets/raw/a7e61654553887475a2f7178108587ecd9b54608/data/delete_me/malt/test.rma6', checkIfExists: true) + ] + megan_summary = true + + MEGAN_RMA2INFO ( input, megan_summary ) +} diff --git a/tests/modules/megan/rma2info/nextflow.config b/tests/modules/megan/rma2info/nextflow.config new file mode 100644 index 00000000..3fd8dcdb --- /dev/null +++ b/tests/modules/megan/rma2info/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: MEGAN_RMA2INFO { + ext.args = "-c2c Taxonomy" + } + +} diff --git a/tests/modules/megan/rma2info/test.yml b/tests/modules/megan/rma2info/test.yml new file mode 100644 index 00000000..dc845bea --- /dev/null +++ b/tests/modules/megan/rma2info/test.yml @@ -0,0 +1,12 @@ +- name: megan rma2info test_megan_rma2info + command: nextflow run tests/modules/megan/rma2info -entry test_megan_rma2info -c tests/config/nextflow.config + tags: + - megan + - megan/rma2info + files: + - path: output/megan/test.megan + contains: + - "@Creator" + - path: output/megan/test.txt.gz + md5sum: 5c3b876aa0abef12158bcd7c3702740f + - path: output/megan/versions.yml diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf new file mode 100644 index 00000000..3c9a64c7 --- /dev/null +++ b/tests/modules/meryl/count/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' + +workflow test_meryl_count_single_end { + + input = [ + [ id:'test' , single_end: true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) +} + +workflow test_meryl_count_paired_end { + + input = [ + [ id:'test' , single_end: false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + + MERYL_COUNT ( input ) +} diff --git a/tests/modules/meryl/count/nextflow.config b/tests/modules/meryl/count/nextflow.config new file mode 100644 index 00000000..6d899c50 --- /dev/null +++ b/tests/modules/meryl/count/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + +} diff --git a/tests/modules/meryl/count/test.yml b/tests/modules/meryl/count/test.yml new file mode 100644 index 00000000..6291a62f --- /dev/null +++ b/tests/modules/meryl/count/test.yml @@ -0,0 +1,17 @@ +- name: meryl count test_meryl_count_single_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 5fe537d873925ccbcc4edf0983e9eda0 + +- name: meryl count test_meryl_count_paired_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_paired_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 4961f13cfb60ba8764ed666e70dbf12c diff --git a/tests/modules/meryl/histogram/main.nf b/tests/modules/meryl/histogram/main.nf new file mode 100644 index 00000000..697a12ef --- /dev/null +++ b/tests/modules/meryl/histogram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' +include { MERYL_HISTOGRAM } from '../../../../modules/meryl/histogram/main.nf' + +workflow test_meryl_histogram { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) + MERYL_HISTOGRAM ( MERYL_COUNT.out.meryl_db ) +} diff --git a/tests/modules/meryl/histogram/nextflow.config b/tests/modules/meryl/histogram/nextflow.config new file mode 100644 index 00000000..6d899c50 --- /dev/null +++ b/tests/modules/meryl/histogram/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + +} diff --git a/tests/modules/meryl/histogram/test.yml b/tests/modules/meryl/histogram/test.yml new file mode 100644 index 00000000..dce26b65 --- /dev/null +++ b/tests/modules/meryl/histogram/test.yml @@ -0,0 +1,10 @@ +- name: meryl histogram test_meryl_histogram + command: nextflow run tests/modules/meryl/histogram -entry test_meryl_histogram -c tests/config/nextflow.config + tags: + - meryl/histogram + - meryl + files: + - path: output/meryl/test.hist + md5sum: 4bfdc8b287ee0cfd9922bbfa8cd64650 + - path: output/meryl/versions.yml + md5sum: 050038f1b1df79977a393cce1b4b2ddb diff --git a/tests/modules/meryl/unionsum/main.nf b/tests/modules/meryl/unionsum/main.nf new file mode 100644 index 00000000..6dd40c82 --- /dev/null +++ b/tests/modules/meryl/unionsum/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' +include { MERYL_UNIONSUM } from '../../../../modules/meryl/unionsum/main.nf' + +workflow test_meryl_unionsum_single_end { + + input = [ + [ id:'test', single_end: true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) + MERYL_UNIONSUM ( MERYL_COUNT.out.meryl_db ) +} + +workflow test_meryl_unionsum_paired_end { + + input = [ + [ id:'test', single_end: false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + + MERYL_COUNT ( input ) + MERYL_UNIONSUM ( MERYL_COUNT.out.meryl_db ) +} diff --git a/tests/modules/meryl/unionsum/nextflow.config b/tests/modules/meryl/unionsum/nextflow.config new file mode 100644 index 00000000..6d899c50 --- /dev/null +++ b/tests/modules/meryl/unionsum/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + +} diff --git a/tests/modules/meryl/unionsum/test.yml b/tests/modules/meryl/unionsum/test.yml new file mode 100644 index 00000000..10a1a155 --- /dev/null +++ b/tests/modules/meryl/unionsum/test.yml @@ -0,0 +1,17 @@ +- name: meryl unionsum test_meryl_unionsum_single_end + command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum_single_end -c tests/config/nextflow.config + tags: + - meryl + - meryl/unionsum + files: + - path: output/meryl/versions.yml + md5sum: 7de859c6d3a29d72f6c9c976609d0913 + +- name: meryl unionsum test_meryl_unionsum_paired_end + command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum_paired_end -c tests/config/nextflow.config + tags: + - meryl + - meryl/unionsum + files: + - path: output/meryl/versions.yml + md5sum: a16decdec014ccb9bdab69a4a1d30818 diff --git a/tests/modules/metaphlan3/main.nf b/tests/modules/metaphlan3/main.nf index 3354d2d9..5d2ee1d1 100644 --- a/tests/modules/metaphlan3/main.nf +++ b/tests/modules/metaphlan3/main.nf @@ -12,10 +12,10 @@ workflow test_metaphlan3_single_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] - db = channel.fromPath('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', type: 'dir', checkIfExists: true) + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ] UNTAR ( db ) - METAPHLAN3 ( input, UNTAR.out.untar ) + METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } ) } workflow test_metaphlan3_paired_end { @@ -25,11 +25,10 @@ workflow test_metaphlan3_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] - db = channel.fromPath('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', type: 'dir', checkIfExists: true) - + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ] UNTAR ( db ) - METAPHLAN3 ( input, UNTAR.out.untar ) + METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } ) } workflow test_metaphlan3_sam { @@ -38,12 +37,11 @@ workflow test_metaphlan3_sam { [ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] ] - db = channel.fromPath('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', type: 'dir', checkIfExists: true) - + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ] UNTAR ( db ) SAMTOOLS_VIEW ( input, [] ) - METAPHLAN3 ( SAMTOOLS_VIEW.out.bam, UNTAR.out.untar ) + METAPHLAN3 ( SAMTOOLS_VIEW.out.bam, UNTAR.out.untar.map{ it[1] } ) } workflow test_metaphlan3_fasta { @@ -52,8 +50,8 @@ workflow test_metaphlan3_fasta { [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] ] - db = channel.fromPath('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', type: 'dir', checkIfExists: true) + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan_database.tar.gz', checkIfExists: true) ] UNTAR ( db ) - METAPHLAN3 ( input, UNTAR.out.untar ) + METAPHLAN3 ( input, UNTAR.out.untar.map{ it[1] } ) } diff --git a/tests/modules/metaphlan3/test.yml b/tests/modules/metaphlan3/test.yml index 92e731d2..2a3bee01 100644 --- a/tests/modules/metaphlan3/test.yml +++ b/tests/modules/metaphlan3/test.yml @@ -5,7 +5,7 @@ files: - path: output/metaphlan3/test.biom contains: - - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' - path: output/metaphlan3/test.bowtie2out.txt md5sum: ef46a9c6a8ce9cae26fbfd5527116fd5 - path: output/metaphlan3/test_profile.txt @@ -36,7 +36,7 @@ files: - path: output/metaphlan3/test.biom contains: - - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' - path: output/metaphlan3/test.bowtie2out.txt md5sum: ce11486fcc0e68fe7152867a3634e09a - path: output/metaphlan3/test_profile.txt @@ -67,7 +67,7 @@ files: - path: output/metaphlan3/test.biom contains: - - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' - path: output/metaphlan3/test_profile.txt md5sum: e050d49f7df8a23617880ef9ed7745a0 - path: output/samtools/test.sam.bam @@ -98,7 +98,7 @@ files: - path: output/metaphlan3/test.biom contains: - - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' - path: output/metaphlan3/test.bowtie2out.txt md5sum: fece494a410b8328608a11de10af6396 - path: output/metaphlan3/test_profile.txt diff --git a/tests/modules/minimap2/align/main.nf b/tests/modules/minimap2/align/main.nf index e507d3e5..ee6c0838 100644 --- a/tests/modules/minimap2/align/main.nf +++ b/tests/modules/minimap2/align/main.nf @@ -9,8 +9,11 @@ workflow test_minimap2_align_single_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam) } workflow test_minimap2_align_paired_end { @@ -19,6 +22,9 @@ workflow test_minimap2_align_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam ) } diff --git a/tests/modules/minimap2/align/test.yml b/tests/modules/minimap2/align/test.yml index 598a5d25..c392e313 100644 --- a/tests/modules/minimap2/align/test.yml +++ b/tests/modules/minimap2/align/test.yml @@ -1,17 +1,17 @@ -- name: minimap2 align single-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_single_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_single_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 70e8cf299ee3ecd33e629d10c1f588ce + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml -- name: minimap2 align paired-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_paired_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28 \ No newline at end of file + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml diff --git a/tests/modules/mobsuite/recon/main.nf b/tests/modules/mobsuite/recon/main.nf new file mode 100644 index 00000000..0d18ef9c --- /dev/null +++ b/tests/modules/mobsuite/recon/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MOBSUITE_RECON } from '../../../../modules/mobsuite/recon/main.nf' + +workflow test_mobsuite_recon { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + MOBSUITE_RECON ( input ) +} diff --git a/tests/modules/mobsuite/recon/nextflow.config b/tests/modules/mobsuite/recon/nextflow.config new file mode 100644 index 00000000..06a716aa --- /dev/null +++ b/tests/modules/mobsuite/recon/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/mobsuite/recon/test.yml b/tests/modules/mobsuite/recon/test.yml new file mode 100644 index 00000000..dfff835b --- /dev/null +++ b/tests/modules/mobsuite/recon/test.yml @@ -0,0 +1,12 @@ +- name: mobsuite recon test_mobsuite_recon + command: nextflow run tests/modules/mobsuite/recon -entry test_mobsuite_recon -c tests/config/nextflow.config + tags: + - mobsuite/recon + - mobsuite + files: + - path: output/mobsuite/results/chromosome.fasta + md5sum: 33b2a0fa321c73c6ba8d8272dd53c6d4 + - path: output/mobsuite/results/contig_report.txt + md5sum: a0ae364a9f2b475f77588d0b3c24b857 + - path: output/mobsuite/versions.yml + md5sum: 7f7a0f8957394b0e526233a0edb8e20a diff --git a/tests/modules/mosdepth/main.nf b/tests/modules/mosdepth/main.nf index 8862204d..ddd68129 100644 --- a/tests/modules/mosdepth/main.nf +++ b/tests/modules/mosdepth/main.nf @@ -7,10 +7,30 @@ include { MOSDEPTH } from '../../../modules/mosdepth/main.nf' workflow test_mosdepth { input = [ [ id:'test', single_end:true ], [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] + ] + + MOSDEPTH ( input, [], [] ) +} + + +workflow test_mosdepth_window { + input = [ [ id:'test', single_end:true ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] ] - dummy = file("dummy_file.txt") window = 100 - MOSDEPTH ( input, dummy, window ) + MOSDEPTH ( input, [], window ) +} + + +workflow test_mosdepth_bed { + input = [ [ id:'test', single_end:true ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] + ] + bed = [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] + + MOSDEPTH ( input, bed, [] ) } diff --git a/tests/modules/mosdepth/test.yml b/tests/modules/mosdepth/test.yml index e264ef3b..c66e0b89 100644 --- a/tests/modules/mosdepth/test.yml +++ b/tests/modules/mosdepth/test.yml @@ -4,16 +4,50 @@ - mosdepth files: - path: ./output/mosdepth/test.per-base.bed.gz.csi - md5sum: aa68536f55883aa60f4e68ac9b108358 + md5sum: b2aad62c41a7146680d31df505fcc8c5 - path: ./output/mosdepth/test.per-base.bed.gz - md5sum: b5f9c8ca49be6128a486f6b56514a6d0 + md5sum: 11b3f649072c2c7453febb085b1a9c33 + - path: ./output/mosdepth/test.mosdepth.global.dist.txt + md5sum: 2a1de1b0ecc361a21cd296ec4e1efd6a + - path: ./output/mosdepth/test.mosdepth.summary.txt + md5sum: 7b249dd3b3e58cc122fbd25ea84aa25d + +- name: mosdepth window + command: nextflow run ./tests/modules/mosdepth -entry test_mosdepth_window -c ./tests/config/nextflow.config -c ./tests/modules/mosdepth/nextflow.config + tags: + - mosdepth + files: + - path: ./output/mosdepth/test.per-base.bed.gz.csi + md5sum: b2aad62c41a7146680d31df505fcc8c5 + - path: ./output/mosdepth/test.per-base.bed.gz + md5sum: 11b3f649072c2c7453febb085b1a9c33 - path: ./output/mosdepth/test.mosdepth.global.dist.txt md5sum: 2a1de1b0ecc361a21cd296ec4e1efd6a - path: ./output/mosdepth/test.regions.bed.gz - md5sum: 8e020ec602c02d240e0458642cf5ac5a + md5sum: 64e1ced01c4443d7c1796ef553992f0c - path: ./output/mosdepth/test.regions.bed.gz.csi - md5sum: 44aec43fc34785fcbe6d830c907c617a + md5sum: 9e312b4b0784bd46dfbd23b3a8afed6a - path: ./output/mosdepth/test.mosdepth.region.dist.txt md5sum: 65fbc824c4212c6884354d8ac72ad37e - path: ./output/mosdepth/test.mosdepth.summary.txt md5sum: 11804907dab069ddb99ca97bf2698572 + +- name: mosdepth bed + command: nextflow run ./tests/modules/mosdepth -entry test_mosdepth_bed -c ./tests/config/nextflow.config -c ./tests/modules/mosdepth/nextflow.config + tags: + - mosdepth + files: + - path: ./output/mosdepth/test.per-base.bed.gz.csi + md5sum: b2aad62c41a7146680d31df505fcc8c5 + - path: ./output/mosdepth/test.per-base.bed.gz + md5sum: 11b3f649072c2c7453febb085b1a9c33 + - path: ./output/mosdepth/test.mosdepth.global.dist.txt + md5sum: 2a1de1b0ecc361a21cd296ec4e1efd6a + - path: ./output/mosdepth/test.regions.bed.gz + md5sum: 347f877700d1dc42c95157199eff25d5 + - path: ./output/mosdepth/test.regions.bed.gz.csi + md5sum: ed5fbf46e3bdcbf60094df295bc40356 + - path: ./output/mosdepth/test.mosdepth.region.dist.txt + md5sum: 295564628113d2ec0ca34d7f661cfea8 + - path: ./output/mosdepth/test.mosdepth.summary.txt + md5sum: b07817412fd17819c14541e63bc4926c diff --git a/tests/modules/motus/downloaddb/main.nf b/tests/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..f7680ca9 --- /dev/null +++ b/tests/modules/motus/downloaddb/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf' + +workflow test_motus_downloaddb { + + input = file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py') + + MOTUS_DOWNLOADDB ( input ) +} diff --git a/tests/modules/motus/downloaddb/nextflow.config b/tests/modules/motus/downloaddb/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/motus/downloaddb/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml new file mode 100644 index 00000000..e61f937f --- /dev/null +++ b/tests/modules/motus/downloaddb/test.yml @@ -0,0 +1,7 @@ +- name: motus downloaddb test_motus_downloaddb + command: nextflow run tests/modules/motus/downloaddb -entry test_motus_downloaddb -c tests/config/nextflow.config + tags: + - motus + - motus/downloaddb + files: + - path: output/motus/db_mOTU/db_mOTU_versions diff --git a/tests/modules/msisensorpro/msi_somatic/main.nf b/tests/modules/msisensorpro/msi_somatic/main.nf new file mode 100644 index 00000000..4516ada5 --- /dev/null +++ b/tests/modules/msisensorpro/msi_somatic/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MSISENSORPRO_MSI_SOMATIC } from '../../../../modules/msisensorpro/msi_somatic/main.nf' +include { MSISENSORPRO_SCAN } from '../../../../modules/msisensorpro/scan/main.nf' + +workflow test_msisensorpro_msi { + + scan_in = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + ] + + println scan_in + + MSISENSORPRO_SCAN ( scan_in ) + + input = [// meta map + [ id:'test'], + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + + MSISENSORPRO_SCAN.out.list.map{meta, list -> [list]}.set{list} + MSISENSORPRO_MSI_SOMATIC(input, fasta, list) + + +} diff --git a/tests/modules/msisensorpro/msi_somatic/nextflow.config b/tests/modules/msisensorpro/msi_somatic/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/msisensorpro/msi_somatic/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/msisensorpro/msi_somatic/test.yml b/tests/modules/msisensorpro/msi_somatic/test.yml new file mode 100644 index 00000000..22e7e864 --- /dev/null +++ b/tests/modules/msisensorpro/msi_somatic/test.yml @@ -0,0 +1,18 @@ +- name: msisensorpro msi_somatic test_msisensorpro_msi + command: nextflow run tests/modules/msisensorpro/msi_somatic -entry test_msisensorpro_msi -c tests/config/nextflow.config + tags: + - msisensorpro/msi_somatic + - msisensorpro + files: + - path: output/msisensorpro/test + md5sum: db7f2cc99ea79f79b0ba011c4bcbb43d + - path: output/msisensorpro/test.msisensor_scan.list + md5sum: 309d41b136993db24a9f3dade877753b + - path: output/msisensorpro/test_dis + md5sum: fc3e205b7ca50c9ecf3f70c87781e96f + - path: output/msisensorpro/test_germline + md5sum: ba585b355c08877b8bca4901f49d9311 + - path: output/msisensorpro/test_somatic + md5sum: 836e617ddded07ec1e39089fd595c3d8 + - path: output/msisensorpro/versions.yml + md5sum: b57279502ca6863c5406ed46e6b42994 diff --git a/tests/modules/msisensorpro/scan/main.nf b/tests/modules/msisensorpro/scan/main.nf new file mode 100644 index 00000000..cf57b820 --- /dev/null +++ b/tests/modules/msisensorpro/scan/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MSISENSORPRO_SCAN } from '../../../../modules/msisensorpro/scan/main.nf' + +workflow test_msisensorpro_scan { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + ] + + MSISENSORPRO_SCAN ( input ) +} diff --git a/tests/modules/msisensorpro/scan/nextflow.config b/tests/modules/msisensorpro/scan/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/msisensorpro/scan/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/msisensorpro/scan/test.yml b/tests/modules/msisensorpro/scan/test.yml new file mode 100644 index 00000000..be5100e2 --- /dev/null +++ b/tests/modules/msisensorpro/scan/test.yml @@ -0,0 +1,10 @@ +- name: msisensorpro scan test_msisensorpro_scan + command: nextflow run tests/modules/msisensorpro/scan -entry test_msisensorpro_scan -c tests/config/nextflow.config + tags: + - msisensorpro + - msisensorpro/scan + files: + - path: output/msisensorpro/test.msisensor_scan.list + md5sum: 309d41b136993db24a9f3dade877753b + - path: output/msisensorpro/versions.yml + md5sum: ed713232c854bce5c74d10097101ed06 diff --git a/tests/modules/nanoplot/test.yml b/tests/modules/nanoplot/test.yml index 6549953e..fc100a12 100644 --- a/tests/modules/nanoplot/test.yml +++ b/tests/modules/nanoplot/test.yml @@ -1,4 +1,3 @@ - - name: nanoplot_summary command: nextflow run ./tests/modules/nanoplot -entry test_nanoplot_summary -c ./tests/config/nextflow.config -c ./tests/modules/nanoplot/nextflow.config tags: diff --git a/tests/modules/ngscheckmate/ncm/main.nf b/tests/modules/ngscheckmate/ncm/main.nf new file mode 100644 index 00000000..ab6a4639 --- /dev/null +++ b/tests/modules/ngscheckmate/ncm/main.nf @@ -0,0 +1,63 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { NGSCHECKMATE_NCM as NGSCHECKMATE_NCM_BAM} from '../../../../modules/ngscheckmate/ncm/main.nf' +include { NGSCHECKMATE_NCM as NGSCHECKMATE_NCM_VCF} from '../../../../modules/ngscheckmate/ncm/main.nf' + +include { BEDTOOLS_MAKEWINDOWS } from '../../../../modules/bedtools/makewindows/main.nf' + +include { BCFTOOLS_MPILEUP } from '../../../../modules/bcftools/mpileup/main.nf' +include { BCFTOOLS_MPILEUP as BCFTOOLS_MPILEUP2 } from '../../../../modules/bcftools/mpileup/main.nf' + +workflow test_ngscheckmate_ncm_bam { + input = [ file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)] + + fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + inputBed = [ [ id:'test'], + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] + + BEDTOOLS_MAKEWINDOWS(inputBed, true). + tab. + map{it[1]}. + view(). + set{snp_channel} + + NGSCHECKMATE_NCM_BAM(input, snp_channel, fasta) +} + +workflow test_ngscheckmate_ncm_vcf { + input1 = [ [ id:'test1' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + ] + + input2 = [ [ id:'test2' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + ] + + fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + inputBed = [ [ id:'test'], + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] + + BCFTOOLS_MPILEUP ( input1, fasta, false ) + BCFTOOLS_MPILEUP2 ( input2, fasta, false ) + + BCFTOOLS_MPILEUP2.out.vcf. + combine( BCFTOOLS_MPILEUP.out.vcf ). + map { [ it[1], it[3] ] }. + set { vcf_channel } + + BEDTOOLS_MAKEWINDOWS( inputBed, true ).tab. + map { it[1] }. + view(). + set { snp_channel } + + NGSCHECKMATE_NCM_VCF(vcf_channel, snp_channel, fasta) +} + + diff --git a/tests/modules/ngscheckmate/ncm/nextflow.config b/tests/modules/ngscheckmate/ncm/nextflow.config new file mode 100644 index 00000000..81698ecd --- /dev/null +++ b/tests/modules/ngscheckmate/ncm/nextflow.config @@ -0,0 +1,27 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BEDTOOLS_MAKEWINDOWS { + ext.args = '-w 1' + } + + withName: BCFTOOLS_MPILEUP { + ext.args2 = '--no-version --ploidy 1 --multiallelic-caller' + ext.args3 = '--no-version' + } + + withName: BCFTOOLS_MPILEUP2 { + ext.args2 = '--no-version --ploidy 1 --multiallelic-caller' + ext.args3 = '--no-version' + } + + withName: NGSCHECKMATE_NCM_VCF { + ext.args = '-V' + } + + withName: NGSCHECKMATE_NCM_BAM { + ext.args = '-B' + } + +} \ No newline at end of file diff --git a/tests/modules/ngscheckmate/ncm/test.yml b/tests/modules/ngscheckmate/ncm/test.yml new file mode 100644 index 00000000..c0c8bc00 --- /dev/null +++ b/tests/modules/ngscheckmate/ncm/test.yml @@ -0,0 +1,29 @@ +- name: ngscheckmate ncm test_ngscheckmate_ncm_bam + command: nextflow run tests/modules/ngscheckmate/ncm -entry test_ngscheckmate_ncm_bam -c tests/config/nextflow.config + tags: + - ngscheckmate/ncm + - ngscheckmate + files: + - path: output/ngscheckmate/output_all.txt + md5sum: f71a712c3f6ecf64dd526365212f1b7c + - path: output/ngscheckmate/output_corr_matrix.txt + md5sum: 6777377aa9ae3d57f841b12896318db0 + - path: output/ngscheckmate/output_matched.txt + md5sum: f71a712c3f6ecf64dd526365212f1b7c + - path: output/ngscheckmate/versions.yml + md5sum: fbb2bebd65b4f4e1e93c6bf5c08a6829 + +- name: ngscheckmate ncm test_ngscheckmate_ncm_vcf + command: nextflow run tests/modules/ngscheckmate/ncm -entry test_ngscheckmate_ncm_vcf -c tests/config/nextflow.config + tags: + - ngscheckmate/ncm + - ngscheckmate + files: + - path: output/ngscheckmate/output_all.txt + md5sum: fd74956dcac279b6f58e82ea73e344f8 + - path: output/ngscheckmate/output_corr_matrix.txt + md5sum: 0c86bdad2721c470fe6be119f291c8e5 + - path: output/ngscheckmate/output_matched.txt + md5sum: fd74956dcac279b6f58e82ea73e344f8 + - path: output/ngscheckmate/versions.yml + md5sum: f06910b83dde194a47870c553cefe193 diff --git a/tests/modules/nucmer/test.yml b/tests/modules/nucmer/test.yml index 62caced4..cebd0d4e 100644 --- a/tests/modules/nucmer/test.yml +++ b/tests/modules/nucmer/test.yml @@ -4,6 +4,6 @@ - nucmer files: - path: output/nucmer/test.coords - contains: ['MT192765.1'] + contains: ["MT192765.1"] - path: output/nucmer/test.delta - contains: ['MT192765.1'] + contains: ["MT192765.1"] diff --git a/tests/modules/optitype/main.nf b/tests/modules/optitype/main.nf index 55b46f0a..6ed14d96 100644 --- a/tests/modules/optitype/main.nf +++ b/tests/modules/optitype/main.nf @@ -6,7 +6,8 @@ include { OPTITYPE } from '../../../modules/optitype/main.nf' workflow test_optitype { input = [ [ id:'test', seq_type:'dna' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla_sorted_bam_bai'], checkIfExists: true) ] OPTITYPE ( input ) diff --git a/tests/modules/optitype/test.yml b/tests/modules/optitype/test.yml index 7c2ff0d0..0cbb99cb 100644 --- a/tests/modules/optitype/test.yml +++ b/tests/modules/optitype/test.yml @@ -6,4 +6,4 @@ - path: output/optitype/test/test_coverage_plot.pdf - path: output/optitype/test/test_result.tsv contains: - - '1446' + - "1439" diff --git a/tests/modules/panaroo/run/main.nf b/tests/modules/panaroo/run/main.nf new file mode 100644 index 00000000..1fab62ed --- /dev/null +++ b/tests/modules/panaroo/run/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PANAROO_RUN } from '../../../../modules/panaroo/run/main.nf' + +workflow test_panaroo_run { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['candidatus_portiera_aleyrodidarum']['genome']['test1_gff'], checkIfExists: true), + file(params.test_data['candidatus_portiera_aleyrodidarum']['genome']['test2_gff'], checkIfExists: true), + file(params.test_data['candidatus_portiera_aleyrodidarum']['genome']['test3_gff'], checkIfExists: true) + ] + ] + + PANAROO_RUN ( input ) +} diff --git a/tests/modules/panaroo/run/nextflow.config b/tests/modules/panaroo/run/nextflow.config new file mode 100644 index 00000000..af23e716 --- /dev/null +++ b/tests/modules/panaroo/run/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: PANAROO_RUN { + ext.args = '--clean-mode strict -a core' + } +} diff --git a/tests/modules/panaroo/run/test.yml b/tests/modules/panaroo/run/test.yml new file mode 100644 index 00000000..20f0b814 --- /dev/null +++ b/tests/modules/panaroo/run/test.yml @@ -0,0 +1,38 @@ +- name: panaroo run test_panaroo_run + command: nextflow run tests/modules/panaroo/run -entry test_panaroo_run -c tests/config/nextflow.config + tags: + - panaroo/run + - panaroo + files: + - path: output/panaroo/results/combined_DNA_CDS.fasta + md5sum: 92bd4f6b9c84c84c0989d77d2558b7d1 + - path: output/panaroo/results/combined_protein_CDS.fasta + md5sum: 7a5636c4f2abc190f5dd4dfbb1da7034 + - path: output/panaroo/results/combined_protein_cdhit_out.txt + md5sum: 2164b81606712b53af2198b4d50eed08 + - path: output/panaroo/results/combined_protein_cdhit_out.txt.clstr + md5sum: aaa9fc2b797c932b6d9ff2df640113f1 + - path: output/panaroo/results/core_alignment_header.embl + contains: ["DNA", "feature", "locus_tag"] + - path: output/panaroo/results/core_gene_alignment.aln + contains: ["test1", "test2", "test3"] + - path: output/panaroo/results/final_graph.gml + contains: ["graph", "isolateNames", "test3"] + - path: output/panaroo/results/gene_data.csv + md5sum: 45df2d26ac81754b858c0e4757e834b2 + - path: output/panaroo/results/gene_presence_absence.Rtab + md5sum: 9efbed5df121dc0c4fbb58869b65c3e4 + - path: output/panaroo/results/gene_presence_absence.csv + contains: ["Gene", "unique", "test3"] + - path: output/panaroo/results/gene_presence_absence_roary.csv + contains: ["Gene", "Max", "Fragment"] + - path: output/panaroo/results/pan_genome_reference.fa + md5sum: d0b03cdfaab8965d86cb1045db3c2d20 + - path: output/panaroo/results/pre_filt_graph.gml + contains: ["graph", "node", "id"] + - path: output/panaroo/results/struct_presence_absence.Rtab + md5sum: 246017db1175f9b1683dfe60cb2e9b5b + - path: output/panaroo/results/summary_statistics.txt + md5sum: 9c73c416e1758bea06c67b4ec9fd0720 + - path: output/panaroo/versions.yml + md5sum: 909e7b046a8a87319986d34b7328641c diff --git a/tests/modules/pangolin/test.yml b/tests/modules/pangolin/test.yml index 11f715bf..f11c5c1d 100644 --- a/tests/modules/pangolin/test.yml +++ b/tests/modules/pangolin/test.yml @@ -4,4 +4,4 @@ - pangolin files: - path: ./output/pangolin/test.pangolin.csv - md5sum: d92ede51bf3886f696f2089e86189125 + md5sum: 378f211c219bb644dea63adf7c3254fe diff --git a/tests/modules/pbccs/test.yml b/tests/modules/pbccs/test.yml index 5d481923..71549458 100644 --- a/tests/modules/pbccs/test.yml +++ b/tests/modules/pbccs/test.yml @@ -8,8 +8,8 @@ - path: output/pbccs/alz.chunk2.bam.pbi md5sum: 3112cda9744e3facbf38245d41aaf080 - path: output/pbccs/alz.chunk2.metrics.json.gz - contains: [ 'zmws' ] + contains: ["zmws"] - path: output/pbccs/alz.chunk2.report.json - contains: [ 'Created by pbcopper' ] + contains: ["Created by pbcopper"] - path: output/pbccs/alz.chunk2.report.txt md5sum: bbc5bd7a1269345cf7a7f3d4c746024b diff --git a/tests/modules/phantompeakqualtools/main.nf b/tests/modules/phantompeakqualtools/main.nf new file mode 100644 index 00000000..3b995d68 --- /dev/null +++ b/tests/modules/phantompeakqualtools/main.nf @@ -0,0 +1,25 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PHANTOMPEAKQUALTOOLS } from '../../../modules/phantompeakqualtools/main.nf' + +workflow test_phantompeakqualtools_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + ] + + PHANTOMPEAKQUALTOOLS ( input ) +} + +workflow test_phantompeakqualtools_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PHANTOMPEAKQUALTOOLS ( input ) +} diff --git a/tests/modules/phantompeakqualtools/nextflow.config b/tests/modules/phantompeakqualtools/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/phantompeakqualtools/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/phantompeakqualtools/test.yml b/tests/modules/phantompeakqualtools/test.yml new file mode 100644 index 00000000..3ab612bd --- /dev/null +++ b/tests/modules/phantompeakqualtools/test.yml @@ -0,0 +1,23 @@ +- name: phantompeakqualtools test_phantompeakqualtools_single_end + command: nextflow run tests/modules/phantompeakqualtools -entry test_phantompeakqualtools_single_end -c tests/config/nextflow.config + tags: + - phantompeakqualtools + files: + - path: output/phantompeakqualtools/test.spp.Rdata + - path: output/phantompeakqualtools/test.spp.out + md5sum: b01d976506b6fe45b66c821b1e8a1d15 + - path: output/phantompeakqualtools/test.spp.pdf + - path: output/phantompeakqualtools/versions.yml + md5sum: 6c2ede1aac4c574e3c72fbe09f15c03f + +- name: phantompeakqualtools test_phantompeakqualtools_paired_end + command: nextflow run tests/modules/phantompeakqualtools -entry test_phantompeakqualtools_paired_end -c tests/config/nextflow.config + tags: + - phantompeakqualtools + files: + - path: output/phantompeakqualtools/test.spp.Rdata + - path: output/phantompeakqualtools/test.spp.out + md5sum: eed46e75eab119224f397a7a8b5924e6 + - path: output/phantompeakqualtools/test.spp.pdf + - path: output/phantompeakqualtools/versions.yml + md5sum: 383d2dd583fcb40451bde0d3840bdb72 diff --git a/tests/modules/picard/addorreplacereadgroups/main.nf b/tests/modules/picard/addorreplacereadgroups/main.nf new file mode 100644 index 00000000..d5148c36 --- /dev/null +++ b/tests/modules/picard/addorreplacereadgroups/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_ADDORREPLACEREADGROUPS } from '../../../../modules/picard/addorreplacereadgroups/main.nf' + +workflow test_picard_addorreplacereadgroups { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PICARD_ADDORREPLACEREADGROUPS ( input ) +} diff --git a/tests/modules/picard/addorreplacereadgroups/nextflow.config b/tests/modules/picard/addorreplacereadgroups/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/picard/addorreplacereadgroups/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/picard/addorreplacereadgroups/test.yml b/tests/modules/picard/addorreplacereadgroups/test.yml new file mode 100644 index 00000000..6ee81737 --- /dev/null +++ b/tests/modules/picard/addorreplacereadgroups/test.yml @@ -0,0 +1,9 @@ +- name: picard addorreplacereadgroups test_picard_addorreplacereadgroups + command: nextflow run tests/modules/picard/addorreplacereadgroups -entry test_picard_addorreplacereadgroups -c tests/config/nextflow.config + tags: + - picard + - picard/addorreplacereadgroups + files: + - path: output/picard/test.bam + md5sum: 7b82f3461c2d80fc6a10385e78c9427f + - path: output/picard/versions.yml diff --git a/tests/modules/picard/cleansam/main.nf b/tests/modules/picard/cleansam/main.nf new file mode 100644 index 00000000..f189b0f3 --- /dev/null +++ b/tests/modules/picard/cleansam/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_CLEANSAM } from '../../../../modules/picard/cleansam/main.nf' + +workflow test_picard_cleansam { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + ] + + PICARD_CLEANSAM ( input ) +} diff --git a/tests/modules/picard/cleansam/nextflow.config b/tests/modules/picard/cleansam/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/picard/cleansam/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/picard/cleansam/test.yml b/tests/modules/picard/cleansam/test.yml new file mode 100644 index 00000000..08dcd84d --- /dev/null +++ b/tests/modules/picard/cleansam/test.yml @@ -0,0 +1,9 @@ +- name: picard cleansam test_picard_cleansam + command: nextflow run tests/modules/picard/cleansam -entry test_picard_cleansam -c tests/config/nextflow.config + tags: + - picard/cleansam + - picard + files: + - path: output/picard/test.bam + md5sum: a48f8e77a1480445efc57570c3a38a68 + - path: output/picard/versions.yml diff --git a/tests/modules/picard/collecthsmetrics/main.nf b/tests/modules/picard/collecthsmetrics/main.nf index 2e8727b5..a28eb174 100644 --- a/tests/modules/picard/collecthsmetrics/main.nf +++ b/tests/modules/picard/collecthsmetrics/main.nf @@ -7,7 +7,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../../modules/picard/collecthsme workflow test_picard_collecthsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/picard/collecthsmetrics/test.yml b/tests/modules/picard/collecthsmetrics/test.yml index 9232d508..9aa14f15 100644 --- a/tests/modules/picard/collecthsmetrics/test.yml +++ b/tests/modules/picard/collecthsmetrics/test.yml @@ -5,4 +5,4 @@ - picard/collecthsmetrics files: # The file can't be md5'd consistently - - path: output/picard/test_collecthsmetrics.txt + - path: output/picard/test.CollectHsMetrics.coverage_metrics diff --git a/tests/modules/picard/collectwgsmetrics/main.nf b/tests/modules/picard/collectwgsmetrics/main.nf index 1d75a2bd..eddf5603 100644 --- a/tests/modules/picard/collectwgsmetrics/main.nf +++ b/tests/modules/picard/collectwgsmetrics/main.nf @@ -6,8 +6,7 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../../modules/picard/collectwgs workflow test_picard_collectwgsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) diff --git a/tests/modules/picard/createsequencedictionary/main.nf b/tests/modules/picard/createsequencedictionary/main.nf new file mode 100644 index 00000000..4dc24c8a --- /dev/null +++ b/tests/modules/picard/createsequencedictionary/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_CREATESEQUENCEDICTIONARY } from '../../../../modules/picard/createsequencedictionary/main.nf' + +workflow test_picard_createsequencedictionary { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + PICARD_CREATESEQUENCEDICTIONARY ( input ) +} diff --git a/tests/modules/picard/createsequencedictionary/nextflow.config b/tests/modules/picard/createsequencedictionary/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/picard/createsequencedictionary/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/picard/createsequencedictionary/test.yml b/tests/modules/picard/createsequencedictionary/test.yml new file mode 100644 index 00000000..59f2dd44 --- /dev/null +++ b/tests/modules/picard/createsequencedictionary/test.yml @@ -0,0 +1,9 @@ +- name: picard createsequencedictionary test_picard_createsequencedictionary + command: nextflow run tests/modules/picard/createsequencedictionary -entry test_picard_createsequencedictionary -c tests/config/nextflow.config + tags: + - picard/createsequencedictionary + - picard + files: + - path: output/picard/test.dict + contains: ["SN:MT192765.1"] + - path: output/picard/versions.yml diff --git a/tests/modules/picard/crosscheckfingerprints/main.nf b/tests/modules/picard/crosscheckfingerprints/main.nf new file mode 100644 index 00000000..55ddb5c5 --- /dev/null +++ b/tests/modules/picard/crosscheckfingerprints/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_CROSSCHECKFINGERPRINTS } from '../../../../modules/picard/crosscheckfingerprints/main.nf' + +workflow test_picard_crosscheckfingerprints { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)], + ] + PICARD_CROSSCHECKFINGERPRINTS ( input,[], file(params.test_data['homo_sapiens']['genome']['haplotype_map'], checkIfExists: true)) +} diff --git a/tests/modules/picard/crosscheckfingerprints/nextflow.config b/tests/modules/picard/crosscheckfingerprints/nextflow.config new file mode 100644 index 00000000..aa696290 --- /dev/null +++ b/tests/modules/picard/crosscheckfingerprints/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: PICARD_CROSSCHECKFINGERPRINTS {ext.args = "--EXIT_CODE_WHEN_MISMATCH 0"} +} diff --git a/tests/modules/picard/crosscheckfingerprints/test.yml b/tests/modules/picard/crosscheckfingerprints/test.yml new file mode 100644 index 00000000..534c206d --- /dev/null +++ b/tests/modules/picard/crosscheckfingerprints/test.yml @@ -0,0 +1,8 @@ +- name: "picard crosscheckfingerprints" + command: nextflow run ./tests/modules/picard/crosscheckfingerprints -entry test_picard_crosscheckfingerprints -c ./tests/config/nextflow.config -c ./tests/modules/picard/crosscheckfingerprints/nextflow.config + tags: + - "picard" + - "picard/crosscheckfingerprints" + files: + - path: "output/picard/test.crosscheck_metrics.txt" + - path: output/picard/versions.yml diff --git a/tests/modules/picard/filtersamreads/test.yml b/tests/modules/picard/filtersamreads/test.yml index a0ab712b..af30d6d2 100644 --- a/tests/modules/picard/filtersamreads/test.yml +++ b/tests/modules/picard/filtersamreads/test.yml @@ -7,7 +7,6 @@ - path: output/picard/test.filtered.bam md5sum: b44a6ca04811a9470c7813c3c9465fd5 - - name: picard filtersamreads readlist command: nextflow run ./tests/modules/picard/filtersamreads -entry test_picard_filtersamreads_readlist -c ./tests/config/nextflow.config -c ./tests/modules/picard/filtersamreads/nextflow.config tags: diff --git a/tests/modules/picard/fixmateinformation/main.nf b/tests/modules/picard/fixmateinformation/main.nf new file mode 100644 index 00000000..46b4248b --- /dev/null +++ b/tests/modules/picard/fixmateinformation/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_FIXMATEINFORMATION } from '../../../../modules/picard/fixmateinformation/main.nf' + +workflow test_picard_fixmateinformation { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PICARD_FIXMATEINFORMATION ( input ) +} diff --git a/tests/modules/picard/fixmateinformation/nextflow.config b/tests/modules/picard/fixmateinformation/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/picard/fixmateinformation/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/picard/fixmateinformation/test.yml b/tests/modules/picard/fixmateinformation/test.yml new file mode 100644 index 00000000..f2f9c491 --- /dev/null +++ b/tests/modules/picard/fixmateinformation/test.yml @@ -0,0 +1,9 @@ +- name: picard fixmateinformation test_picard_fixmateinformation + command: nextflow run tests/modules/picard/fixmateinformation -entry test_picard_fixmateinformation -c tests/config/nextflow.config + tags: + - picard + - picard/fixmateinformation + files: + - path: output/picard/test.bam + md5sum: 746102e8c242c0ef42e045c49d320030 + - path: output/picard/versions.yml diff --git a/tests/modules/picard/liftovervcf/main.nf b/tests/modules/picard/liftovervcf/main.nf new file mode 100644 index 00000000..8aee8273 --- /dev/null +++ b/tests/modules/picard/liftovervcf/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_LIFTOVERVCF } from '../../../../modules/picard/liftovervcf/main.nf' + +workflow test_picard_liftovervcf { + + input_vcf = [ [ id:'test' ], + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true) + ] + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + chain = file(params.test_data['homo_sapiens']['genome']['genome_chain_gz'], checkIfExists: true) + fasta = [ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] + + PICARD_LIFTOVERVCF ( input_vcf, dict, chain, fasta ) +} diff --git a/tests/modules/picard/liftovervcf/nextflow.config b/tests/modules/picard/liftovervcf/nextflow.config new file mode 100644 index 00000000..f69fc351 --- /dev/null +++ b/tests/modules/picard/liftovervcf/nextflow.config @@ -0,0 +1,5 @@ +process { + ext.args = "--WARN_ON_MISSING_CONTIG true" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/picard/liftovervcf/test.yml b/tests/modules/picard/liftovervcf/test.yml new file mode 100644 index 00000000..b1b30d5d --- /dev/null +++ b/tests/modules/picard/liftovervcf/test.yml @@ -0,0 +1,11 @@ +- name: picard liftovervcf test_picard_liftovervcf + command: nextflow run tests/modules/picard/liftovervcf -entry test_picard_liftovervcf -c tests/config/nextflow.config + tags: + - picard/liftovervcf + - picard + files: + - path: output/picard/test.lifted.vcf.gz + contains: + - "chr22" + - path: output/picard/test.unlifted.vcf.gz + - path: output/picard/versions.yml diff --git a/tests/modules/picard/markduplicates/nextflow.config b/tests/modules/picard/markduplicates/nextflow.config index 9178c5b1..40d46110 100644 --- a/tests/modules/picard/markduplicates/nextflow.config +++ b/tests/modules/picard/markduplicates/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_MARKDUPLICATES_UNSORTED { - ext.args = 'ASSUME_SORT_ORDER=queryname' + ext.args = '--ASSUME_SORT_ORDER queryname' } } diff --git a/tests/modules/picard/markduplicates/test.yml b/tests/modules/picard/markduplicates/test.yml index beb54009..cfb5b5de 100644 --- a/tests/modules/picard/markduplicates/test.yml +++ b/tests/modules/picard/markduplicates/test.yml @@ -18,4 +18,3 @@ contains: - "1.0 97 97" - path: ./output/picard/test.bam - diff --git a/tests/modules/picard/sortvcf/main.nf b/tests/modules/picard/sortvcf/main.nf new file mode 100644 index 00000000..a88c69fc --- /dev/null +++ b/tests/modules/picard/sortvcf/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_SORTVCF } from '../../../../modules/picard/sortvcf/main.nf' + +workflow test_picard_sortvcf { + + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + ] + + fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + dict = [ file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) ] + + PICARD_SORTVCF ( input, fasta, dict ) +} diff --git a/tests/modules/picard/sortvcf/nextflow.config b/tests/modules/picard/sortvcf/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/picard/sortvcf/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/picard/sortvcf/test.yml b/tests/modules/picard/sortvcf/test.yml new file mode 100644 index 00000000..26271077 --- /dev/null +++ b/tests/modules/picard/sortvcf/test.yml @@ -0,0 +1,7 @@ +- name: picard sortvcf + command: nextflow run ./tests/modules/picard/sortvcf -entry test_picard_sortvcf -c ./tests/config/nextflow.config -c ./tests/modules/picard/sortvcf/nextflow.config + tags: + - picard + - picard/sortvcf + files: + - path: output/picard/test_sorted.vcf.gz diff --git a/tests/modules/pirate/main.nf b/tests/modules/pirate/main.nf index 05e5bdd8..45c60713 100644 --- a/tests/modules/pirate/main.nf +++ b/tests/modules/pirate/main.nf @@ -14,10 +14,6 @@ workflow test_pirate { file(params.test_data['candidatus_portiera_aleyrodidarum']['genome']['test3_gff'], checkIfExists: true) ] ] - // [ file("https://github.com/bactopia/bactopia-tests/raw/main/data/reference/gff/GCF_000292685.gff", checkIfExists: true), - // file("https://github.com/bactopia/bactopia-tests/raw/main/data/reference/gff/GCF_000298385.gff", checkIfExists: true), - // file("https://github.com/bactopia/bactopia-tests/raw/main/data/reference/gff/GCF_002849995.gff", checkIfExists: true) ] - // ] PIRATE ( input ) } diff --git a/tests/modules/pirate/test.yml b/tests/modules/pirate/test.yml index b8d36b95..ffee5552 100644 --- a/tests/modules/pirate/test.yml +++ b/tests/modules/pirate/test.yml @@ -4,95 +4,95 @@ - pirate files: - path: output/pirate/results/PIRATE.gene_families.ordered.tsv - contains: ['allele_name'] + contains: ["allele_name"] - path: output/pirate/results/PIRATE.gene_families.tsv - contains: ['allele_name'] + contains: ["allele_name"] - path: output/pirate/results/PIRATE.genomes_per_allele.tsv - contains: ['g0197'] + contains: ["g0197"] - path: output/pirate/results/PIRATE.log - contains: ['PIRATE input options'] + contains: ["PIRATE input options"] - path: output/pirate/results/PIRATE.pangenome_summary.txt md5sum: 4551c291bc06b21f984f25c09329ed7d - path: output/pirate/results/PIRATE.unique_alleles.tsv - contains: ['allele_name'] + contains: ["allele_name"] - path: output/pirate/results/binary_presence_absence.fasta - contains: ['GCF_000292685'] + contains: ["test1"] - path: output/pirate/results/binary_presence_absence.nwk - md5sum: 5b5d86bf97d97de37bb9db514abb7762 + md5sum: 1fcf7434911bbab39b74791259f1f989 - path: output/pirate/results/cluster_alleles.tab - contains: ['g0001'] - - path: output/pirate/results/co-ords/GCF_000292685.co-ords.tab - md5sum: d5ca0f06ca7ea1f5486683d5859bc9b8 - - path: output/pirate/results/co-ords/GCF_000298385.co-ords.tab - md5sum: a24d6048b3074242bb558c7fa27a8b03 - - path: output/pirate/results/co-ords/GCF_002849995.co-ords.tab - md5sum: 0c08228585f4fa95686e9b025e0fe9c1 + contains: ["g0001"] + - path: output/pirate/results/co-ords/test1.co-ords.tab + md5sum: f1e75c045b35bae260dadb1a2f000dfa + - path: output/pirate/results/co-ords/test2.co-ords.tab + md5sum: 953b0d2f1dfd4c3a6a6dd246c9174703 + - path: output/pirate/results/co-ords/test3.co-ords.tab + md5sum: 61f2c52ef77dc9a97a200c57b89b7d69 - path: output/pirate/results/genome2loci.tab - md5sum: bbcea5bfcdcafe14a9aa7261c8e931b8 + md5sum: 2d9cdefd5b1a7f5e20b0a70a6e5fa588 - path: output/pirate/results/genome_list.txt - md5sum: 6534b1635c258ad92b829077addc1ff5 + md5sum: c19ac63da7949b15179f42093cbf95b8 - path: output/pirate/results/link_clusters.log - contains: ['parsing paralog file'] + contains: ["parsing paralog file"] - path: output/pirate/results/loci_list.tab - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/loci_paralog_categories.tab - md5sum: 6404d2a32526a398f42d7da768a389bd - - path: output/pirate/results/modified_gffs/GCF_000292685.gff - md5sum: 2b73bda2f84dc634303dc90e641040ca - - path: output/pirate/results/modified_gffs/GCF_000298385.gff - md5sum: b1a9d6557d47e09249f08a7acdbbd618 - - path: output/pirate/results/modified_gffs/GCF_002849995.gff - md5sum: 68532fc9bb639e6d83c731a069f60cf8 + md5sum: f8c3d31f445c3cb66bd95ba77be0a7b8 + - path: output/pirate/results/modified_gffs/test1.gff + md5sum: 5dc220e472165c3b693e1017f38fc0e3 + - path: output/pirate/results/modified_gffs/test2.gff + md5sum: 975f5c7fb363caf1be9c53e5e237bb5d + - path: output/pirate/results/modified_gffs/test3.gff + md5sum: a4735a5ac75ce82aadba8a3de6cabc2e - path: output/pirate/results/pan_sequences.fasta - md5sum: ed835c77fdb20c36aa9d5208eb7ca0cb + md5sum: 0492833706f0f969b49a3555c16ec40d - path: output/pirate/results/pangenome.connected_blocks.tsv - contains: ['block_number'] + contains: ["block_number"] - path: output/pirate/results/pangenome.edges - contains: ['g0259'] + contains: ["g0259"] - path: output/pirate/results/pangenome.gfa - contains: ['g0001'] + contains: ["g0001"] - path: output/pirate/results/pangenome.order.tsv - contains: ['g0172'] + contains: ["g0172"] - path: output/pirate/results/pangenome.reversed.tsv md5sum: b2396ce09a6e4178761eca6dc7f4434f - path: output/pirate/results/pangenome.syntenic_blocks.tsv - contains: ['g0091'] + contains: ["g0091"] - path: output/pirate/results/pangenome.temp - path: output/pirate/results/pangenome_iterations/pan_sequences.50.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.60.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.70.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.80.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.90.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.95.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.98.reclustered.reinflated - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.blast.output - md5sum: 9da25d27684bfcc5488987ab2d1fd3a1 + md5sum: ffb3b5bf1ba24bf2bd0be677500139a2 - path: output/pirate/results/pangenome_iterations/pan_sequences.cdhit_clusters - contains: ['GCF_000298385_00081'] + contains: ["test1_00081"] - path: output/pirate/results/pangenome_iterations/pan_sequences.core_clusters.tab - contains: ['GCF_000298385_00242'] + contains: ["test1_00242"] - path: output/pirate/results/pangenome_iterations/pan_sequences.mcl_log.txt - contains: ['chaos'] + contains: ["chaos"] - path: output/pirate/results/pangenome_iterations/pan_sequences.representative.fasta - md5sum: 84668b6c65b57026a17a50b0edd02541 + md5sum: 6e483c773ed90bd50b33f2bd569343e4 - path: output/pirate/results/pangenome_iterations/pan_sequences.representative.fasta.pdb - path: output/pirate/results/pangenome_iterations/pan_sequences.representative.fasta.pot - path: output/pirate/results/pangenome_iterations/pan_sequences.representative.fasta.ptf - path: output/pirate/results/pangenome_iterations/pan_sequences.representative.fasta.pto - path: output/pirate/results/pangenome_log.txt - contains: ['Creating pangenome on amino acid'] + contains: ["Creating pangenome on amino acid"] - path: output/pirate/results/paralog_clusters.tab - contains: ['g0216'] + contains: ["g0216"] - path: output/pirate/results/representative_sequences.faa - contains: ['representative_genome'] + contains: ["representative_genome"] - path: output/pirate/results/representative_sequences.ffn - contains: ['representative_genome'] + contains: ["representative_genome"] - path: output/pirate/results/split_groups.log - contains: ['g0213'] + contains: ["g0"] diff --git a/tests/modules/plink2/score/main.nf b/tests/modules/plink2/score/main.nf new file mode 100644 index 00000000..6a09e829 --- /dev/null +++ b/tests/modules/plink2/score/main.nf @@ -0,0 +1,24 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PLINK2_VCF } from '../../../../modules/plink2/vcf/main.nf' +include { PLINK2_SCORE } from '../../../../modules/plink2/score/main.nf' + +workflow test_plink2_score { + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_vcf_gz'], checkIfExists: true) + ] + PLINK2_VCF ( input ) + + scorefile = file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_score'], checkIfExists: true) + + PLINK2_VCF.out.pgen + .concat(PLINK2_VCF.out.psam, PLINK2_VCF.out.pvar) + .groupTuple() + .map { it.flatten() } + .set { ch_target_genome } + + PLINK2_SCORE ( ch_target_genome, scorefile ) +} diff --git a/tests/modules/plink2/score/nextflow.config b/tests/modules/plink2/score/nextflow.config new file mode 100644 index 00000000..083e4666 --- /dev/null +++ b/tests/modules/plink2/score/nextflow.config @@ -0,0 +1,15 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + // relabel input variants to a common scheme chr:pos:alt:ref + withName: PLINK2_VCF { + ext.args = '--set-missing-var-ids @:#:\\$1:\\$2' + } + + // scoring really needs an adjustment for small test dataset (n > 50 + // normally) + withName: PLINK2_SCORE { + ext.args = 'no-mean-imputation' + } +} diff --git a/tests/modules/plink2/score/test.yml b/tests/modules/plink2/score/test.yml new file mode 100644 index 00000000..7993cb34 --- /dev/null +++ b/tests/modules/plink2/score/test.yml @@ -0,0 +1,16 @@ +- name: plink2 score test_plink2_score + command: nextflow run tests/modules/plink2/score -entry test_plink2_score -c tests/config/nextflow.config + tags: + - plink2 + - plink2/score + files: + - path: output/plink2/test.pgen + md5sum: fac12ca9041d6950f6b7d60ac2120721 + - path: output/plink2/test.psam + md5sum: e6c714488754cb8448c3dfda08c4c0ea + - path: output/plink2/test.pvar.zst + md5sum: 98d59e9779a8b62d5032cd98b642a63b + - path: output/plink2/test.sscore + md5sum: 97bde840f69febd65f2c00e9243126e9 + - path: output/plink2/versions.yml + md5sum: 71499ab14e1583c88ced3a7a4f05bfa7 diff --git a/tests/modules/plink2/vcf/test.yml b/tests/modules/plink2/vcf/test.yml index 52f58a42..d354af48 100644 --- a/tests/modules/plink2/vcf/test.yml +++ b/tests/modules/plink2/vcf/test.yml @@ -1,12 +1,14 @@ - name: plink2 vcf test_plink2_vcf - command: nextflow run ./tests/modules/plink2/vcf -entry test_plink2_vcf -c ./tests/config/nextflow.config -c ./tests/modules/plink2/vcf/nextflow.config + command: nextflow run tests/modules/plink2/vcf -entry test_plink2_vcf -c tests/config/nextflow.config tags: - - plink2/vcf - plink2 + - plink2/vcf files: - path: output/plink2/test.pgen md5sum: d66d3cd4a6c9cca1a4073d7f4b277041 - path: output/plink2/test.psam md5sum: dc3b77d7753a7bed41734323e3549b10 - - path: output/plink2/test.pvar - md5sum: d61e53f847a6335138b584216b4e45d0 + - path: output/plink2/test.pvar.zst + md5sum: b53cccb83e024a39789af5eab8de1c28 + - path: output/plink2/versions.yml + md5sum: 82ada74bc81473b7cba377f696acf54c diff --git a/tests/modules/preseq/ccurve/main.nf b/tests/modules/preseq/ccurve/main.nf new file mode 100644 index 00000000..59149563 --- /dev/null +++ b/tests/modules/preseq/ccurve/main.nf @@ -0,0 +1,25 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRESEQ_CCURVE } from '../../../../modules/preseq/ccurve/main.nf' + +workflow test_preseq_ccurve_single_end { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PRESEQ_CCURVE ( input ) +} + +workflow test_preseq_ccurve_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PRESEQ_CCURVE ( input ) +} diff --git a/tests/modules/preseq/ccurve/nextflow.config b/tests/modules/preseq/ccurve/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/preseq/ccurve/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/preseq/ccurve/test.yml b/tests/modules/preseq/ccurve/test.yml new file mode 100644 index 00000000..c94dc978 --- /dev/null +++ b/tests/modules/preseq/ccurve/test.yml @@ -0,0 +1,19 @@ +- name: preseq ccurve single-end + command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve_single_end -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config + tags: + - preseq + - preseq/ccurve + files: + - path: output/preseq/test.c_curve.txt + md5sum: cf4743abdd355595d6ec1fb3f38e66e5 + - path: output/preseq/test.command.log + +- name: preseq ccurve paired-end + command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config + tags: + - preseq + - preseq/ccurve + files: + - path: output/preseq/test.c_curve.txt + md5sum: cf4743abdd355595d6ec1fb3f38e66e5 + - path: output/preseq/test.command.log diff --git a/tests/modules/preseq/lcextrap/test.yml b/tests/modules/preseq/lcextrap/test.yml index ecd1d046..f5b5aea4 100644 --- a/tests/modules/preseq/lcextrap/test.yml +++ b/tests/modules/preseq/lcextrap/test.yml @@ -4,7 +4,7 @@ - preseq - preseq/lcextrap files: - - path: output/preseq/test.ccurve.txt + - path: output/preseq/test.lc_extrap.txt md5sum: 1fa5cdd601079329618f61660bee00de - path: output/preseq/test.command.log @@ -14,6 +14,6 @@ - preseq - preseq/lcextrap files: - - path: output/preseq/test.ccurve.txt + - path: output/preseq/test.lc_extrap.txt md5sum: 10e5ea860e87fb6f5dc10f4f20c62040 - path: output/preseq/test.command.log diff --git a/tests/modules/prinseqplusplus/main.nf b/tests/modules/prinseqplusplus/main.nf new file mode 100644 index 00000000..d6ee3be9 --- /dev/null +++ b/tests/modules/prinseqplusplus/main.nf @@ -0,0 +1,24 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRINSEQPLUSPLUS } from '../../../modules/prinseqplusplus/main.nf' + +workflow test_prinseqplusplus_single_end { + + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + PRINSEQPLUSPLUS ( input ) +} + +workflow test_prinseqplusplus_paired_end { + + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + PRINSEQPLUSPLUS ( input ) +} diff --git a/tests/modules/prinseqplusplus/nextflow.config b/tests/modules/prinseqplusplus/nextflow.config new file mode 100644 index 00000000..032e5713 --- /dev/null +++ b/tests/modules/prinseqplusplus/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: PRINSEQPLUSPLUS { + ext.args = "-lc_entropy=0.8" + } + +} diff --git a/tests/modules/prinseqplusplus/test.yml b/tests/modules/prinseqplusplus/test.yml new file mode 100644 index 00000000..e034febb --- /dev/null +++ b/tests/modules/prinseqplusplus/test.yml @@ -0,0 +1,27 @@ +- name: prinseqplusplus test_prinseqplusplus_single_end + command: nextflow run tests/modules/prinseqplusplus -entry test_prinseqplusplus_single_end -c tests/config/nextflow.config + tags: + - prinseqplusplus + files: + - path: output/prinseqplusplus/test.log + contains: + - "reads removed by -lc_entropy" + - path: output/prinseqplusplus/test_bad_out.fastq.gz + - path: output/prinseqplusplus/test_good_out.fastq.gz + - path: output/prinseqplusplus/versions.yml + +- name: prinseqplusplus test_prinseqplusplus_paired_end + command: nextflow run tests/modules/prinseqplusplus -entry test_prinseqplusplus_paired_end -c tests/config/nextflow.config + tags: + - prinseqplusplus + files: + - path: output/prinseqplusplus/test.log + contains: + - "reads removed by -lc_entropy" + - path: output/prinseqplusplus/test_bad_out_R1.fastq.gz + - path: output/prinseqplusplus/test_bad_out_R2.fastq.gz + - path: output/prinseqplusplus/test_good_out_R1.fastq.gz + - path: output/prinseqplusplus/test_good_out_R2.fastq.gz + - path: output/prinseqplusplus/test_single_out_R1.fastq.gz + - path: output/prinseqplusplus/test_single_out_R2.fastq.gz + - path: output/prinseqplusplus/versions.yml diff --git a/tests/modules/qcat/test.yml b/tests/modules/qcat/test.yml index 47ece983..04ddacff 100644 --- a/tests/modules/qcat/test.yml +++ b/tests/modules/qcat/test.yml @@ -5,4 +5,4 @@ files: - path: ./output/qcat/fastq/barcode06.fastq.gz - path: ./output/qcat/fastq/barcode12.fastq.gz - - path: ./output/qcat/fastq/none.fastq.gz \ No newline at end of file + - path: ./output/qcat/fastq/none.fastq.gz diff --git a/tests/modules/qualimap/bamqc/main.nf b/tests/modules/qualimap/bamqc/main.nf index a17efd59..623634e4 100644 --- a/tests/modules/qualimap/bamqc/main.nf +++ b/tests/modules/qualimap/bamqc/main.nf @@ -8,8 +8,7 @@ workflow test_qualimap_bamqc { input = [ [ id:'test', single_end:false ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] ] - gff = file("dummy_file.txt") - use_gff = false + gff = [] - QUALIMAP_BAMQC ( input, gff, use_gff ) + QUALIMAP_BAMQC ( input, gff ) } diff --git a/tests/modules/qualimap/bamqccram/main.nf b/tests/modules/qualimap/bamqccram/main.nf new file mode 100644 index 00000000..e4d8433e --- /dev/null +++ b/tests/modules/qualimap/bamqccram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { QUALIMAP_BAMQCCRAM } from '../../../../modules/qualimap/bamqccram/main.nf' + +workflow test_qualimap_bamqc { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) + ] + gff = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + QUALIMAP_BAMQCCRAM ( input, gff, fasta, fai ) +} diff --git a/tests/modules/qualimap/bamqccram/nextflow.config b/tests/modules/qualimap/bamqccram/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/qualimap/bamqccram/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/qualimap/bamqccram/test.yml b/tests/modules/qualimap/bamqccram/test.yml new file mode 100644 index 00000000..49cf9b24 --- /dev/null +++ b/tests/modules/qualimap/bamqccram/test.yml @@ -0,0 +1,80 @@ +- name: qualimap bamqccram test_qualimap_bamqc + command: nextflow run tests/modules/qualimap/bamqccram -entry test_qualimap_bamqc -c tests/config/nextflow.config + tags: + - qualimap/bamqccram + - qualimap + files: + - path: ./output/qualimap/test/qualimapReport.html + - path: ./output/qualimap/test/genome_results.txt + md5sum: 61d8b36507652fd7d7db9583de708161 + - path: ./output/qualimap/test/css/plus.png + md5sum: 0125e6faa04e2cf0141a2d599d3bb220 + - path: ./output/qualimap/test/css/down-pressed.png + md5sum: ebe8979581eda700fb234a73c661a4b9 + - path: ./output/qualimap/test/css/underscore.js + md5sum: db5ba047a66617d4cd3e8c5099cc51db + - path: ./output/qualimap/test/css/ajax-loader.gif + md5sum: ae6667053ad118020b8e68ccf307b519 + - path: ./output/qualimap/test/css/searchtools.js + md5sum: d550841adeedc8ed47c40ee607620937 + - path: ./output/qualimap/test/css/up.png + - path: ./output/qualimap/test/css/file.png + - path: ./output/qualimap/test/css/up-pressed.png + - path: ./output/qualimap/test/css/down.png + - path: ./output/qualimap/test/css/minus.png + - path: ./output/qualimap/test/css/bgtop.png + - path: ./output/qualimap/test/css/comment.png + - path: ./output/qualimap/test/css/basic.css + md5sum: 25b2823342c0604924a2870eeb4e7e94 + - path: ./output/qualimap/test/css/report.css + md5sum: 7a5f09eaf7c176f966f4e8854168b812 + - path: ./output/qualimap/test/css/pygments.css + md5sum: d625a0adb949f181bd0d3f1432b0fa7f + - path: ./output/qualimap/test/css/comment-close.png + - path: ./output/qualimap/test/css/doctools.js + md5sum: 5ff571aa60e63f69c1890283e240ff8d + - path: ./output/qualimap/test/css/comment-bright.png + - path: ./output/qualimap/test/css/qualimap_logo_small.png + - path: ./output/qualimap/test/css/websupport.js + md5sum: 9e61e1e8a7433c56bd7e5a615affcf85 + - path: ./output/qualimap/test/css/agogo.css + md5sum: bd757b1a7ce6fdc0288ba148680f4583 + - path: ./output/qualimap/test/css/bgfooter.png + - path: ./output/qualimap/test/css/jquery.js + md5sum: 10092eee563dec2dca82b77d2cf5a1ae + - path: ./output/qualimap/test/raw_data_qualimapReport/insert_size_histogram.txt + md5sum: b7aeda7558e9b31f027f7dc530df90b8 + - path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_nucleotide_content.txt + md5sum: 42774c6edd6e36538acbdb6ffbd019c2 + - path: ./output/qualimap/test/raw_data_qualimapReport/genome_fraction_coverage.txt + md5sum: 972a19d4846bf4e93ba32ae3dff5289c + - path: ./output/qualimap/test/raw_data_qualimapReport/mapping_quality_histogram.txt + md5sum: 4e3918da81202b52395a576f99c1a50f + - path: ./output/qualimap/test/raw_data_qualimapReport/insert_size_across_reference.txt + - path: ./output/qualimap/test/raw_data_qualimapReport/coverage_histogram.txt + md5sum: 353e74d2a6c4281686c9063de570a64d + - path: ./output/qualimap/test/raw_data_qualimapReport/mapping_quality_across_reference.txt + md5sum: 9bf33149528be9a0e154e4ba7cb89420 + - path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_gc-content_distribution.txt + md5sum: be36d9346a402ba580718497d5075d06 + - path: ./output/qualimap/test/raw_data_qualimapReport/homopolymer_indels.txt + md5sum: b0e19fcfb60e5f039eb0986ef61ab3ed + - path: ./output/qualimap/test/raw_data_qualimapReport/duplication_rate_histogram.txt + md5sum: 76e80e4ce8d0e01bbd65f1c28f5a92e7 + - path: ./output/qualimap/test/raw_data_qualimapReport/coverage_across_reference.txt + md5sum: b609d33a1f98d24aa84a04e60513cbee + - path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_clipping_profile.txt + md5sum: 7c86f7b225b99bc60008d7e4e55d6adb + - path: ./output/qualimap/test/images_qualimapReport/genome_reads_content_per_read_position.png + - path: ./output/qualimap/test/images_qualimapReport/genome_gc_content_per_window.png + - path: ./output/qualimap/test/images_qualimapReport/genome_coverage_0to50_histogram.png + - path: ./output/qualimap/test/images_qualimapReport/genome_uniq_read_starts_histogram.png + - path: ./output/qualimap/test/images_qualimapReport/genome_mapping_quality_across_reference.png + - path: ./output/qualimap/test/images_qualimapReport/genome_coverage_histogram.png + - path: ./output/qualimap/test/images_qualimapReport/genome_coverage_across_reference.png + - path: ./output/qualimap/test/images_qualimapReport/genome_homopolymer_indels.png + - path: ./output/qualimap/test/images_qualimapReport/genome_insert_size_histogram.png + - path: ./output/qualimap/test/images_qualimapReport/genome_mapping_quality_histogram.png + - path: ./output/qualimap/test/images_qualimapReport/genome_insert_size_across_reference.png + - path: ./output/qualimap/test/images_qualimapReport/genome_reads_clipping_profile.png + - path: ./output/qualimap/test/images_qualimapReport/genome_coverage_quotes.png diff --git a/tests/modules/raxmlng/test.yml b/tests/modules/raxmlng/test.yml index 735b6a74..8054adac 100644 --- a/tests/modules/raxmlng/test.yml +++ b/tests/modules/raxmlng/test.yml @@ -5,10 +5,10 @@ files: - path: output/raxmlng/output.raxml.bestTree contains: - - 'sample1:0.359' - - 'sample2:1.50' - - 'sample3:0.000001' - - 'sample4:0.111' + - "sample1:0.359" + - "sample2:1.50" + - "sample3:0.000001" + - "sample4:0.111" - name: raxmlng bootstrap command: nextflow run ./tests/modules/raxmlng -entry test_raxmlng_bootstrap -c ./tests/config/nextflow.config -c ./tests/modules/raxmlng/nextflow.config @@ -17,15 +17,15 @@ files: - path: output/raxmlng/output.raxml.bestTree contains: - - 'sample1:0.359' - - 'sample2:1.50' - - 'sample3:0.000001' - - 'sample4:0.111' + - "sample1:0.359" + - "sample2:1.50" + - "sample3:0.000001" + - "sample4:0.111" - path: output/raxmlng/output.raxml.support contains: - - 'sample1:0.359' - - 'sample2:1.50' - - 'sample3:0.000001' - - 'sample4:0.111' + - "sample1:0.359" + - "sample2:1.50" + - "sample3:0.000001" + - "sample4:0.111" contains_regex: - '\)[89]\d:' diff --git a/tests/modules/rgi/main/main.nf b/tests/modules/rgi/main/main.nf new file mode 100644 index 00000000..9182a154 --- /dev/null +++ b/tests/modules/rgi/main/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RGI_MAIN } from '../../../../modules/rgi/main/main.nf' + +workflow test_rgi_main { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + RGI_MAIN ( input ) +} diff --git a/tests/modules/rgi/main/nextflow.config b/tests/modules/rgi/main/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/rgi/main/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/rgi/main/test.yml b/tests/modules/rgi/main/test.yml new file mode 100644 index 00000000..65d4ad9f --- /dev/null +++ b/tests/modules/rgi/main/test.yml @@ -0,0 +1,12 @@ +- name: rgi main + command: nextflow run ./tests/modules/rgi/main -entry test_rgi_main -c ./tests/config/nextflow.config -c ./tests/modules/rgi/main/nextflow.config + tags: + - rgi + - rgi/main + files: + - path: output/rgi/test.json + contains: ["NZ_LS483480", "orf_end", "perc_identity", "Pulvomycin"] + - path: output/rgi/test.txt + contains: ["NZ_LS483480", "ORF_ID", "Model_type", "Pulvomycin"] + - path: output/rgi/versions.yml + md5sum: 614a45d9d59680d4e743498773cf830a diff --git a/tests/modules/roary/test.yml b/tests/modules/roary/test.yml index 981ab51c..b6f02593 100644 --- a/tests/modules/roary/test.yml +++ b/tests/modules/roary/test.yml @@ -4,36 +4,36 @@ - roary files: - path: output/roary/results/accessory.header.embl - contains: ['ID Genome standard; DNA; PRO; 1234 BP.'] + contains: ["ID Genome standard; DNA; PRO; 1234 BP."] - path: output/roary/results/accessory.tab - contains: ['FT'] + contains: ["FT"] - path: output/roary/results/accessory_binary_genes.fa md5sum: d4191cf748dd8016ad877857a034bef3 - path: output/roary/results/accessory_binary_genes.fa.newick md5sum: d4a2a64e781263ca1b9b3a4bc9d3a6ea - path: output/roary/results/accessory_graph.dot - contains: ['/* list of nodes */'] + contains: ["/* list of nodes */"] - path: output/roary/results/blast_identity_frequency.Rtab md5sum: 829baa25c3fad94b1af207265452a692 - path: output/roary/results/clustered_proteins - contains: ['JKHLNHAL_00087'] + contains: ["JKHLNHAL_00087"] - path: output/roary/results/core_accessory.header.embl - contains: ['ID Genome standard; DNA; PRO; 1234 BP.'] + contains: ["ID Genome standard; DNA; PRO; 1234 BP."] - path: output/roary/results/core_accessory.tab contains: ['FT /taxa="test1 test2 test3"'] - path: output/roary/results/core_accessory_graph.dot - contains: ['/* list of nodes */'] + contains: ["/* list of nodes */"] - path: output/roary/results/gene_presence_absence.Rtab - contains: ['Gene'] + contains: ["Gene"] - path: output/roary/results/gene_presence_absence.csv contains: ['"Gene","Non-unique Gene name","Annotation","No. isolates","No. sequences"'] - path: output/roary/results/number_of_conserved_genes.Rtab - contains: ['279'] + contains: ["2"] - path: output/roary/results/number_of_genes_in_pan_genome.Rtab - contains: ['279'] + contains: ["2"] - path: output/roary/results/number_of_new_genes.Rtab - contains: ['279'] + contains: ["2"] - path: output/roary/results/number_of_unique_genes.Rtab - contains: ['279'] + contains: ["2"] - path: output/roary/results/summary_statistics.txt md5sum: 3921b5445df6a7ed59408119b8860a58 diff --git a/tests/modules/rsem/calculateexpression/test.yml b/tests/modules/rsem/calculateexpression/test.yml index f19c3398..b0251de9 100644 --- a/tests/modules/rsem/calculateexpression/test.yml +++ b/tests/modules/rsem/calculateexpression/test.yml @@ -42,7 +42,7 @@ - path: output/rsem/rsem/genome.transcripts.fa md5sum: 050c521a2719c2ae48267c1e65218f29 - path: output/rsem/rsem/genomeParameters.txt - md5sum: 2fe3a030e1706c3e8cd4df3818e6dd2f + md5sum: df5a456e3242520cc36e0083a6a7d9dd - path: output/rsem/rsem/sjdbInfo.txt md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 - path: output/rsem/rsem/sjdbList.fromGTF.out.tab @@ -63,4 +63,4 @@ - path: output/rsem/test.stat/test.theta md5sum: de2e4490c98cc5383a86ae8225fd0a28 - path: output/rsem/test.transcript.bam - md5sum: 7846491086c478858419667d60f18edd + md5sum: ed681d39f5700ffc74d6321525330d93 diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf new file mode 100644 index 00000000..9a1c3c71 --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -0,0 +1,69 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RTGTOOLS_VCFEVAL } from '../../../../modules/rtgtools/vcfeval/main.nf' +include { UNTAR } from '../../../modules/untar/main.nf' + +workflow test_rtgtools_vcfeval { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), + ] + + truth = [ + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) + ] + + truth_regions = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + evaluation_regions = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + compressed_sdf = [ + [], + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ] + + sdf = UNTAR( compressed_sdf ).untar + .map({ + meta, folder -> + folder + }) + + + RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf ) +} + +workflow test_rtgtools_vcfeval_no_optional_inputs { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), + [], + ] + + truth = [ + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + [] + ] + + truth_regions = [] + + evaluation_regions = [] + + compressed_sdf = [ + [], + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ] + + sdf = UNTAR( compressed_sdf ).untar + .map({ + meta, folder -> + [folder] + }) + + RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf ) +} diff --git a/tests/modules/rtgtools/vcfeval/nextflow.config b/tests/modules/rtgtools/vcfeval/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml new file mode 100644 index 00000000..33720f66 --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -0,0 +1,75 @@ +- name: rtgtools vcfeval test_rtgtools_vcfeval + command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval -c tests/config/nextflow.config + tags: + - rtgtools + - rtgtools/vcfeval + files: + - path: output/rtgtools/test_results/done + - path: output/rtgtools/test_results/fn.vcf.gz + md5sum: be9c9106055bfad4c5985bc0d33efd56 + - path: output/rtgtools/test_results/fn.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/fp.vcf.gz + md5sum: e0f0ff841dc63e9fb61fd3a5db137ced + - path: output/rtgtools/test_results/fp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/non_snp_roc.tsv.gz + md5sum: ad5bad32c48f05aef232e2c0e708877a + - path: output/rtgtools/test_results/phasing.txt + md5sum: 133677dbd8be657439ea2b03fdfb8795 + - path: output/rtgtools/test_results/progress + - path: output/rtgtools/test_results/snp_roc.tsv.gz + md5sum: 6785b83d66486e7e6c75c5a5b1574c09 + - path: output/rtgtools/test_results/summary.txt + md5sum: f4c8df93c8bdab603036bbc27b4a28c3 + - path: output/rtgtools/test_results/tp-baseline.vcf.gz + md5sum: be9c9106055bfad4c5985bc0d33efd56 + - path: output/rtgtools/test_results/tp-baseline.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/tp.vcf.gz + md5sum: e0f0ff841dc63e9fb61fd3a5db137ced + - path: output/rtgtools/test_results/tp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/vcfeval.log + - path: output/rtgtools/test_results/weighted_roc.tsv.gz + md5sum: fa7c046ea0084172f1ef91f19de07b2b + - path: output/rtgtools/versions.yml + md5sum: 270ed7a5a8e347b251eb4aa2198f98e8 + +- name: rtgtools vcfeval test_rtgtools_vcfeval_no_optional_inputs + command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_optional_inputs -c tests/config/nextflow.config + tags: + - rtgtools + - rtgtools/vcfeval + files: + - path: output/rtgtools/test_results/done + - path: output/rtgtools/test_results/fn.vcf.gz + md5sum: c11c889a4f42c8ea325748bd768ea34d + - path: output/rtgtools/test_results/fn.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/fp.vcf.gz + md5sum: 138e85c1cd79f8fea9a33e81ce0c734c + - path: output/rtgtools/test_results/fp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test_results/non_snp_roc.tsv.gz + md5sum: 34fb78a008dfc0bef02807b8a7012b07 + - path: output/rtgtools/test_results/phasing.txt + md5sum: 133677dbd8be657439ea2b03fdfb8795 + - path: output/rtgtools/test_results/progress + - path: output/rtgtools/test_results/snp_roc.tsv.gz + md5sum: a4c5761c2653e2d04fc84c1cea13b1f0 + - path: output/rtgtools/test_results/summary.txt + md5sum: f33feb32f84958fb931063044fba369b + - path: output/rtgtools/test_results/tp-baseline.vcf.gz + md5sum: d1c2d990899edf127ea5fcca8866fcb0 + - path: output/rtgtools/test_results/tp-baseline.vcf.gz.tbi + md5sum: 3307008fea47adb75c46d395c5567bc0 + - path: output/rtgtools/test_results/tp.vcf.gz + md5sum: e35b4dab82894eee9b77c81f9bc89cca + - path: output/rtgtools/test_results/tp.vcf.gz.tbi + md5sum: 45d8f8793140944f129e728299918c88 + - path: output/rtgtools/test_results/vcfeval.log + - path: output/rtgtools/test_results/weighted_roc.tsv.gz + md5sum: 5b8efc9e9381f604880412800f58e4e9 + - path: output/rtgtools/versions.yml + md5sum: 55568e4bbe5ab7e634a1f392abb89cc4 diff --git a/tests/modules/samblaster/test.yml b/tests/modules/samblaster/test.yml index acc6d0f0..8a87bd50 100644 --- a/tests/modules/samblaster/test.yml +++ b/tests/modules/samblaster/test.yml @@ -4,4 +4,4 @@ - samblaster files: - path: output/samblaster/test.processed.bam - md5sum: 950f23d85f75be1cf872f45c0144bdf4 + md5sum: 3009528be9f69e7fc8951921583b0016 diff --git a/tests/modules/samtools/ampliconclip/test.yml b/tests/modules/samtools/ampliconclip/test.yml index e8fd456c..cfc10dd1 100644 --- a/tests/modules/samtools/ampliconclip/test.yml +++ b/tests/modules/samtools/ampliconclip/test.yml @@ -5,7 +5,7 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: 678f9ab04fbe3206f0f96e170fd833e9 + md5sum: d270363a7fb3d96be2df211099efc75b - name: samtools ampliconclip no stats with rejects command: nextflow run ./tests/modules/samtools/ampliconclip -entry test_samtools_ampliconclip_no_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/samtools/ampliconclip/nextflow.config @@ -14,9 +14,9 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: bbf65ea626539d96c8271e17d1fc988b + md5sum: e7c4e64c259212e1670f6de96a5549b4 - path: output/samtools/test.cliprejects.bam - md5sum: a0bee15aead020d16d0c81bd9667df46 + md5sum: b7c057b11950c2271a0c92236bee94b7 - name: samtools ampliconclip with stats with rejects command: nextflow run ./tests/modules/samtools/ampliconclip -entry test_samtools_ampliconclip_with_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/samtools/ampliconclip/nextflow.config @@ -25,8 +25,8 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: f5a3611ecad34ba2dde77096e1c7dd93 + md5sum: e75992d4ff69cbaed9a089231be86b5e - path: output/samtools/test.cliprejects.bam - md5sum: 90ee7ce908b4bdb89ab41e4410de9012 + md5sum: 729f03e7a2801d2c56c32bef8f3d6ead - path: output/samtools/test.clipstats.txt md5sum: fc23355e1743d47f2541f2cb1a7a0cda diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index feb994fd..4f9472e5 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,23 +1,26 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - samtools/bam2fq - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: d733e66d29a4b366bf9df8c42f845256 + - path: output/samtools/versions.yml + md5sum: 4973eac1b6a8f090d5fcd4456d65a894 - name: samtools bam2fq test_samtools_bam2fq_withsplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - samtools/bam2fq - samtools files: - path: output/samtools/test_1.fq.gz - md5sum: 4522edbe158ec4804765794569f67493 + md5sum: 1c84aadcdca10e97be2b5b6ce773f5ed - path: output/samtools/test_2.fq.gz - md5sum: 7e00ef40d5cfe272b67461381019dcc1 + md5sum: e679ec035d3208785e704458d6b68c8c - path: output/samtools/test_other.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml + md5sum: e92d21bbcda2fed7cb438d95c51edff0 diff --git a/tests/modules/samtools/collatefastq/main.nf b/tests/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..928742ac --- /dev/null +++ b/tests/modules/samtools/collatefastq/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_COLLATEFASTQ } from '../../../../modules/samtools/collatefastq/main.nf' + +workflow test_samtools_collatefastq { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SAMTOOLS_COLLATEFASTQ ( input ) +} diff --git a/tests/modules/samtools/collatefastq/nextflow.config b/tests/modules/samtools/collatefastq/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/collatefastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/collatefastq/test.yml b/tests/modules/samtools/collatefastq/test.yml new file mode 100644 index 00000000..2b001885 --- /dev/null +++ b/tests/modules/samtools/collatefastq/test.yml @@ -0,0 +1,14 @@ +- name: samtools fastq test_samtools_collatefastq + command: nextflow run ./tests/modules/samtools/collatefastq -entry test_samtools_collatefastq -c ./tests/config/nextflow.config -c ./tests/modules/samtools/collatefastq/nextflow.config + tags: + - samtools + - samtools/collatefastq + files: + - path: output/samtools/test_1.fq.gz + md5sum: 829732de4e937edca90f27b07e5b501a + - path: output/samtools/test_2.fq.gz + md5sum: ef27d3809e495620fd93df894280c03a + - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 diff --git a/tests/modules/samtools/convert/main.nf b/tests/modules/samtools/convert/main.nf new file mode 100644 index 00000000..01bdfe7f --- /dev/null +++ b/tests/modules/samtools/convert/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_CONVERT as SAMTOOLS_BAMTOCRAM } from '../../../../modules/samtools/convert/main.nf' +include { SAMTOOLS_CONVERT as SAMTOOLS_CRAMTOBAM } from '../../../../modules/samtools/convert/main.nf' + +workflow test_samtools_convert_bamtocram { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + SAMTOOLS_BAMTOCRAM ( input, fasta, fai ) +} + +workflow test_samtools_convert_cramtobam { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SAMTOOLS_CRAMTOBAM ( input, fasta, fai ) +} diff --git a/tests/modules/samtools/convert/nextflow.config b/tests/modules/samtools/convert/nextflow.config new file mode 100644 index 00000000..4f1e83f6 --- /dev/null +++ b/tests/modules/samtools/convert/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:SAMTOOLS_BAMTOCRAM{ + ext.args = "-C" + } + + withName:SAMTOOLS_CRAMTOBAM{ + ext.args = "-b" + } +} diff --git a/tests/modules/samtools/convert/test.yml b/tests/modules/samtools/convert/test.yml new file mode 100644 index 00000000..979f36ca --- /dev/null +++ b/tests/modules/samtools/convert/test.yml @@ -0,0 +1,21 @@ +- name: samtools convert test_samtools_convert_bamtocram + command: nextflow run tests/modules/samtools/convert -entry test_samtools_convert_bamtocram -c tests/config/nextflow.config + tags: + - samtools + - samtools/convert + files: + - path: output/samtools/test.cram + - path: output/samtools/test.cram.crai + - path: output/samtools/versions.yml + +- name: samtools convert test_samtools_convert_cramtobam + command: nextflow run tests/modules/samtools/convert -entry test_samtools_convert_cramtobam -c tests/config/nextflow.config + tags: + - samtools + - samtools/convert + files: + - path: output/samtools/test.bam + md5sum: c262b6dc15f9b480bdb47d6d018b4b56 + - path: output/samtools/test.bam.bai + md5sum: 6e8f5034f728401bfa841c8e70c62463 + - path: output/samtools/versions.yml diff --git a/tests/modules/samtools/faidx/test.yml b/tests/modules/samtools/faidx/test.yml index dc2184ee..346d5a0b 100644 --- a/tests/modules/samtools/faidx/test.yml +++ b/tests/modules/samtools/faidx/test.yml @@ -7,4 +7,3 @@ - path: output/samtools/genome.fasta.fai md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 - path: output/samtools/versions.yml - md5sum: d56671a7c8f8058944d3d536c3058f7f diff --git a/tests/modules/samtools/fastq/test.yml b/tests/modules/samtools/fastq/test.yml index 39da9889..ff39d61a 100644 --- a/tests/modules/samtools/fastq/test.yml +++ b/tests/modules/samtools/fastq/test.yml @@ -5,6 +5,6 @@ - samtools/fastq files: - path: output/samtools/test_2.fastq.gz - md5sum: 3b1c92f33a44a78d82f8360ab4fdfd61 + md5sum: 51e7a469b554de694799bec982fd722e - path: output/samtools/test_1.fastq.gz - md5sum: 5a3f9c69a032c4ffd9071ea31a14e6f9 + md5sum: 6c2d5b467eb94e058300271a542e34e6 diff --git a/tests/modules/samtools/fixmate/test.yml b/tests/modules/samtools/fixmate/test.yml index 8e87e059..c233f947 100644 --- a/tests/modules/samtools/fixmate/test.yml +++ b/tests/modules/samtools/fixmate/test.yml @@ -5,4 +5,4 @@ - samtools/fixmate files: - path: output/samtools/test.bam - md5sum: a4092657a4b17170c7702a76cbf192a1 + md5sum: 13805ea1a9212496a8cb4ce395b25119 diff --git a/tests/modules/samtools/index/test.yml b/tests/modules/samtools/index/test.yml index 7184be8f..09684166 100644 --- a/tests/modules/samtools/index/test.yml +++ b/tests/modules/samtools/index/test.yml @@ -23,4 +23,4 @@ - samtools/index files: - path: output/samtools/test.paired_end.sorted.bam.csi - md5sum: 3dd9e3ed959fca075b88bb8dc3cf7dbd + md5sum: 8d63373007553e74d823fc2b9cbcf84d diff --git a/tests/modules/samtools/mpileup/main.nf b/tests/modules/samtools/mpileup/main.nf index dc58cc2c..f7fd4b43 100644 --- a/tests/modules/samtools/mpileup/main.nf +++ b/tests/modules/samtools/mpileup/main.nf @@ -6,7 +6,18 @@ include { SAMTOOLS_MPILEUP } from '../../../../modules/samtools/mpileup/main.nf' workflow test_samtools_mpileup { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + [] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + SAMTOOLS_MPILEUP ( input, fasta ) +} + +workflow test_samtools_mpileup_intervals { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) diff --git a/tests/modules/samtools/mpileup/test.yml b/tests/modules/samtools/mpileup/test.yml index 53a9c142..c3d794d0 100644 --- a/tests/modules/samtools/mpileup/test.yml +++ b/tests/modules/samtools/mpileup/test.yml @@ -1,8 +1,19 @@ -- name: samtools mpileup - command: nextflow run ./tests/modules/samtools/mpileup -entry test_samtools_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/samtools/mpileup/nextflow.config +- name: samtools mpileup test_samtools_mpileup + command: nextflow run tests/modules/samtools/mpileup -entry test_samtools_mpileup -c tests/config/nextflow.config tags: - samtools - samtools/mpileup files: - - path: ./output/samtools/test.mpileup + - path: output/samtools/test.mpileup md5sum: 958e6bead4103d72026f80153b6b5150 + - path: output/samtools/versions.yml + +- name: samtools mpileup test_samtools_mpileup_intervals + command: nextflow run tests/modules/samtools/mpileup -entry test_samtools_mpileup_intervals -c tests/config/nextflow.config + tags: + - samtools + - samtools/mpileup + files: + - path: output/samtools/test.mpileup + md5sum: 958e6bead4103d72026f80153b6b5150 + - path: output/samtools/versions.yml diff --git a/tests/modules/samtools/sort/test.yml b/tests/modules/samtools/sort/test.yml index dfd2eb69..e7bfd598 100644 --- a/tests/modules/samtools/sort/test.yml +++ b/tests/modules/samtools/sort/test.yml @@ -5,4 +5,4 @@ - samtools/sort files: - path: output/samtools/test.sorted.bam - md5sum: 4adc495469724a375d5e1a9f3485e38d + md5sum: f00f5d392fd5c531e1fd528d9f57b32b diff --git a/tests/modules/samtools/stats/test.yml b/tests/modules/samtools/stats/test.yml index d3444f02..304619ee 100644 --- a/tests/modules/samtools/stats/test.yml +++ b/tests/modules/samtools/stats/test.yml @@ -5,7 +5,7 @@ - samtools files: - path: output/samtools/test.paired_end.sorted.bam.stats - md5sum: 09146eeecfcae2a84fb8615c86cd8d64 + md5sum: c1e9ad551281b0bca32be1c832d125af - name: samtools stats test_samtools_stats_cram command: nextflow run ./tests/modules/samtools/stats -entry test_samtools_stats_cram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/stats/nextflow.config @@ -14,4 +14,4 @@ - samtools files: - path: output/samtools/test.paired_end.recalibrated.sorted.cram.stats - md5sum: ab49e7380714b7033e374ba1114e5e54 + md5sum: 103cd7b19743c42dab9ce570144c6f36 diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 8ee27ef8..0e3f597e 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -6,7 +6,8 @@ include { SAMTOOLS_VIEW } from '../../../../modules/samtools/view/main.nf' workflow test_samtools_view { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] ] SAMTOOLS_VIEW ( input, [] ) @@ -14,10 +15,19 @@ workflow test_samtools_view { workflow test_samtools_view_cram { input = [ [ id: 'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) SAMTOOLS_VIEW ( input, fasta ) } + +workflow test_samtools_view_stubs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] + ] + + SAMTOOLS_VIEW ( input, [] ) +} diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 1287d455..f3ad4552 100644 --- a/tests/modules/samtools/view/test.yml +++ b/tests/modules/samtools/view/test.yml @@ -14,3 +14,11 @@ - samtools files: - path: output/samtools/test.cram + +- name: samtools view test_samtools_view_stubs + command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view_stubs -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run + tags: + - samtools/view + - samtools + files: + - path: output/samtools/test.bam diff --git a/tests/modules/seacr/callpeak/test.yml b/tests/modules/seacr/callpeak/test.yml index 63104bd0..83c1c59a 100644 --- a/tests/modules/seacr/callpeak/test.yml +++ b/tests/modules/seacr/callpeak/test.yml @@ -14,4 +14,4 @@ - seacr/callpeak files: - path: output/seacr/test_1.stringent.bed - md5sum: 1d23015c7087f7b48cc3139d53fd3463 \ No newline at end of file + md5sum: 1d23015c7087f7b48cc3139d53fd3463 diff --git a/tests/modules/seqkit/pair/main.nf b/tests/modules/seqkit/pair/main.nf new file mode 100644 index 00000000..42bc9587 --- /dev/null +++ b/tests/modules/seqkit/pair/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQKIT_PAIR } from '../../../../modules/seqkit/pair/main.nf' + +workflow test_seqkit_pair { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + SEQKIT_PAIR ( input ) +} diff --git a/tests/modules/seqkit/pair/nextflow.config b/tests/modules/seqkit/pair/nextflow.config new file mode 100644 index 00000000..49de9240 --- /dev/null +++ b/tests/modules/seqkit/pair/nextflow.config @@ -0,0 +1,6 @@ +process { + + ext.args = "-u" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/seqkit/pair/test.yml b/tests/modules/seqkit/pair/test.yml new file mode 100644 index 00000000..30373d69 --- /dev/null +++ b/tests/modules/seqkit/pair/test.yml @@ -0,0 +1,12 @@ +- name: seqkit pair test_seqkit_pair + command: nextflow run tests/modules/seqkit/pair -entry test_seqkit_pair -c tests/config/nextflow.config + tags: + - seqkit/pair + - seqkit + files: + - path: output/seqkit/test_1.paired.fastq.gz + md5sum: fbfe7e8bdbc29abaaf58b6f1a32448e5 + - path: output/seqkit/test_2.paired.fastq.gz + md5sum: 7d3c0912e5adc2674e8ecc1e647381b3 + - path: output/seqkit/versions.yml + md5sum: 3086293bc986fc2ece38b1951d090819 diff --git a/tests/modules/seqkit/replace/main.nf b/tests/modules/seqkit/replace/main.nf new file mode 100644 index 00000000..5c4058e7 --- /dev/null +++ b/tests/modules/seqkit/replace/main.nf @@ -0,0 +1,24 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQKIT_REPLACE } from '../../../../modules/seqkit/replace/main.nf' +include { SEQKIT_REPLACE as SEQKIT_REPLACEUNCOMP } from '../../../../modules/seqkit/replace/main.nf' + +workflow test_seqkit_replace { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + ] + + SEQKIT_REPLACE ( input ) +} + +workflow test_seqkit_replace_uncomp { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + ] + + SEQKIT_REPLACEUNCOMP ( input ) +} diff --git a/tests/modules/seqkit/replace/nextflow.config b/tests/modules/seqkit/replace/nextflow.config new file mode 100644 index 00000000..8cec8505 --- /dev/null +++ b/tests/modules/seqkit/replace/nextflow.config @@ -0,0 +1,14 @@ +process { + + withName: 'SEQKIT_REPLACE' { + ext.args = "-s -p 'A' -r 'N'" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } + + withName: 'SEQKIT_REPLACEUNCOMP' { + ext.args = "-s -p 'T' -r 'N'" + ext.suffix = ".fasta" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } + +} diff --git a/tests/modules/seqkit/replace/test.yml b/tests/modules/seqkit/replace/test.yml new file mode 100644 index 00000000..94c3a5ef --- /dev/null +++ b/tests/modules/seqkit/replace/test.yml @@ -0,0 +1,21 @@ +- name: seqkit replace test_seqkit_replace + command: nextflow run tests/modules/seqkit/replace -entry test_seqkit_replace -c tests/config/nextflow.config + tags: + - seqkit + - seqkit/replace + files: + - path: output/seqkit/test.fasta.gz + md5sum: 053847219695c0a923d02352442d7abf + - path: output/seqkit/versions.yml + md5sum: dc9d18b7836c9db00a3032fd191bd831 + +- name: seqkit replace test_seqkit_replace_uncomp + command: nextflow run tests/modules/seqkit/replace -entry test_seqkit_replace_uncomp -c tests/config/nextflow.config + tags: + - seqkit + - seqkit/replace + files: + - path: output/seqkit/test..fasta + md5sum: 05d3294a62c72f5489f067c1da3c2f6c + - path: output/seqkit/versions.yml + md5sum: 3b88128487ec949f0bdeecebc375c407 diff --git a/tests/modules/seqkit/stats/main.nf b/tests/modules/seqkit/stats/main.nf new file mode 100644 index 00000000..77442115 --- /dev/null +++ b/tests/modules/seqkit/stats/main.nf @@ -0,0 +1,58 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQKIT_STATS } from '../../../../modules/seqkit/stats/main.nf' + +workflow test_seqkit_stats_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + SEQKIT_STATS ( input ) +} + +workflow test_seqkit_stats_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + + SEQKIT_STATS ( input ) +} + +workflow test_seqkit_stats_nanopore { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true), + ] + + SEQKIT_STATS ( input ) +} + +workflow test_seqkit_stats_genome_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + ] + + SEQKIT_STATS ( input ) +} + +workflow test_seqkit_stats_transcriptome_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true), + ] + + SEQKIT_STATS ( input ) +} diff --git a/tests/modules/seqkit/stats/nextflow.config b/tests/modules/seqkit/stats/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/seqkit/stats/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/seqkit/stats/test.yml b/tests/modules/seqkit/stats/test.yml new file mode 100644 index 00000000..fdf4533f --- /dev/null +++ b/tests/modules/seqkit/stats/test.yml @@ -0,0 +1,54 @@ +- name: seqkit stats test_seqkit_stats_single_end + command: nextflow run tests/modules/seqkit/stats -entry test_seqkit_stats_single_end -c tests/config/nextflow.config + tags: + - seqkit/stats + - seqkit + files: + - path: output/seqkit/test.tsv + md5sum: e23227d089a7e04b0ec0cb547c4aadff + - path: output/seqkit/versions.yml + md5sum: d67f0c16feb9df77b11f6c91bbdf9926 + +- name: seqkit stats test_seqkit_stats_paired_end + command: nextflow run tests/modules/seqkit/stats -entry test_seqkit_stats_paired_end -c tests/config/nextflow.config + tags: + - seqkit/stats + - seqkit + files: + - path: output/seqkit/test.tsv + md5sum: 9de20dc39fb01285e3f0c382fda9db52 + - path: output/seqkit/versions.yml + md5sum: bd8881933b953d07f2600e2e6a88ebf3 + +- name: seqkit stats test_seqkit_stats_nanopore + command: nextflow run tests/modules/seqkit/stats -entry test_seqkit_stats_nanopore -c tests/config/nextflow.config + tags: + - seqkit/stats + - seqkit + files: + - path: output/seqkit/test.tsv + md5sum: 5da1709eb5ae64fa3b2d624bffe2e7aa + - path: output/seqkit/versions.yml + md5sum: 565632701fbe048f7ba99f1865bd48ca + +- name: seqkit stats test_seqkit_stats_genome_fasta + command: nextflow run tests/modules/seqkit/stats -entry test_seqkit_stats_genome_fasta -c tests/config/nextflow.config + tags: + - seqkit/stats + - seqkit + files: + - path: output/seqkit/test.tsv + md5sum: f64489767a4e769539ef3faf83260184 + - path: output/seqkit/versions.yml + md5sum: 782fcdeaa922c8bb532ffa5808849d87 + +- name: seqkit stats test_seqkit_stats_transcriptome_fasta + command: nextflow run tests/modules/seqkit/stats -entry test_seqkit_stats_transcriptome_fasta -c tests/config/nextflow.config + tags: + - seqkit/stats + - seqkit + files: + - path: output/seqkit/test.tsv + md5sum: fbb975b665a08c8862fcd1268613a945 + - path: output/seqkit/versions.yml + md5sum: db99b016d986d26102ec398264a58410 diff --git a/tests/modules/seqsero2/test.yml b/tests/modules/seqsero2/test.yml index e2dec062..0ebb7324 100644 --- a/tests/modules/seqsero2/test.yml +++ b/tests/modules/seqsero2/test.yml @@ -6,6 +6,6 @@ - path: output/seqsero2/results/SeqSero_log.txt md5sum: d00242dfa734b5abb3622a6048f0b4fb - path: output/seqsero2/results/SeqSero_result.tsv - contains: ['Sample', 'Predicted', 'Note'] + contains: ["Sample", "Predicted", "Note"] - path: output/seqsero2/results/SeqSero_result.txt - contains: ['Sample', 'Predicted', 'Note'] + contains: ["Sample", "Predicted", "Note"] diff --git a/tests/modules/seqtk/rename/main.nf b/tests/modules/seqtk/rename/main.nf new file mode 100644 index 00000000..1f81352d --- /dev/null +++ b/tests/modules/seqtk/rename/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQTK_RENAME } from '../../../../modules/seqtk/rename/main.nf' + +workflow test_seqtk_rename { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + ] + SEQTK_RENAME ( input ) +} + +workflow test_seqtk_rename_fq { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + SEQTK_RENAME ( input ) +} diff --git a/tests/modules/seqtk/rename/nextflow.config b/tests/modules/seqtk/rename/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/seqtk/rename/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/seqtk/rename/test.yml b/tests/modules/seqtk/rename/test.yml new file mode 100644 index 00000000..75e919d9 --- /dev/null +++ b/tests/modules/seqtk/rename/test.yml @@ -0,0 +1,21 @@ +- name: seqtk rename test_seqtk_rename + command: nextflow run tests/modules/seqtk/rename -entry test_seqtk_rename -c tests/config/nextflow.config + tags: + - seqtk + - seqtk/rename + files: + - path: output/seqtk/test.renamed.fasta.gz + md5sum: 7b407952dcf0d925f1996e04a201d05b + - path: output/seqtk/versions.yml + md5sum: 24127592f1b9e5ee8e5ab04ee748c491 + +- name: seqtk rename test_seqtk_rename_fq + command: nextflow run tests/modules/seqtk/rename -entry test_seqtk_rename_fq -c tests/config/nextflow.config + tags: + - seqtk + - seqtk/rename + files: + - path: output/seqtk/test.renamed.fastq.gz + md5sum: babdfc2a3940a1e32a63479db2c1d600 + - path: output/seqtk/versions.yml + md5sum: 06c19670eb2b4185e8f4fa5dcf8fb0d5 diff --git a/tests/modules/seqtk/seq/main.nf b/tests/modules/seqtk/seq/main.nf new file mode 100644 index 00000000..4351b8a9 --- /dev/null +++ b/tests/modules/seqtk/seq/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQTK_SEQ } from '../../../../modules/seqtk/seq/main.nf' + +workflow test_seqtk_seq { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + ] + SEQTK_SEQ ( input ) +} + +workflow test_seqtk_seq_fq { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + SEQTK_SEQ ( input ) +} \ No newline at end of file diff --git a/tests/modules/seqtk/seq/nextflow.config b/tests/modules/seqtk/seq/nextflow.config new file mode 100644 index 00000000..174bccd9 --- /dev/null +++ b/tests/modules/seqtk/seq/nextflow.config @@ -0,0 +1,7 @@ +process { + // Testing ext.args for passing arguments into seqtk seq + withName: 'SEQTK_SEQ' { + ext.args = '-A' + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } +} \ No newline at end of file diff --git a/tests/modules/seqtk/seq/test.yml b/tests/modules/seqtk/seq/test.yml new file mode 100644 index 00000000..c6937364 --- /dev/null +++ b/tests/modules/seqtk/seq/test.yml @@ -0,0 +1,21 @@ +- name: seqtk seq test_seqtk_seq + command: nextflow run tests/modules/seqtk/seq -entry test_seqtk_seq -c tests/config/nextflow.config + tags: + - seqtk/seq + - seqtk + files: + - path: output/seqtk/test.seqtk-seq.fasta.gz + md5sum: 50d73992c8c7e56dc095ef47ec52a754 + - path: output/seqtk/versions.yml + md5sum: 6555e1061080c44f828de0b40b299e41 + +- name: seqtk seq test_seqtk_seq_fq + command: nextflow run tests/modules/seqtk/seq -entry test_seqtk_seq_fq -c tests/config/nextflow.config + tags: + - seqtk/seq + - seqtk + files: + - path: output/seqtk/test.seqtk-seq.fasta.gz + md5sum: 2f009f1647971a97b4edec726a99dc1a + - path: output/seqtk/versions.yml + md5sum: feb70feb3165d5c19fa50c16e46e6772 diff --git a/tests/modules/shasum/main.nf b/tests/modules/shasum/main.nf new file mode 100644 index 00000000..817ea6f0 --- /dev/null +++ b/tests/modules/shasum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHASUM } from '../../../modules/shasum/main.nf' + +workflow test_shasum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SHASUM ( input ) +} diff --git a/tests/modules/shasum/nextflow.config b/tests/modules/shasum/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shasum/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/shasum/test.yml b/tests/modules/shasum/test.yml new file mode 100644 index 00000000..6778d156 --- /dev/null +++ b/tests/modules/shasum/test.yml @@ -0,0 +1,8 @@ +- name: shasum test_shasum + command: nextflow run tests/modules/shasum -entry test_shasum -c tests/config/nextflow.config + tags: + - shasum + files: + - path: output/shasum/test.paired_end.bam.sha256 + md5sum: 138a19e100f09fc975ea1b717da9b6dd + - path: output/shasum/versions.yml diff --git a/tests/modules/shigatyper/main.nf b/tests/modules/shigatyper/main.nf new file mode 100644 index 00000000..eb4df084 --- /dev/null +++ b/tests/modules/shigatyper/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHIGATYPER } from '../../../modules/shigatyper/main.nf' + +workflow test_shigatyper_pe { + + input = [ + [ id:'test', single_end:false, is_ont:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_se { + + input = [ + [ id:'test', single_end:true, is_ont:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_ont { + + input = [ + [ id:'test', single_end:true, is_ont:true ], // meta map + [ file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} diff --git a/tests/modules/shigatyper/nextflow.config b/tests/modules/shigatyper/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shigatyper/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/shigatyper/test.yml b/tests/modules/shigatyper/test.yml new file mode 100644 index 00000000..9dda573b --- /dev/null +++ b/tests/modules/shigatyper/test.yml @@ -0,0 +1,29 @@ +- name: shigatyper test_shigatyper_pe + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_pe -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: d8ca45ed88dfba9bc570c01e4b49773b + +- name: shigatyper test_shigatyper_se + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_se -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 8bbf165da5a5df3b7771a33aad197eec + +- name: shigatyper test_shigatyper_ont + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_ont -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 0da333e1178e9e7e84a9116ad5a5ff71 diff --git a/tests/modules/sistr/main.nf b/tests/modules/sistr/main.nf new file mode 100644 index 00000000..4bd84844 --- /dev/null +++ b/tests/modules/sistr/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SISTR } from '../../../modules/sistr/main.nf' + +workflow test_sistr { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + SISTR ( input ) +} diff --git a/tests/modules/sistr/nextflow.config b/tests/modules/sistr/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/sistr/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/sistr/test.yml b/tests/modules/sistr/test.yml new file mode 100644 index 00000000..88182f28 --- /dev/null +++ b/tests/modules/sistr/test.yml @@ -0,0 +1,15 @@ +- name: sistr test_sistr + command: nextflow run tests/modules/sistr -entry test_sistr -c tests/config/nextflow.config + tags: + - sistr + files: + - path: output/sistr/test-allele.fasta + md5sum: 144a74999eb9dd01520be5c61e8bd210 + - path: output/sistr/test-allele.json + md5sum: 3eb993c9489904621f539a93ff9a90ec + - path: output/sistr/test-cgmlst.csv + md5sum: c50a2144955fe1b98a6d5792bf295088 + - path: output/sistr/test.tab + contains: ["cgmlst_ST", "serovar", "matched"] + - path: output/sistr/versions.yml + md5sum: 8b852f002c3ce67e3f6498da15b28296 diff --git a/tests/modules/slimfastq/main.nf b/tests/modules/slimfastq/main.nf new file mode 100644 index 00000000..40d44285 --- /dev/null +++ b/tests/modules/slimfastq/main.nf @@ -0,0 +1,46 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SLIMFASTQ } from '../../../modules/slimfastq/main.nf' + +workflow test_slimfastq_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)] + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_nanopore { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_pacbio { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['homo_sapiens']['pacbio']['ccs_fq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} diff --git a/tests/modules/slimfastq/nextflow.config b/tests/modules/slimfastq/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/slimfastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/slimfastq/test.yml b/tests/modules/slimfastq/test.yml new file mode 100644 index 00000000..f0d8b446 --- /dev/null +++ b/tests/modules/slimfastq/test.yml @@ -0,0 +1,41 @@ +- name: slimfastq test_slimfastq_single_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_single_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/versions.yml + md5sum: f52351f5c9e6259af02745c8eae5c780 + +- name: slimfastq test_slimfastq_paired_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_paired_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test_1.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/test_2.sfq + md5sum: 0d2c60b52a39f7c2cb7843e848d90afd + - path: output/slimfastq/versions.yml + md5sum: 6239853705877651a4851c4cb6d62da4 + +- name: slimfastq test_slimfastq_nanopore + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_nanopore -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: e17f14d64d3a75356b03ff2f9e8881f7 + - path: output/slimfastq/versions.yml + md5sum: 33153f1103482a2bd35cb2f4c337c5e8 + +- name: slimfastq test_slimfastq_pacbio + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_pacbio -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 9e8389e47e6ddf8c25e92412dd628339 + - path: output/slimfastq/versions.yml + md5sum: 1982789c3d5c7de37c0a9351e4ae63f7 diff --git a/tests/modules/snapaligner/align/main.nf b/tests/modules/snapaligner/align/main.nf new file mode 100644 index 00000000..4f5943fe --- /dev/null +++ b/tests/modules/snapaligner/align/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/align/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/align/main.nf' + +workflow test_snapaligner_single { + + input = [ + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_SINGLE ( input, SNAPALIGNER_INDEX.out.index ) +} + +workflow test_snapaligner_paired { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_PAIRED ( input, SNAPALIGNER_INDEX.out.index ) +} diff --git a/tests/modules/snapaligner/align/nextflow.config b/tests/modules/snapaligner/align/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/snapaligner/align/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/snapaligner/align/test.yml b/tests/modules/snapaligner/align/test.yml new file mode 100644 index 00000000..4e4fae61 --- /dev/null +++ b/tests/modules/snapaligner/align/test.yml @@ -0,0 +1,19 @@ +- name: snapaligner align test_snapaligner_single + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_single -c tests/config/nextflow.config + tags: + - snapaligner/align + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: 5d95594e4ef1ee23ce56e6a7cb64f0f2 + - path: output/snapaligner/versions.yml + +- name: snapaligner align test_snapaligner_paired + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_paired -c tests/config/nextflow.config + tags: + - snapaligner/align + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: a1405da5876f15dbe8a81516b94c2a15 + - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/index/main.nf b/tests/modules/snapaligner/index/main.nf new file mode 100644 index 00000000..4cebb876 --- /dev/null +++ b/tests/modules/snapaligner/index/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' + +workflow test_snapaligner_index { + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) +} diff --git a/tests/modules/snapaligner/index/nextflow.config b/tests/modules/snapaligner/index/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/snapaligner/index/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/snapaligner/index/test.yml b/tests/modules/snapaligner/index/test.yml new file mode 100644 index 00000000..2c4b4935 --- /dev/null +++ b/tests/modules/snapaligner/index/test.yml @@ -0,0 +1,13 @@ +- name: snapaligner index test_snapaligner_index + command: nextflow run tests/modules/snapaligner/index -entry test_snapaligner_index -c tests/config/nextflow.config + tags: + - snapaligner/index + - snapaligner + files: + - path: output/snapaligner/snap/Genome + md5sum: 7e189c954142ba37460332b467e34ed4 + - path: output/snapaligner/snap/GenomeIndex + md5sum: 298da8bcb1134f7b24379a792a7a46f8 + - path: output/snapaligner/snap/GenomeIndexHash + - path: output/snapaligner/snap/OverflowTable + - path: output/snapaligner/versions.yml diff --git a/tests/modules/snpsites/test.yml b/tests/modules/snpsites/test.yml index d9c19cd5..9d80dd51 100644 --- a/tests/modules/snpsites/test.yml +++ b/tests/modules/snpsites/test.yml @@ -6,4 +6,4 @@ - path: output/snpsites/filtered_alignment.fas md5sum: f96c7513003e878e16fa9eac9fcda0f4 - path: output/snpsites/constant.sites.txt - md5sum: 8b9b226e3787f7baaefce07405af22c9 \ No newline at end of file + md5sum: 8b9b226e3787f7baaefce07405af22c9 diff --git a/tests/modules/sourmash/sketch/main.nf b/tests/modules/sourmash/sketch/main.nf new file mode 100644 index 00000000..c9288c59 --- /dev/null +++ b/tests/modules/sourmash/sketch/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SOURMASH_SKETCH } from '../../../../modules/sourmash/sketch/main.nf' + +workflow test_sourmash_sketch { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + SOURMASH_SKETCH ( input ) +} diff --git a/tests/modules/sourmash/sketch/nextflow.config b/tests/modules/sourmash/sketch/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/sourmash/sketch/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/sourmash/sketch/test.yml b/tests/modules/sourmash/sketch/test.yml new file mode 100644 index 00000000..5bd18967 --- /dev/null +++ b/tests/modules/sourmash/sketch/test.yml @@ -0,0 +1,10 @@ +- name: sourmash sketch test_sourmash_sketch + command: nextflow run tests/modules/sourmash/sketch -entry test_sourmash_sketch -c tests/config/nextflow.config + tags: + - sourmash + - sourmash/sketch + files: + - path: output/sourmash/test.sig + md5sum: 4b0dee307e35fc670cd0d416321e4961 + - path: output/sourmash/versions.yml + md5sum: ec70dabc3e4b3bf11d39c17a99ca4bc6 diff --git a/tests/modules/sratools/fasterqdump/main.nf b/tests/modules/sratools/fasterqdump/main.nf index 2f838fd2..daa7a5ae 100644 --- a/tests/modules/sratools/fasterqdump/main.nf +++ b/tests/modules/sratools/fasterqdump/main.nf @@ -7,22 +7,22 @@ include { SRATOOLS_FASTERQDUMP } from '../../../../modules/sratools/fasterqdump/ workflow test_sratools_fasterqdump_single_end { - archive = file(params.test_data['sarscov2']['illumina']['SRR13255544_tar_gz'], checkIfExists: true) + archive = [ [], file(params.test_data['sarscov2']['illumina']['SRR13255544_tar_gz'], checkIfExists: true) ] UNTAR ( archive ) def input = Channel.of([ id:'test_single_end', single_end:true ]) - .combine(UNTAR.out.untar) + .combine(UNTAR.out.untar.map{ it[1] }) - SRATOOLS_FASTERQDUMP ( input ) + SRATOOLS_FASTERQDUMP(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true)) } workflow test_sratools_fasterqdump_paired_end { - archive = file(params.test_data['sarscov2']['illumina']['SRR11140744_tar_gz'], checkIfExists: true) + archive = [ [], file(params.test_data['sarscov2']['illumina']['SRR11140744_tar_gz'], checkIfExists: true) ] UNTAR ( archive ) def input = Channel.of([ id:'test_paired_end', single_end:false ]) - .combine(UNTAR.out.untar) + .combine(UNTAR.out.untar.map{ it[1] }) - SRATOOLS_FASTERQDUMP ( input ) + SRATOOLS_FASTERQDUMP(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true)) } diff --git a/tests/modules/sratools/fasterqdump/test.yml b/tests/modules/sratools/fasterqdump/test.yml index 64cf2404..6fbf608c 100644 --- a/tests/modules/sratools/fasterqdump/test.yml +++ b/tests/modules/sratools/fasterqdump/test.yml @@ -8,6 +8,9 @@ md5sum: 1054c7b71884acdb5eed8a378f18be82 - path: output/untar/SRR13255544/SRR13255544.sra md5sum: 466d05dafb2eec672150754168010b4d + - path: output/sratools/versions.yml + contains: + - "sratools: 2.11.0" - name: sratools fasterqdump test_sratools_fasterqdump_paired_end command: nextflow run ./tests/modules/sratools/fasterqdump -entry test_sratools_fasterqdump_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/sratools/fasterqdump/nextflow.config @@ -21,3 +24,6 @@ md5sum: 3e3b3af3413f50a1685fd7b3f1456d4e - path: output/untar/SRR11140744/SRR11140744.sra md5sum: 065666caf5b2d5dfb0cb25d5f3abe659 + - path: output/sratools/versions.yml + contains: + - "sratools: 2.11.0" diff --git a/tests/modules/sratools/prefetch/main.nf b/tests/modules/sratools/prefetch/main.nf index aa6252a1..cf9794ab 100644 --- a/tests/modules/sratools/prefetch/main.nf +++ b/tests/modules/sratools/prefetch/main.nf @@ -8,8 +8,8 @@ workflow test_sratools_prefetch { input = [ [ id:'test', single_end:false ], // meta map - 'ERR2815334' + 'DRR000774' ] - SRATOOLS_PREFETCH ( input ) + SRATOOLS_PREFETCH(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true)) } diff --git a/tests/modules/sratools/prefetch/test.yml b/tests/modules/sratools/prefetch/test.yml index a2efef77..a6c213f8 100644 --- a/tests/modules/sratools/prefetch/test.yml +++ b/tests/modules/sratools/prefetch/test.yml @@ -4,5 +4,8 @@ - sratools/prefetch - sratools files: - - path: output/sratools/ERR2815334/ERR2815334.sra - md5sum: 9a98c7f6f4774b7ef94aa915b92a54ea + - path: output/sratools/DRR000774/DRR000774.sra + md5sum: 7647dba20c89c0e3d7ad13842f060eb0 + - path: output/sratools/versions.yml + contains: + - "sratools: 2.11.0" diff --git a/tests/modules/srst2/srst2/main.nf b/tests/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..7d51937b --- /dev/null +++ b/tests/modules/srst2/srst2/main.nf @@ -0,0 +1,53 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SRST2_SRST2 } from '../../../../modules/srst2/srst2/main.nf' + +workflow test_srst2_srst2_exit { + + input = [ + [ id:'test', single_end:false, db:"test"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], +// [("")] + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_mlst { + + input = [ + [ id:'test', single_end:false, db:"mlst"], // meta map + [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_1.fastq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_2.fastq.gz", checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/MLST_DB.fas') + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_paired_end { + + input = [ + [ id:'test', single_end:false, db:"gene"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_single_end { + + input = [ + [ id:'test', single_end:true, db:"gene" ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} diff --git a/tests/modules/srst2/srst2/nextflow.config b/tests/modules/srst2/srst2/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/srst2/srst2/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml new file mode 100644 index 00000000..f7621f4f --- /dev/null +++ b/tests/modules/srst2/srst2/test.yml @@ -0,0 +1,51 @@ +- name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_exit -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + exit_code: 1 + +- name: srst2 srst2 test_srst2_srst2_mlst + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_mlst -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__SRR9067271.MLST_DB.pileup + contains: + - "dnaJ-1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" + - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam + - path: output/srst2/test__mlst__MLST_DB__results.txt + md5sum: ec1b1f69933401d67c57f64cad11a098 + - path: output/srst2/versions.yml + md5sum: a0c256a2fd3636069710b8ef22ee5ea7 + +- name: srst2 srst2 test_srst2_srst2_paired_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_paired_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: 099aa6cacec5524b311f606debdfb3a9 + - path: output/srst2/test__test1.resFinder_20180221_srst2.pileup + md5sum: 64b512ff495b828c456405ec7b676ad1 + - path: output/srst2/test__test1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml + md5sum: b446a70f1a2b4f60757829bcd744a214 + +- name: srst2 srst2 test_srst2_srst2_single_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_single_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt + md5sum: d0762ef8c38afd0e0a34cce52ed1a3db + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: b8850c6644406d8b131e471ecc3f9013 + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.pileup + md5sum: 5f6279dc8124aa762a9dfe3d7a871277 + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml + md5sum: 790fe00493c6634d17801a930073218b diff --git a/tests/modules/ssuissero/main.nf b/tests/modules/ssuissero/main.nf new file mode 100644 index 00000000..aa285133 --- /dev/null +++ b/tests/modules/ssuissero/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SSUISSERO } from '../../../modules/ssuissero/main.nf' + +workflow test_ssuissero { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + SSUISSERO ( input ) +} diff --git a/tests/modules/ssuissero/nextflow.config b/tests/modules/ssuissero/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/ssuissero/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/ssuissero/test.yml b/tests/modules/ssuissero/test.yml new file mode 100644 index 00000000..ff61b267 --- /dev/null +++ b/tests/modules/ssuissero/test.yml @@ -0,0 +1,9 @@ +- name: ssuissero test_ssuissero + command: nextflow run tests/modules/ssuissero -entry test_ssuissero -c tests/config/nextflow.config + tags: + - ssuissero + files: + - path: output/ssuissero/test_serotyping_res.tsv + md5sum: 559dd2ca386eeb58f3975e3204ce9d43 + - path: output/ssuissero/versions.yml + md5sum: be29b478690b2047e0413ffe01c85e1e diff --git a/tests/modules/stadeniolib/scramble/main.nf b/tests/modules/stadeniolib/scramble/main.nf new file mode 100644 index 00000000..d29c6dd8 --- /dev/null +++ b/tests/modules/stadeniolib/scramble/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { STADENIOLIB_SCRAMBLE } from '../../../../modules/stadeniolib/scramble/main.nf' + +workflow test_stadeniolib { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + STADENIOLIB_SCRAMBLE ( input, file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true), []) +} diff --git a/tests/modules/stadeniolib/scramble/nextflow.config b/tests/modules/stadeniolib/scramble/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/stadeniolib/scramble/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/stadeniolib/scramble/test.yml b/tests/modules/stadeniolib/scramble/test.yml new file mode 100644 index 00000000..cea6fb70 --- /dev/null +++ b/tests/modules/stadeniolib/scramble/test.yml @@ -0,0 +1,7 @@ +- name: stadeniolib test_stadeniolib + command: nextflow run tests/modules/stadeniolib -entry test_stadeniolib -c tests/config/nextflow.config + tags: + - stadeniolib + files: + - path: output/stadeniolib/test.cram + - path: output/stadeniolib/versions.yml diff --git a/tests/modules/stranger/main.nf b/tests/modules/stranger/main.nf new file mode 100644 index 00000000..4a930c19 --- /dev/null +++ b/tests/modules/stranger/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf' +include { STRANGER } from '../../../modules/stranger/main.nf' + + +input = [ [ id:'test', gender:'male' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + ] +fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) +variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) + + +workflow test_stranger { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, variant_catalog ) +} + +workflow test_stranger_without_optional_variant_catalog { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) +} + +workflow test_stranger_without_optional_variant_catalog_stubs { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) +} diff --git a/tests/modules/stranger/nextflow.config b/tests/modules/stranger/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/stranger/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/stranger/test.yml b/tests/modules/stranger/test.yml new file mode 100644 index 00000000..bf922c86 --- /dev/null +++ b/tests/modules/stranger/test.yml @@ -0,0 +1,37 @@ +- name: stranger test_stranger + command: nextflow run tests/modules/stranger -entry test_stranger -c tests/config/nextflow.config + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76 + - path: output/expansionhunter/versions.yml + md5sum: f3962a6eecfddf9682414c0f605a885a + - path: output/stranger/test.vcf.gz + md5sum: 68b0ca1319851134ffa8793a4704dc11 + - path: output/stranger/versions.yml + md5sum: 5ec35fd835fb1be50bc3e7c004310fc0 + +- name: stranger test_stranger_without_optional_variant_catalog + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76 + - path: output/expansionhunter/versions.yml + md5sum: c95af9e6d8cd9bd2ce1090ca4e7a6020 + - path: output/stranger/test.vcf.gz + md5sum: bbe15159195681d5c18596d3ad85c78f + - path: output/stranger/versions.yml + md5sum: 8558542a007e90ea5dcdceed3f12585d + +- name: stranger test_stranger_without_optional_variant_catalog_stubs + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config -stub-run + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + - path: output/expansionhunter/versions.yml + - path: output/stranger/test.vcf.gz + - path: output/stranger/versions.yml diff --git a/tests/modules/strelka/germline/main.nf b/tests/modules/strelka/germline/main.nf index c50d76e1..312a4f72 100644 --- a/tests/modules/strelka/germline/main.nf +++ b/tests/modules/strelka/germline/main.nf @@ -9,28 +9,29 @@ workflow test_strelka_germline { [ id:'test'], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + [], + [] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - target_bed = [] - target_bed_tbi = [] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - STRELKA_GERMLINE ( input, fasta, fai, target_bed, target_bed_tbi ) + STRELKA_GERMLINE ( input, fasta, fai) } workflow test_strelka_germline_target_bed { + input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz_tbi'], checkIfExists: true) ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - target_bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - target_bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - STRELKA_GERMLINE ( input, fasta, fai, target_bed, target_bed_tbi ) + STRELKA_GERMLINE ( input, fasta, fai) } diff --git a/tests/modules/strelka/germline/nextflow.config b/tests/modules/strelka/germline/nextflow.config index 8730f1c4..5983e1b8 100644 --- a/tests/modules/strelka/germline/nextflow.config +++ b/tests/modules/strelka/germline/nextflow.config @@ -1,5 +1,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - + withName: STRELKA_GERMLINE { + ext.args = '--exome' + } } diff --git a/tests/modules/strelka/somatic/main.nf b/tests/modules/strelka/somatic/main.nf index b1d4efeb..ab75f0e2 100644 --- a/tests/modules/strelka/somatic/main.nf +++ b/tests/modules/strelka/somatic/main.nf @@ -12,18 +12,19 @@ workflow test_strelka_somatic { file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), - [],[] + [],[], + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz_tbi'], checkIfExists: true) ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - STRELKA_SOMATIC (input, fasta, fai, bed, bed_tbi ) + STRELKA_SOMATIC (input, fasta, fai ) } -workflow test_strelka__best_practices_somatic { +workflow test_strelka_best_practices_somatic { + input = [ [ id:'test', single_end:false ], // meta map @@ -31,14 +32,14 @@ workflow test_strelka__best_practices_somatic { file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed_gz_tbi'], checkIfExists: true) ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - STRELKA_SOMATIC ( input, fasta, fai, bed, bed_tbi ) + STRELKA_SOMATIC ( input, fasta, fai ) } diff --git a/tests/modules/strelka/somatic/nextflow.config b/tests/modules/strelka/somatic/nextflow.config index 8730f1c4..5676ba15 100644 --- a/tests/modules/strelka/somatic/nextflow.config +++ b/tests/modules/strelka/somatic/nextflow.config @@ -1,5 +1,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - + withName: STRELKA_SOMATIC { + ext.args = '--exome' + } } diff --git a/tests/modules/strelka/somatic/test.yml b/tests/modules/strelka/somatic/test.yml index a56f955a..787f3b19 100644 --- a/tests/modules/strelka/somatic/test.yml +++ b/tests/modules/strelka/somatic/test.yml @@ -6,20 +6,16 @@ files: - path: output/strelka/test.somatic_indels.vcf.gz - path: output/strelka/test.somatic_indels.vcf.gz.tbi - md5sum: 4cb176febbc8c26d717a6c6e67b9c905 - path: output/strelka/test.somatic_snvs.vcf.gz - path: output/strelka/test.somatic_snvs.vcf.gz.tbi - md5sum: 4cb176febbc8c26d717a6c6e67b9c905 -- name: strelka somatic test_strelka__best_practices_somatic - command: nextflow run ./tests/modules/strelka/somatic -entry test_strelka__best_practices_somatic -c ./tests/config/nextflow.config -c ./tests/modules/strelka/somatic/nextflow.config +- name: strelka somatic test_strelka_best_practices_somatic + command: nextflow run ./tests/modules/strelka/somatic -entry test_strelka_best_practices_somatic -c ./tests/config/nextflow.config -c ./tests/modules/strelka/somatic/nextflow.config tags: - strelka - strelka/somatic files: - path: output/strelka/test.somatic_indels.vcf.gz - path: output/strelka/test.somatic_indels.vcf.gz.tbi - md5sum: 4cb176febbc8c26d717a6c6e67b9c905 - path: output/strelka/test.somatic_snvs.vcf.gz - path: output/strelka/test.somatic_snvs.vcf.gz.tbi - md5sum: 4cb176febbc8c26d717a6c6e67b9c905 diff --git a/tests/modules/stringtie/merge/main.nf b/tests/modules/stringtie/merge/main.nf index 7851e755..3fe32902 100644 --- a/tests/modules/stringtie/merge/main.nf +++ b/tests/modules/stringtie/merge/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' -include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' /* * Test with forward strandedness @@ -15,8 +15,8 @@ workflow test_stringtie_forward_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } @@ -35,8 +35,8 @@ workflow test_stringtie_reverse_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } diff --git a/tests/modules/stringtie/merge/test.yml b/tests/modules/stringtie/merge/test.yml index 392a1d7c..fca66447 100644 --- a/tests/modules/stringtie/merge/test.yml +++ b/tests/modules/stringtie/merge/test.yml @@ -5,7 +5,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: 9fab7049ef2eafdea246fc787d1def40 + md5sum: d959eb2fab0db48ded7275e0a2e83c05 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -17,11 +17,10 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 9708811bcefe0f6384293d6f419f3250 + md5sum: 8bcd8e2730ed3337e2730186dbc184f3 - path: output/stringtie/test.transcripts.gtf - md5sum: 0e42709bfe30c2c7f2574ba664f5fa9f + md5sum: a914bd55b68a4b5f607738b17861e362 - name: stringtie merge test_stringtie_reverse_merge command: nextflow run ./tests/modules/stringtie/merge -entry test_stringtie_reverse_merge -c ./tests/config/nextflow.config -c ./tests/modules/stringtie/merge/nextflow.config @@ -30,7 +29,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: afc461bb3cbc368f268a7a45c1b54497 + md5sum: 6da479298d73d5b3216d4e1576a2bdf4 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -42,8 +41,7 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 94b85145d60ab1b80a7f0f6cf08418b0 + md5sum: f289f41b3ba1b9f0aa05d14408f1a5da - path: output/stringtie/test.transcripts.gtf - md5sum: 3196e3d50fd461aae6408e0a70acae68 + md5sum: 9dcdc9577c0fdbb25089eda210267546 diff --git a/tests/modules/stringtie/stringtie/main.nf b/tests/modules/stringtie/stringtie/main.nf index ae6abe67..463e4b98 100644 --- a/tests/modules/stringtie/stringtie/main.nf +++ b/tests/modules/stringtie/stringtie/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' // // Test with forward strandedness // @@ -13,7 +13,7 @@ workflow test_stringtie_forward { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } // @@ -26,5 +26,5 @@ workflow test_stringtie_reverse { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } diff --git a/tests/modules/stringtie/stringtie/test.yml b/tests/modules/stringtie/stringtie/test.yml index 732b9fd1..2815ba81 100644 --- a/tests/modules/stringtie/stringtie/test.yml +++ b/tests/modules/stringtie/stringtie/test.yml @@ -8,7 +8,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7d8bce7f2a922e367cedccae7267c22e - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 6b4cf69bc03f3f69890f972a0e8b7471 - path: ./output/stringtie/test.ballgown/i_data.ctab @@ -30,7 +29,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7385b870b955dae2c2ab78a70cf05cce - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 879b6696029d19c4737b562e9d149218 - path: ./output/stringtie/test.ballgown/i_data.ctab diff --git a/tests/modules/svdb/merge/main.nf b/tests/modules/svdb/merge/main.nf index f417c3f7..3cbb4b44 100644 --- a/tests/modules/svdb/merge/main.nf +++ b/tests/modules/svdb/merge/main.nf @@ -14,3 +14,13 @@ workflow test_svdb_merge { SVDB_MERGE ( input, priority ) } + +workflow test_svdb_merge_noprio { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] + ] + + SVDB_MERGE ( input, [] ) +} diff --git a/tests/modules/svdb/merge/test.yml b/tests/modules/svdb/merge/test.yml index 8d16562f..46c4fef0 100644 --- a/tests/modules/svdb/merge/test.yml +++ b/tests/modules/svdb/merge/test.yml @@ -5,3 +5,10 @@ - svdb/merge files: - path: output/svdb/test_sv_merge.vcf +- name: svdb merge noprio + command: nextflow run ./tests/modules/svdb/merge -entry test_svdb_merge_noprio -c ./tests/config/nextflow.config -c ./tests/modules/svdb/merge/nextflow.config + tags: + - svdb + - svdb/merge + files: + - path: output/svdb/test_sv_merge.vcf diff --git a/tests/modules/svdb/query/main.nf b/tests/modules/svdb/query/main.nf index 972f99e1..c014320f 100644 --- a/tests/modules/svdb/query/main.nf +++ b/tests/modules/svdb/query/main.nf @@ -14,5 +14,29 @@ workflow test_svdb_query { file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true) ] - SVDB_QUERY ( input, vcf_db ) + in_occs = ['AC'] + in_frqs = ['AF'] + out_occs = ['gnomad_svAC'] + out_frqs = ['gnomad_svAF'] + + SVDB_QUERY ( input, in_occs, in_frqs, out_occs, out_frqs, vcf_db ) +} + +workflow test_svdb_query_multiple { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_sv_vcf'], checkIfExists: true) ] + ] + + vcf_db = [ + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['gnomad2_r2_1_1_sv_vcf_gz'], checkIfExists: true) + ] + + in_occs = ['AC','AC'] + in_frqs = ['AF','AF'] + out_occs = ['gnomad_svAC','gnomad_svAC'] + out_frqs = ['gnomad_svAF','gnomad_svAF'] + + SVDB_QUERY ( input, in_occs, in_frqs, out_occs, out_frqs, vcf_db ) } diff --git a/tests/modules/svdb/query/nextflow.config b/tests/modules/svdb/query/nextflow.config index 2a6c9d90..8730f1c4 100644 --- a/tests/modules/svdb/query/nextflow.config +++ b/tests/modules/svdb/query/nextflow.config @@ -2,8 +2,4 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: SVDB_QUERY { - ext.args = '--in_occ AC --out_occ gnomad_svAC --in_frq AF --out_frq gnomad_svAF' - } - } diff --git a/tests/modules/svdb/query/test.yml b/tests/modules/svdb/query/test.yml index b95ecafe..a7cbe3a6 100644 --- a/tests/modules/svdb/query/test.yml +++ b/tests/modules/svdb/query/test.yml @@ -4,4 +4,12 @@ - svdb - svdb/query files: - - path: output/svdb/test_ann_svdbq.vcf + - path: output/svdb/test_query.vcf + +- name: svdb query multiple + command: nextflow run ./tests/modules/svdb/query -entry test_svdb_query_multiple -c ./tests/config/nextflow.config -c ./tests/modules/svdb/query/nextflow.config + tags: + - svdb + - svdb/query + files: + - path: output/svdb/test_query.vcf diff --git a/tests/modules/tabix/bgzip/main.nf b/tests/modules/tabix/bgzip/main.nf index 4d349890..4e326d64 100644 --- a/tests/modules/tabix/bgzip/main.nf +++ b/tests/modules/tabix/bgzip/main.nf @@ -4,10 +4,18 @@ nextflow.enable.dsl = 2 include { TABIX_BGZIP } from '../../../../modules/tabix/bgzip/main.nf' -workflow test_tabix_bgzip { +workflow test_tabix_bgzip_compress { input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] ] TABIX_BGZIP ( input ) } + +workflow test_tabix_bgzip_decompress { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['test_bed_gz'], checkIfExists: true) ] + ] + + TABIX_BGZIP ( input ) +} diff --git a/tests/modules/tabix/bgzip/test.yml b/tests/modules/tabix/bgzip/test.yml index 19357655..72819c90 100644 --- a/tests/modules/tabix/bgzip/test.yml +++ b/tests/modules/tabix/bgzip/test.yml @@ -1,8 +1,16 @@ -- name: tabix bgzip - command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config +- name: tabix bgzip compress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_compress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config tags: - tabix - tabix/bgzip files: - path: ./output/tabix/test.vcf.gz md5sum: fc178eb342a91dc0d1d568601ad8f8e2 +- name: tabix bgzip decompress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_decompress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config + tags: + - tabix + - tabix/bgzip + files: + - path: ./output/tabix/test.bed + md5sum: fe4053cf4de3aebbdfc3be2efb125a74 diff --git a/tests/modules/tabix/tabix/main.nf b/tests/modules/tabix/tabix/main.nf index 993ee812..da26f4d7 100644 --- a/tests/modules/tabix/tabix/main.nf +++ b/tests/modules/tabix/tabix/main.nf @@ -2,9 +2,10 @@ nextflow.enable.dsl = 2 -include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_VCF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_TBI } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_CSI } from '../../../../modules/tabix/tabix/main.nf' workflow test_tabix_tabix_bed { input = [ [ id:'B.bed' ], // meta map @@ -22,10 +23,18 @@ workflow test_tabix_tabix_gff { TABIX_GFF ( input ) } -workflow test_tabix_tabix_vcf { +workflow test_tabix_tabix_vcf_tbi { input = [ [ id:'test.vcf' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] ] - TABIX_VCF ( input ) + TABIX_VCF_TBI ( input ) +} + +workflow test_tabix_tabix_vcf_csi { + input = [ [ id:'test.vcf' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + ] + + TABIX_VCF_CSI ( input ) } diff --git a/tests/modules/tabix/tabix/nextflow.config b/tests/modules/tabix/tabix/nextflow.config index aa97a873..139e0865 100644 --- a/tests/modules/tabix/tabix/nextflow.config +++ b/tests/modules/tabix/tabix/nextflow.config @@ -10,8 +10,12 @@ process { ext.args = '-p gff' } - withName: TABIX_VCF { + withName: TABIX_VCF_TBI { ext.args = '-p vcf' } + withName: TABIX_VCF_CSI { + ext.args = '-p vcf --csi' + } + } diff --git a/tests/modules/tabix/tabix/test.yml b/tests/modules/tabix/tabix/test.yml index 46be28dd..6d168ef5 100644 --- a/tests/modules/tabix/tabix/test.yml +++ b/tests/modules/tabix/tabix/test.yml @@ -15,10 +15,18 @@ - path: ./output/tabix/genome.gff3.gz.tbi md5sum: f79a67d95a98076e04fbe0455d825926 - name: tabix tabix vcf - command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_tbi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config tags: - tabix - tabix/tabix files: - path: output/tabix/test.vcf.gz.tbi md5sum: 36e11bf96ed0af4a92caa91a68612d64 +- name: tabix tabix vcf csi + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_csi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + tags: + - tabix + - tabix/tabix + files: + - path: output/tabix/test.vcf.gz.csi + md5sum: 5f930522d2b9dcdba2807b7da4dfa3fd diff --git a/tests/modules/tbprofiler/profile/test.yml b/tests/modules/tbprofiler/profile/test.yml index 8b40f1fa..6e30b784 100644 --- a/tests/modules/tbprofiler/profile/test.yml +++ b/tests/modules/tbprofiler/profile/test.yml @@ -6,7 +6,7 @@ files: - path: output/tbprofiler/bam/test.bam - path: output/tbprofiler/results/test.results.json - contains: ['genome_positions', 'locus_tag', 'tbprofiler_version'] + contains: ["genome_positions", "locus_tag", "tbprofiler_version"] - path: output/tbprofiler/vcf/test.targets.csq.vcf.gz - name: tbprofiler profile nanopore @@ -17,5 +17,5 @@ files: - path: output/tbprofiler/bam/test.bam - path: output/tbprofiler/results/test.results.json - contains: ['genome_positions', 'locus_tag', 'tbprofiler_version'] + contains: ["genome_positions", "locus_tag", "tbprofiler_version"] - path: output/tbprofiler/vcf/test.targets.csq.vcf.gz diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 168d21c5..40ea5b4d 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -9,6 +9,7 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: bdce14ae8292bf3deb81f6f255baf859 - name: tiddit sv no ref command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config @@ -21,3 +22,4 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: 3d0e83a8199b2bdb81cfe3e6b12bf64b diff --git a/tests/modules/umitools/dedup/main.nf b/tests/modules/umitools/dedup/main.nf new file mode 100644 index 00000000..f89ba935 --- /dev/null +++ b/tests/modules/umitools/dedup/main.nf @@ -0,0 +1,56 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UMITOOLS_EXTRACT } from '../../../../modules/umitools/extract/main.nf' +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' +include { BWA_MEM } from '../../../../modules/bwa/mem/main.nf' +include { SAMTOOLS_INDEX } from '../../../../modules/samtools/index/main.nf' +include { UMITOOLS_DEDUP } from '../../../../modules/umitools/dedup/main.nf' + +// +// Test with no UMI +// +workflow test_umitools_dedup_no_umi { + input = [ [ id:'test'], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] + ] + + UMITOOLS_DEDUP ( input ) +} + +// +// Test with single-end data +// +workflow test_umitools_dedup_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + UMITOOLS_EXTRACT ( input ) + BWA_INDEX ( fasta ) + BWA_MEM ( UMITOOLS_EXTRACT.out.reads, BWA_INDEX.out.index, true ) + SAMTOOLS_INDEX (BWA_MEM.out.bam) + UMITOOLS_DEDUP(BWA_MEM.out.bam.join(SAMTOOLS_INDEX.out.bai, by: [0])) +} + +// +// Test with paired-end data +// +workflow test_umitools_dedup_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + UMITOOLS_EXTRACT ( input ) + BWA_INDEX ( fasta ) + BWA_MEM ( UMITOOLS_EXTRACT.out.reads, BWA_INDEX.out.index, true ) + SAMTOOLS_INDEX (BWA_MEM.out.bam) + UMITOOLS_DEDUP(BWA_MEM.out.bam.join(SAMTOOLS_INDEX.out.bai, by: [0])) +} diff --git a/tests/modules/umitools/dedup/nextflow.config b/tests/modules/umitools/dedup/nextflow.config new file mode 100644 index 00000000..4a7533ef --- /dev/null +++ b/tests/modules/umitools/dedup/nextflow.config @@ -0,0 +1,17 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: UMITOOLS_EXTRACT { + ext.args = '--bc-pattern="NNNN"' + } + + withName: UMITOOLS_DEDUP { + ext.args = '' + ext.prefix = 'dedup' + } + + withName: BWA_MEM { + ext.args2 = '' + } +} diff --git a/tests/modules/umitools/dedup/test.yml b/tests/modules/umitools/dedup/test.yml new file mode 100644 index 00000000..2ba9073b --- /dev/null +++ b/tests/modules/umitools/dedup/test.yml @@ -0,0 +1,54 @@ +- name: umitools dedup test_umitools_dedup_no_umi + command: nextflow run tests/modules/umitools/dedup -entry test_umitools_dedup_no_umi -c tests/config/nextflow.config + tags: + - umitools/dedup + - umitools + files: + - path: output/umitools/dedup.bam + md5sum: 53b4edc399db81b87d2343e78af73cf0 + - path: output/umitools/dedup_edit_distance.tsv + md5sum: 65186b0964e2f8d970cc04d736d8b119 + - path: output/umitools/dedup_per_umi.tsv + md5sum: 8e6783a4a79437b095f095f2aefe7c01 + - path: output/umitools/dedup_per_umi_per_position.tsv + md5sum: 9386db4a104b8e4e32f3ca4a84efa4ac + - path: output/umitools/versions.yml + md5sum: 4aaaa33565bcd9a984255139933d6446 + +- name: umitools dedup test_umitools_dedup_single_end + command: nextflow run tests/modules/umitools/dedup -entry test_umitools_dedup_single_end -c tests/config/nextflow.config + tags: + - umitools + - umitools/dedup + files: + - path: output/bwa/test.bam + md5sum: ea41a3cdca1856b22845e1067fd31f37 + - path: output/bwa/versions.yml + md5sum: ce4d987f2c53f4c01b31d210c357b24a + - path: output/samtools/test.bam.bai + md5sum: 095af0ad3921212597ffd7c342ecd5a0 + - path: output/samtools/versions.yml + md5sum: 69b7cde627c9b4e8403dfc125db71cc7 + - path: output/umitools/dedup.bam + md5sum: d95df177063432748ff33f473910cb1e + - path: output/umitools/versions.yml + md5sum: 730e768dd199d2f5bfb6fd0850446344 + +- name: umitools dedup test_umitools_dedup_paired_end + command: nextflow run tests/modules/umitools/dedup -entry test_umitools_dedup_paired_end -c tests/config/nextflow.config + tags: + - umitools + - umitools/dedup + files: + - path: output/bwa/test.bam + md5sum: 1ad786cae0ff2254c655e3a206929617 + - path: output/bwa/versions.yml + md5sum: b524c5ddf61c20f4a0a93ae8fc78b851 + - path: output/samtools/test.bam.bai + md5sum: 7496f4056a8e86327ca93e350f282fc2 + - path: output/samtools/versions.yml + md5sum: 72fc2ab934fd4bca0f7f14a705530d34 + - path: output/umitools/dedup.bam + md5sum: e8d1eae2aacef76254948c5568e94555 + - path: output/umitools/versions.yml + md5sum: fd39e05042d354b3d8de49b617d3183d diff --git a/tests/modules/umitools/extract/main.nf b/tests/modules/umitools/extract/main.nf new file mode 100644 index 00000000..3baac16a --- /dev/null +++ b/tests/modules/umitools/extract/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UMITOOLS_EXTRACT } from '../../../../modules/umitools/extract/main.nf' + +// +// Test with single-end data +// +workflow test_umitools_extract_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + UMITOOLS_EXTRACT ( input ) +} + +// +// Test with paired-end data +// +workflow test_umitools_extract_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + UMITOOLS_EXTRACT ( input ) +} + diff --git a/tests/modules/umitools/extract/nextflow.config b/tests/modules/umitools/extract/nextflow.config new file mode 100644 index 00000000..628f5fcd --- /dev/null +++ b/tests/modules/umitools/extract/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: UMITOOLS_EXTRACT { + ext.args = '--bc-pattern="NNNN"' + } + +} diff --git a/tests/modules/umitools/extract/test.yml b/tests/modules/umitools/extract/test.yml new file mode 100644 index 00000000..336cd122 --- /dev/null +++ b/tests/modules/umitools/extract/test.yml @@ -0,0 +1,27 @@ +- name: umitools extract test_umitools_extract_single_end + command: nextflow run tests/modules/umitools/extract -entry test_umitools_extract_single_end -c tests/config/nextflow.config + tags: + - umitools/extract + - umitools + files: + - path: output/umitools/test.umi_extract.fastq.gz + should_exist: true + - path: output/umitools/test.umi_extract.log + contains: ["job finished in"] + - path: output/umitools/versions.yml + md5sum: 397e6972343f9d7b8eae387fc18c12c7 + +- name: umitools extract test_umitools_extract_paired_end + command: nextflow run tests/modules/umitools/extract -entry test_umitools_extract_paired_end -c tests/config/nextflow.config + tags: + - umitools/extract + - umitools + files: + - path: output/umitools/test.umi_extract.log + contains: ["job finished in"] + - path: output/umitools/test.umi_extract_1.fastq.gz + should_exist: true + - path: output/umitools/test.umi_extract_2.fastq.gz + should_exist: true + - path: output/umitools/versions.yml + md5sum: 0aec6f919d62b7b79f6d0c5d79411464 diff --git a/tests/modules/untar/main.nf b/tests/modules/untar/main.nf index 056e3ea7..9d6d4c6c 100644 --- a/tests/modules/untar/main.nf +++ b/tests/modules/untar/main.nf @@ -5,7 +5,10 @@ nextflow.enable.dsl = 2 include { UNTAR } from '../../../modules/untar/main.nf' workflow test_untar { - input = file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) + input = [ + [], + file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) + ] UNTAR ( input ) } diff --git a/tests/modules/unzip/main.nf b/tests/modules/unzip/main.nf index 520fe31e..6f7cc030 100644 --- a/tests/modules/unzip/main.nf +++ b/tests/modules/unzip/main.nf @@ -6,7 +6,10 @@ include { UNZIP } from '../../../modules/unzip/main.nf' workflow test_unzip { - archive = file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) + archive = [ + [], + file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) + ] UNZIP ( archive ) } diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf new file mode 100644 index 00000000..e29490f3 --- /dev/null +++ b/tests/modules/vardictjava/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' + +workflow test_vardictjava { + + bam_input_ch = Channel.value([ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ]) + + reference = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + VARDICTJAVA ( bam_input_ch, reference ) +} diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/vardictjava/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml new file mode 100644 index 00000000..8cb29c4e --- /dev/null +++ b/tests/modules/vardictjava/test.yml @@ -0,0 +1,9 @@ +- name: vardictjava test_vardictjava + command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config + tags: + - vardictjava + files: + - path: output/vardictjava/test.vcf.gz + md5sum: 3f1f227afc532bddeb58f16fd3013fc8 + - path: output/vardictjava/versions.yml + md5sum: 9b62c431a4f2680412b61c7071bdb1cd diff --git a/tests/modules/vcfanno/main.nf b/tests/modules/vcfanno/main.nf index c46afa8f..c879ebbd 100644 --- a/tests/modules/vcfanno/main.nf +++ b/tests/modules/vcfanno/main.nf @@ -2,18 +2,40 @@ nextflow.enable.dsl = 2 +include { UNTAR } from '../../../modules/untar/main.nf' include { VCFANNO } from '../../../modules/vcfanno/main.nf' workflow test_vcfanno { - - input = [ - [ id:'test', single_end:false ], // meta map + + input = [ + [ id:'test_compressed', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) ] - toml = file("https://raw.githubusercontent.com/nf-core/test-datasets/8fbd9f99a2feb3f9e39cd3bcdc4a9176a5835673/data/delete_me/vcfanno.toml", - checkIfExists: true) + input_2 = [ [ id:'test_compressed', single_end:false ], // meta map + [] ] - VCFANNO ( input, toml ) + toml = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) + resource_dir = [[], file(params.test_data['homo_sapiens']['genome']['vcfanno_tar_gz'], checkIfExists: true) ] + + UNTAR ( resource_dir ) + VCFANNO ( input, input_2, toml, UNTAR.out.untar.map{ it[1] } ) +} + +workflow test_vcfanno_uncompressed { + + input = [ [ id:'test_uncompressed', single_end:false ], // meta map + [] ,[] ] + + input_2 = [ + [ id:'test_uncompressed', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + ] + + toml = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) + resource_dir = [[], file(params.test_data['homo_sapiens']['genome']['vcfanno_tar_gz'], checkIfExists: true) ] + + UNTAR ( resource_dir ) + VCFANNO ( input, input_2, toml, UNTAR.out.untar.map{ it[1] } ) } diff --git a/tests/modules/vcfanno/nextflow.config b/tests/modules/vcfanno/nextflow.config index 50f50a7a..ac724a73 100644 --- a/tests/modules/vcfanno/nextflow.config +++ b/tests/modules/vcfanno/nextflow.config @@ -1,5 +1,5 @@ process { - + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } \ No newline at end of file diff --git a/tests/modules/vcfanno/test.yml b/tests/modules/vcfanno/test.yml index 0b5394d2..eae5d3b0 100644 --- a/tests/modules/vcfanno/test.yml +++ b/tests/modules/vcfanno/test.yml @@ -3,7 +3,21 @@ tags: - vcfanno files: - - path: output/vcfanno/test_annotated.vcf - md5sum: 34259cf6b0a4698a2917ad3554b50c0f + - path: output/untar/versions.yml + md5sum: 6de038155bccbe4d264d09529bf9f4d8 + - path: output/vcfanno/test_compressed_annotated.vcf + md5sum: 90ceb2fd2e06e781846d69c3981db665 - path: output/vcfanno/versions.yml md5sum: 62d13540503b22f04a2280c91942cb03 + +- name: vcfanno test_vcfanno_uncompressed + command: nextflow run tests/modules/vcfanno -entry test_vcfanno_uncompressed -c tests/config/nextflow.config + tags: + - vcfanno + files: + - path: output/untar/versions.yml + md5sum: a0de70274caac0cca31b077a1e7172d9 + - path: output/vcfanno/test_uncompressed_annotated.vcf + md5sum: 90ceb2fd2e06e781846d69c3981db665 + - path: output/vcfanno/versions.yml + md5sum: 300218dad68c3ffcc4783daa4f7c5a43 diff --git a/tests/modules/yara/mapper/test.yml b/tests/modules/yara/mapper/test.yml index 186f70b4..3bfddc5b 100644 --- a/tests/modules/yara/mapper/test.yml +++ b/tests/modules/yara/mapper/test.yml @@ -5,6 +5,7 @@ - yara files: - path: output/yara/test.mapped.bam + - path: output/yara/test.mapped.bam.bai - path: output/yara/yara/yara.txt.size md5sum: 063987b3c3f747be7d2b8043c9d91000 - path: output/yara/yara/yara.lf.drs @@ -39,7 +40,9 @@ - yara files: - path: output/yara/test_2.mapped.bam + - path: output/yara/test_2.mapped.bam.bai - path: output/yara/test_1.mapped.bam + - path: output/yara/test_1.mapped.bam.bai - path: output/yara/yara/yara.txt.size md5sum: 063987b3c3f747be7d2b8043c9d91000 - path: output/yara/yara/yara.lf.drs diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf similarity index 69% rename from tests/subworkflows/nf-core/annotation_ensemblvep/main.nf rename to tests/subworkflows/nf-core/annotation/ensemblvep/main.nf index 0f00c62e..2c599671 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main' +include { ANNOTATION_ENSEMBLVEP } from '../../../../../subworkflows/nf-core/annotation/ensemblvep/main' workflow annotation_ensemblvep { input = [ @@ -10,5 +10,5 @@ workflow annotation_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config rename to tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config index 4e8d2990..806adb58 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_VEP.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/test.yml b/tests/subworkflows/nf-core/annotation/ensemblvep/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_ensemblvep/test.yml rename to tests/subworkflows/nf-core/annotation/ensemblvep/test.yml diff --git a/tests/subworkflows/nf-core/annotation_snpeff/main.nf b/tests/subworkflows/nf-core/annotation/snpeff/main.nf similarity index 74% rename from tests/subworkflows/nf-core/annotation_snpeff/main.nf rename to tests/subworkflows/nf-core/annotation/snpeff/main.nf index c80197ee..bb56b46b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/main.nf +++ b/tests/subworkflows/nf-core/annotation/snpeff/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main' +include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation/snpeff/main' workflow annotation_snpeff { input = [ diff --git a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_snpeff/nextflow.config rename to tests/subworkflows/nf-core/annotation/snpeff/nextflow.config index be76cb4a..31fd635b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_snpEff.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_snpeff/test.yml b/tests/subworkflows/nf-core/annotation/snpeff/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_snpeff/test.yml rename to tests/subworkflows/nf-core/annotation/snpeff/test.yml diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..a3e2ed62 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/main' addParams([:]) + +workflow test_bam_qc_picard_wgs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + BAM_QC_PICARD ( input, fasta, fasta_fai, [], [] ) +} + +workflow test_bam_qc_picard_targetted { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + + BAM_QC_PICARD ( input, fasta, fasta_fai, bait, target ) +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml new file mode 100644 index 00000000..7b0a6c2b --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -0,0 +1,33 @@ +- name: bam qc picard wgs + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_wgs -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collectwgsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectWgsMetrics.coverage_metrics + +- name: bam qc picard targetted + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_targetted -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collecthsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectHsMetrics.coverage_metrics diff --git a/tests/subworkflows/nf-core/gatk_create_som_pon/test.yml b/tests/subworkflows/nf-core/gatk_create_som_pon/test.yml index 63cf64f8..2ce7c595 100644 --- a/tests/subworkflows/nf-core/gatk_create_som_pon/test.yml +++ b/tests/subworkflows/nf-core/gatk_create_som_pon/test.yml @@ -8,7 +8,7 @@ # - gatk4/genomicsdbimport # - gatk4/createsomaticpanelofnormals files: - # gatk4 mutect2 + # gatk4 mutect2 - path: output/gatk4/test1.vcf.gz - path: output/gatk4/test1.vcf.gz.stats md5sum: 4f77301a125913170b8e9e7828b4ca3f diff --git a/tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/test.yml b/tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/test.yml index 4b335065..759f4ed3 100644 --- a/tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/test.yml +++ b/tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/test.yml @@ -10,7 +10,7 @@ # - gatk4/calculatecontamination # - gatk4/filtermutectcalls files: - # gatk4 mutect2 + # gatk4 mutect2 - path: ./output/mutect2/test.vcf.gz - path: ./output/mutect2/test.vcf.gz.stats md5sum: 6ecb874e6a95aa48233587b876c2a7a9 diff --git a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml b/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml index 9d2d5c10..5248f2ea 100644 --- a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml +++ b/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml @@ -9,7 +9,7 @@ # - gatk4/calculatecontamination # - gatk4/filtermutectcalls files: - # gatk4 mutect2 + # gatk4 mutect2 - path: ./output/mutect2/test.vcf.gz - path: ./output/mutect2/test.vcf.gz.stats md5sum: 106c5828b02b906c97922618b6072169 diff --git a/tests/subworkflows/nf-core/homer/groseq/main.nf b/tests/subworkflows/nf-core/homer/groseq/main.nf new file mode 100644 index 00000000..72b95e87 --- /dev/null +++ b/tests/subworkflows/nf-core/homer/groseq/main.nf @@ -0,0 +1,24 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HOMER_GROSEQ as HOMER_GROSEQ_BAM + HOMER_GROSEQ as HOMER_GROSEQ_BED } from '../../../../../subworkflows/nf-core/homer/groseq/main' + +workflow test_homer_groseq_bam { + def input = [] + input = [[ id: 'test' ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)]] + def fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + HOMER_GROSEQ_BAM ( input, fasta ) +} + +workflow test_homer_groseq_bed { + def input = [] + input = [[ id: 'test' ], + [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]] + def fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + HOMER_GROSEQ_BED ( input, fasta ) +} diff --git a/tests/subworkflows/nf-core/homer/groseq/nextflow.config b/tests/subworkflows/nf-core/homer/groseq/nextflow.config new file mode 100644 index 00000000..09a44497 --- /dev/null +++ b/tests/subworkflows/nf-core/homer/groseq/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: '.*:HOMER_GROSEQ_BED:HOMER_MAKETAGDIRECTORY' { + ext.args = "-checkGC -format bed" + } + +} diff --git a/tests/subworkflows/nf-core/homer/groseq/test.yml b/tests/subworkflows/nf-core/homer/groseq/test.yml new file mode 100644 index 00000000..1eaeb3f5 --- /dev/null +++ b/tests/subworkflows/nf-core/homer/groseq/test.yml @@ -0,0 +1,27 @@ +- name: subworkflow homer_groseq bam + command: nextflow run ./tests/subworkflows/nf-core/homer/groseq/ -entry test_homer_groseq_bam -c tests/config/nextflow.config -c tests/subworkflows/nf-core/homer/groseq/nextflow.config + tags: + - homer + files: + - path: output/homer/test.bed + md5sum: 8d40034dfe22c5cf973071aa1e8d3617 + - path: output/homer/test.bedGraph.gz + md5sum: de2b2f8ab90a909b8bfbe755bdaba407 + - path: output/homer/test.peaks.txt + md5sum: 8d40034dfe22c5cf973071aa1e8d3617 + - path: output/homer/versions.yml + md5sum: c85dee03f1afabe406a87743a4c5506d + +- name: subworkflow homer_groseq bed + command: nextflow run ./tests/subworkflows/nf-core/homer/groseq/ -entry test_homer_groseq_bed -c tests/config/nextflow.config -c tests/subworkflows/nf-core/homer/groseq/nextflow.config + tags: + - homer + files: + - path: output/homer/test.bed + md5sum: 25e8b64946012d1c4567a04062e90fae + - path: output/homer/test.bedGraph.gz + md5sum: 2d2d1c2d3242ff74c7a922695accb9d2 + - path: output/homer/test.peaks.txt + md5sum: 25e8b64946012d1c4567a04062e90fae + - path: output/homer/versions.yml + md5sum: c9b5f1248d28c216b000cba8da738455 diff --git a/tests/subworkflows/nf-core/sra_fastq/main.nf b/tests/subworkflows/nf-core/sra_fastq/main.nf deleted file mode 100644 index 988758f3..00000000 --- a/tests/subworkflows/nf-core/sra_fastq/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SRA_FASTQ } from '../../../../subworkflows/nf-core/sra_fastq/main.nf' addParams( [:] ) - -workflow test_sra_fastq_single_end { - input = [ - [ id:'test_single_end', single_end:true ], // meta map - 'SRR13255544' - ] - - SRA_FASTQ ( input ) -} - -workflow test_sra_fastq_paired_end { - input = [ - [ id:'test_paired_end', single_end:false ], // meta map - 'SRR11140744' - ] - - SRA_FASTQ ( input ) -} diff --git a/tests/subworkflows/nf-core/sra_fastq/test.yml b/tests/subworkflows/nf-core/sra_fastq/test.yml deleted file mode 100644 index 4b75431f..00000000 --- a/tests/subworkflows/nf-core/sra_fastq/test.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: sra fastq single-end - command: nextflow run ./tests/subworkflows/nf-core/sra_fastq -entry test_sra_fastq_single_end -c tests/config/nextflow.config - tags: - - subworkflows - # - subworkflows/sra_fastq - # Modules - # - sratools - # - sratools/prefetch - # - sratools/fasterqdump - files: - - path: output/sratools/SRR13255544.fastq.gz - md5sum: 1054c7b71884acdb5eed8a378f18be82 - -- name: sra fastq paired-end - command: nextflow run ./tests/subworkflows/nf-core/sra_fastq -entry test_sra_fastq_paired_end -c tests/config/nextflow.config - tags: - - subworkflows - # - subworkflows/sra_fastq - # Modules - # - sratools - # - sratools/prefetch - # - sratools/fasterqdump - files: - - path: output/sratools/SRR11140744_1.fastq.gz - md5sum: 193809c784a4ea132ab2a253fa4f55b6 - - path: output/sratools/SRR11140744_2.fastq.gz - md5sum: 3e3b3af3413f50a1685fd7b3f1456d4e diff --git a/tests/subworkflows/nf-core/srafastq/main.nf b/tests/subworkflows/nf-core/srafastq/main.nf new file mode 100644 index 00000000..82c8f29d --- /dev/null +++ b/tests/subworkflows/nf-core/srafastq/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SRAFASTQ } from '../../../../subworkflows/nf-core/srafastq/main.nf' + +workflow test_srafastq_single_end { + input = Channel.of( + [ + [ id:'test_single_end1', single_end:true ], // meta map + 'DRR000774' + ], + [ + [ id:'test_single_end2', single_end:true ], // meta map + 'DRR000775' + ] + ) + + SRAFASTQ ( input ) +} + +workflow test_srafastq_paired_end { + input = [ + [ id:'test_paired_end', single_end:false ], // meta map + 'SRR11140744' + ] + + SRAFASTQ ( input ) +} diff --git a/tests/subworkflows/nf-core/srafastq/nextflow.config b/tests/subworkflows/nf-core/srafastq/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/subworkflows/nf-core/srafastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/subworkflows/nf-core/srafastq/test.yml b/tests/subworkflows/nf-core/srafastq/test.yml new file mode 100644 index 00000000..73424171 --- /dev/null +++ b/tests/subworkflows/nf-core/srafastq/test.yml @@ -0,0 +1,29 @@ +- name: srafastq single-end + command: nextflow run ./tests/subworkflows/nf-core/srafastq -entry test_srafastq_single_end -c tests/config/nextflow.config -c tests/subworkflows/nf-core/srafastq/nextflow.config + tags: + - subworkflows + # - subworkflows/srafastq + # Modules + # - sratools + # - sratools/prefetch + # - sratools/fasterqdump + files: + - path: output/sratools/DRR000774.fastq.gz + md5sum: 19029a1132115b55277a0d79ee089b49 + - path: output/sratools/DRR000775.fastq.gz + md5sum: 59ff24c86ecb260752668c059c2a1eaf + +- name: srafastq paired-end + command: nextflow run ./tests/subworkflows/nf-core/srafastq -entry test_srafastq_paired_end -c tests/config/nextflow.config -c tests/subworkflows/nf-core/srafastq/nextflow.config + tags: + - subworkflows + # - subworkflows/srafastq + # Modules + # - sratools + # - sratools/prefetch + # - sratools/fasterqdump + files: + - path: output/sratools/SRR11140744_1.fastq.gz + md5sum: 193809c784a4ea132ab2a253fa4f55b6 + - path: output/sratools/SRR11140744_2.fastq.gz + md5sum: 3e3b3af3413f50a1685fd7b3f1456d4e