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 6fe79af6..d24968be 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,10 +1,14 @@ -# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ -tasks: - - name: Install Nextflow - init: | - curl -s https://get.nextflow.io | bash - sudo mv nextflow /usr/local/bin +image: nfcore/gitpod:latest - - name: Install pytest-workflow - init: | - pip install pytest-workflow +vscode: + extensions: # based on nf-core.nf-core-extensionpack + - 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/.nf-core.yml b/.nf-core.yml index 72971af8..723a978c 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,3 +1,4 @@ +repository_type: modules bump-versions: rseqc/junctionannotation: False rseqc/bamstat: False 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/main.nf b/modules/abacas/main.nf index 49040214..00c9169f 100644 --- a/modules/abacas/main.nf +++ b/modules/abacas/main.nf @@ -15,6 +15,9 @@ process ABACAS { tuple val(meta), path('*.abacas*'), 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}" 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 0cf257ff..0e17c055 100644 --- a/modules/adapterremoval/main.nf +++ b/modules/adapterremoval/main.nf @@ -9,46 +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}": @@ -60,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/main.nf b/modules/agrvate/main.nf index aff72abc..8503505d 100644 --- a/modules/agrvate/main.nf +++ b/modules/agrvate/main.nf @@ -15,6 +15,9 @@ process AGRVATE { path "${fasta.baseName}-results" , emit: results_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}" 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/main.nf b/modules/allelecounter/main.nf index 850a018f..b2cb1b0c 100644 --- a/modules/allelecounter/main.nf +++ b/modules/allelecounter/main.nf @@ -16,6 +16,9 @@ process ALLELECOUNTER { tuple val(meta), path("*.alleleCount"), emit: allelecount 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}" 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/main.nf b/modules/amps/main.nf index 871b57c6..57cdcff8 100644 --- a/modules/amps/main.nf +++ b/modules/amps/main.nf @@ -18,6 +18,9 @@ process AMPS { path "results/pdf_candidate_profiles/" , emit: candidate_pdfs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/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 0fcb6ba7..e0d30b45 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -17,6 +17,9 @@ process ARRIBA { tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail 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}" diff --git a/modules/arriba/meta.yml b/modules/arriba/meta.yml index 6ca16dab..4bde2f08 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: diff --git a/modules/artic/guppyplex/main.nf b/modules/artic/guppyplex/main.nf index 780f5111..8e6b2879 100644 --- a/modules/artic/guppyplex/main.nf +++ b/modules/artic/guppyplex/main.nf @@ -14,6 +14,9 @@ process ARTIC_GUPPYPLEX { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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 c25ec0db..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 @@ -31,6 +32,9 @@ process ARTIC_MINION { tuple val(meta), path("*.json"), optional:true , emit: json 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}" @@ -41,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/main.nf b/modules/assemblyscan/main.nf index 56541222..889f92a9 100644 --- a/modules/assemblyscan/main.nf +++ b/modules/assemblyscan/main.nf @@ -14,6 +14,9 @@ process ASSEMBLYSCAN { tuple val(meta), path("*.json"), emit: json 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}" 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/main.nf b/modules/ataqv/ataqv/main.nf index fbd623f4..952aaed4 100644 --- a/modules/ataqv/ataqv/main.nf +++ b/modules/ataqv/ataqv/main.nf @@ -19,6 +19,9 @@ process ATAQV_ATAQV { tuple val(meta), path("*.problems") , emit: problems, 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}" 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 2582dac2..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,8 +23,12 @@ 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: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" @@ -58,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/main.nf b/modules/bamaligncleaner/main.nf index 88fe21aa..922b72e6 100644 --- a/modules/bamaligncleaner/main.nf +++ b/modules/bamaligncleaner/main.nf @@ -14,6 +14,9 @@ process BAMALIGNCLEANER { 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}" 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/main.nf b/modules/bamcmp/main.nf new file mode 100644 index 00000000..f45b73d8 --- /dev/null +++ b/modules/bamcmp/main.nf @@ -0,0 +1,38 @@ +def VERSION = '2.2' +process BAMCMP { + label 'process_low' + + conda (params.enable_conda ? "bioconda::bamcmp=2.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bamcmp:2.2--h05f6578_0' : + 'quay.io/biocontainers/bamcmp:2.2--h05f6578_0' }" + + input: + tuple val(meta), path(sample), path(contaminant) + + output: + tuple val(meta), path("*primary.bam") , emit: bam + tuple val(meta), path("*contamination.bam"), emit: contamination_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}" + """ + bamcmp \\ + -1 $sample \\ + -2 $contaminant \\ + -A ${prefix}_primary.bam \\ + -B ${prefix}_contamination.bam \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamcmp: $VERSION + END_VERSIONS + """ + +} diff --git a/modules/bamcmp/meta.yml b/modules/bamcmp/meta.yml new file mode 100644 index 00000000..36a5ff1b --- /dev/null +++ b/modules/bamcmp/meta.yml @@ -0,0 +1,58 @@ +name: bamcmp +description: Bamcmp (Bam Compare) is a tool for assigning reads between a primary genome and a contamination genome. For instance, filtering out mouse reads from patient derived xenograft mouse models (PDX). +keywords: + - filter + - xenograft + - host + - graft + - contamination + - mouse + +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. + 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"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + + - sample: + type: file + description: BAM/CRAM/SAM file with the reads aligned to the primary genome (the one you want to keep) + pattern: "*.{bam,cram,sam}" + + - contaminant: + type: file + description: BAM/CRAM/SAM file with the reads aligned to the contaminant genome (the one you want to filter out) + pattern: "*.{bam,cram,sam}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - bam: + type: file + description: Bam file containing the reads which align better to the primary genome. + pattern: "*.{bam,cram,sam}" + + - bam: + type: file + description: Bam file containing the reads which align better to the contaminant genome. + pattern: "*.{bam,cram,sam}" + +authors: + - "@kmurat1" + - "@sppearce" diff --git a/modules/bamtools/convert/main.nf b/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..b993aad1 --- /dev/null +++ b/modules/bamtools/convert/main.nf @@ -0,0 +1,41 @@ +process BAMTOOLS_CONVERT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : 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' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.{bed,fasta,fastq,json,pileup,sam,yaml}"), emit: data + 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 test = args ==~ /-format (bed|fasta|fastq|json|pileup|sam|yaml)/ + if ( test == false ) error "-format option must be provided in args. Possible values: bed fasta fastq json pileup sam yaml" + m = args =~ /-format ([a-z]+)/ + ext = m[0][1] + + + """ + bamtools \\ + convert \\ + $args \\ + -in $bam \\ + -out ${prefix}.${ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamtools: \$( bamtools --version | grep -e 'bamtools' | sed 's/^.*bamtools //' ) + END_VERSIONS + """ +} diff --git a/modules/bamtools/convert/meta.yml b/modules/bamtools/convert/meta.yml new file mode 100644 index 00000000..5796a4ab --- /dev/null +++ b/modules/bamtools/convert/meta.yml @@ -0,0 +1,52 @@ +name: bamtools_convert +description: BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files. +keywords: + - bamtools + - bamtools/convert + - bam + - convert + - bed + - fasta + - fastq + - json + - pileup + - sam + - yaml +tools: + - bamtools: + description: C++ API & command-line toolkit for working with BAM data + homepage: http://github.com/pezmaster31/bamtools + documentation: https://github.com/pezmaster31/bamtools/wiki + tool_dev_url: http://github.com/pezmaster31/bamtools + 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 + 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" + ## TODO nf-core: Delete / customise this example output + - out: + type: file + description: The data in the asked format (bed, fasta, fastq, json, pileup, sam, yaml) + pattern: "*.{bed,fasta,fastq,json,pileup,sam,yaml}" + +authors: + - "@sguizard" diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 8d5e5690..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) @@ -14,14 +14,21 @@ process BAMTOOLS_SPLIT { 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 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/main.nf b/modules/bamutil/trimbam/main.nf index 9ceb2b65..514ea4c0 100644 --- a/modules/bamutil/trimbam/main.nf +++ b/modules/bamutil/trimbam/main.nf @@ -14,6 +14,9 @@ process BAMUTIL_TRIMBAM { 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}" 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/main.nf b/modules/bandage/image/main.nf index bc2a9495..ee504a12 100644 --- a/modules/bandage/image/main.nf +++ b/modules/bandage/image/main.nf @@ -15,6 +15,9 @@ process BANDAGE_IMAGE { tuple val(meta), path('*.svg'), emit: svg 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}" 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 ac839497..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) @@ -16,6 +16,9 @@ process BBMAP_ALIGN { 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}" 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/main.nf b/modules/bbmap/bbduk/main.nf index 79c3c306..0ae005e4 100644 --- a/modules/bbmap/bbduk/main.nf +++ b/modules/bbmap/bbduk/main.nf @@ -16,6 +16,9 @@ process BBMAP_BBDUK { 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}" 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/main.nf b/modules/bbmap/bbsplit/main.nf index 0c916dfe..b55929ce 100644 --- a/modules/bbmap/bbsplit/main.nf +++ b/modules/bbmap/bbsplit/main.nf @@ -20,6 +20,9 @@ process BBMAP_BBSPLIT { tuple val(meta), path('*txt') , optional:true, emit: stats 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}" 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/main.nf b/modules/bbmap/index/main.nf index 4c02f84e..fdd6d102 100644 --- a/modules/bbmap/index/main.nf +++ b/modules/bbmap/index/main.nf @@ -14,6 +14,9 @@ process BBMAP_INDEX { path 'ref' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/bcftools/concat/main.nf index d02e7605..c0633ef7 100644 --- a/modules/bcftools/concat/main.nf +++ b/modules/bcftools/concat/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_CONCAT { 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 ?: '' prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/bcftools/consensus/main.nf index 040e6534..a0c436e2 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_CONSENSUS { tuple val(meta), path('*.fa'), 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}" 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/main.nf b/modules/bcftools/filter/main.nf index 98b422b1..82961e32 100644 --- a/modules/bcftools/filter/main.nf +++ b/modules/bcftools/filter/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_FILTER { 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}" 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/main.nf b/modules/bcftools/index/main.nf index e5275003..548a9277 100644 --- a/modules/bcftools/index/main.nf +++ b/modules/bcftools/index/main.nf @@ -15,6 +15,9 @@ process BCFTOOLS_INDEX { tuple val(meta), path("*.tbi"), optional:true, 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}" 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/main.nf b/modules/bcftools/isec/main.nf index fdde3022..c8f89753 100644 --- a/modules/bcftools/isec/main.nf +++ b/modules/bcftools/isec/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_ISEC { 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}" 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/main.nf b/modules/bcftools/merge/main.nf index f1c02e8d..7bee5a9b 100644 --- a/modules/bcftools/merge/main.nf +++ b/modules/bcftools/merge/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_MERGE { 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 ?: '' prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/bcftools/mpileup/main.nf index cdd38eec..676eae7a 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -19,6 +19,9 @@ process BCFTOOLS_MPILEUP { tuple val(meta), path("*.mpileup") , emit: mpileup, 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 ?: '' 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 e8bf6324..b81a4310 100644 --- a/modules/bcftools/norm/main.nf +++ b/modules/bcftools/norm/main.nf @@ -15,6 +15,9 @@ process BCFTOOLS_NORM { 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}" @@ -31,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/main.nf b/modules/bcftools/query/main.nf index 5f4135f4..8921abdd 100644 --- a/modules/bcftools/query/main.nf +++ b/modules/bcftools/query/main.nf @@ -8,30 +8,32 @@ process BCFTOOLS_QUERY { 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: - tuple val(meta), path(vcf), path(index) - path(regions) - path(targets) - path(samples) + tuple val(meta), path(vcf), path(tbi) + path regions + path targets + path samples output: - tuple val(meta), path("*.gz") , emit: vcf + tuple val(meta), path("*.txt"), emit: 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}" - def regions_file = regions ? "--regions-file ${regions}" : "" + def regions_file = regions ? "--regions-file ${regions}" : "" def targets_file = targets ? "--targets-file ${targets}" : "" def samples_file = samples ? "--samples-file ${samples}" : "" - """ bcftools query \\ - --output ${prefix}.vcf.gz \\ - ${regions_file} \\ - ${targets_file} \\ - ${samples_file} \\ + --output ${prefix}.txt \\ + $regions_file \\ + $targets_file \\ + $samples_file \\ $args \\ - ${vcf} + $vcf cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bcftools/query/meta.yml b/modules/bcftools/query/meta.yml index e450f73e..fd4fd473 100644 --- a/modules/bcftools/query/meta.yml +++ b/modules/bcftools/query/meta.yml @@ -6,57 +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. - 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 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 ] - - vcf: - type: file - description: VCF query 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 ] + - 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/main.nf b/modules/bcftools/reheader/main.nf index e6d9025d..7d2abecf 100644 --- a/modules/bcftools/reheader/main.nf +++ b/modules/bcftools/reheader/main.nf @@ -16,6 +16,9 @@ process BCFTOOLS_REHEADER { 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 prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/bcftools/sort/main.nf index 2fcadc98..8478fe25 100644 --- a/modules/bcftools/sort/main.nf +++ b/modules/bcftools/sort/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_SORT { 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}" 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/main.nf b/modules/bcftools/stats/main.nf index 54a28bce..7e150d1f 100644 --- a/modules/bcftools/stats/main.nf +++ b/modules/bcftools/stats/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_STATS { tuple val(meta), path("*stats.txt"), emit: stats 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}" 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 7056ecdb..ca1121a5 100644 --- a/modules/bcftools/view/main.nf +++ b/modules/bcftools/view/main.nf @@ -17,6 +17,9 @@ process BCFTOOLS_VIEW { 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}" @@ -38,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/main.nf b/modules/bedtools/bamtobed/main.nf index 98d9ea2f..fd782dec 100644 --- a/modules/bedtools/bamtobed/main.nf +++ b/modules/bedtools/bamtobed/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_BAMTOBED { 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}" 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/main.nf b/modules/bedtools/complement/main.nf index 3146827c..8c8e7efa 100644 --- a/modules/bedtools/complement/main.nf +++ b/modules/bedtools/complement/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_COMPLEMENT { 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}" 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/main.nf b/modules/bedtools/genomecov/main.nf index ca491e75..4804d40a 100644 --- a/modules/bedtools/genomecov/main.nf +++ b/modules/bedtools/genomecov/main.nf @@ -16,6 +16,9 @@ process BEDTOOLS_GENOMECOV { tuple val(meta), path("*.${extension}"), emit: genomecov path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args_list = args.tokenize() 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/main.nf b/modules/bedtools/getfasta/main.nf index 5a283e94..4ce8c01e 100644 --- a/modules/bedtools/getfasta/main.nf +++ b/modules/bedtools/getfasta/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_GETFASTA { path "*.fa" , 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 ?: "${bed.baseName}" 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/main.nf b/modules/bedtools/intersect/main.nf index afb0d056..29f16adb 100644 --- a/modules/bedtools/intersect/main.nf +++ b/modules/bedtools/intersect/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_INTERSECT { tuple val(meta), path("*.${extension}"), emit: intersect 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}" 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/main.nf b/modules/bedtools/makewindows/main.nf index 2414393c..2a19226c 100644 --- a/modules/bedtools/makewindows/main.nf +++ b/modules/bedtools/makewindows/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_MAKEWINDOWS { tuple val(meta), path("*.tab"), emit: tab 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}" 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/main.nf b/modules/bedtools/maskfasta/main.nf index 7eeb4c7d..04ba116b 100644 --- a/modules/bedtools/maskfasta/main.nf +++ b/modules/bedtools/maskfasta/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_MASKFASTA { tuple val(meta), path("*.fa"), 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}" 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/main.nf b/modules/bedtools/merge/main.nf index 5f1da95b..6d1daa03 100644 --- a/modules/bedtools/merge/main.nf +++ b/modules/bedtools/merge/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_MERGE { 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}" 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/main.nf b/modules/bedtools/slop/main.nf index 9d8633ec..ae4f81cc 100644 --- a/modules/bedtools/slop/main.nf +++ b/modules/bedtools/slop/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_SLOP { 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}" 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/main.nf b/modules/bedtools/sort/main.nf index 1ed95a57..43dc9bda 100644 --- a/modules/bedtools/sort/main.nf +++ b/modules/bedtools/sort/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_SORT { tuple val(meta), path("*.${extension}"), emit: sorted 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}" 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/main.nf b/modules/bedtools/subtract/main.nf index b2efefe5..8e2b42c5 100644 --- a/modules/bedtools/subtract/main.nf +++ b/modules/bedtools/subtract/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_SUBTRACT { 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}" 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/main.nf b/modules/bismark/align/main.nf index e490b48c..eeddcabb 100644 --- a/modules/bismark/align/main.nf +++ b/modules/bismark/align/main.nf @@ -17,6 +17,9 @@ process BISMARK_ALIGN { tuple val(meta), path("*fq.gz") , optional:true, emit: 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}" 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/main.nf b/modules/bismark/deduplicate/main.nf index 16c624f1..ea763774 100644 --- a/modules/bismark/deduplicate/main.nf +++ b/modules/bismark/deduplicate/main.nf @@ -15,6 +15,9 @@ process BISMARK_DEDUPLICATE { tuple val(meta), path("*.deduplication_report.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}" 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/main.nf b/modules/bismark/genomepreparation/main.nf index e096b2b8..59c495c5 100644 --- a/modules/bismark/genomepreparation/main.nf +++ b/modules/bismark/genomepreparation/main.nf @@ -14,6 +14,9 @@ process BISMARK_GENOMEPREPARATION { path "BismarkIndex" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/bismark/methylationextractor/main.nf index d99c2b5e..5543ab7e 100644 --- a/modules/bismark/methylationextractor/main.nf +++ b/modules/bismark/methylationextractor/main.nf @@ -19,6 +19,9 @@ process BISMARK_METHYLATIONEXTRACTOR { tuple val(meta), path("*.M-bias.txt") , emit: mbias path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def seqtype = meta.single_end ? '-s' : '-p' 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/main.nf b/modules/bismark/report/main.nf index f828ecd8..bec3de99 100644 --- a/modules/bismark/report/main.nf +++ b/modules/bismark/report/main.nf @@ -14,6 +14,9 @@ process BISMARK_REPORT { tuple val(meta), path("*report.{html,txt}"), emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/bismark/summary/main.nf index 72dba72e..49fec53e 100644 --- a/modules/bismark/summary/main.nf +++ b/modules/bismark/summary/main.nf @@ -17,6 +17,9 @@ process BISMARK_SUMMARY { path "*report.{html,txt}", emit: summary path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/blast/blastn/main.nf index 3a0bafe0..b85f6c8e 100644 --- a/modules/blast/blastn/main.nf +++ b/modules/blast/blastn/main.nf @@ -15,6 +15,9 @@ process BLAST_BLASTN { tuple val(meta), path('*.blastn.txt'), emit: 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}" 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/main.nf b/modules/blast/makeblastdb/main.nf index b4c426a4..12208ea8 100644 --- a/modules/blast/makeblastdb/main.nf +++ b/modules/blast/makeblastdb/main.nf @@ -14,6 +14,9 @@ process BLAST_MAKEBLASTDB { path 'blast_db' , emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 b25b5e21..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) @@ -17,6 +17,9 @@ process BOWTIE_ALIGN { path "versions.yml" , emit: versions tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/main.nf b/modules/bowtie/build/main.nf index dbbc8efa..e01d9855 100644 --- a/modules/bowtie/build/main.nf +++ b/modules/bowtie/build/main.nf @@ -14,6 +14,9 @@ process BOWTIE_BUILD { path 'bowtie' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 e68dbf24..c233f955 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -2,10 +2,10 @@ process BOWTIE2_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.14 conda-forge::pigz=2.6' : null) + 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:4d235f41348a00533f18e47c9669f1ecb327f629-0' : - 'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0' : + 'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0' }" input: tuple val(meta), path(reads) @@ -18,6 +18,9 @@ process BOWTIE2_ALIGN { 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 ?: '' diff --git a/modules/bowtie2/align/meta.yml b/modules/bowtie2/align/meta.yml index 77c9e397..f80421ec 100644 --- a/modules/bowtie2/align/meta.yml +++ b/modules/bowtie2/align/meta.yml @@ -1,51 +1,51 @@ 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" 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/main.nf b/modules/bowtie2/build/main.nf index da2e9ed5..a4da62d0 100644 --- a/modules/bowtie2/build/main.nf +++ b/modules/bowtie2/build/main.nf @@ -14,6 +14,9 @@ process BOWTIE2_BUILD { path 'bowtie2' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/bwa/aln/main.nf b/modules/bwa/aln/main.nf index 992e25de..741c0159 100644 --- a/modules/bwa/aln/main.nf +++ b/modules/bwa/aln/main.nf @@ -15,6 +15,9 @@ process BWA_ALN { tuple val(meta), path("*.sai"), emit: sai 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}" 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/main.nf b/modules/bwa/index/main.nf index 89102737..3affbf16 100644 --- a/modules/bwa/index/main.nf +++ b/modules/bwa/index/main.nf @@ -14,6 +14,9 @@ process BWA_INDEX { path "bwa" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 9695bd2d..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) @@ -16,18 +16,19 @@ process BWA_MEM { 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 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 0b5ec255..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) @@ -15,6 +15,9 @@ process BWA_SAMPE { 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}" 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 bee06bc8..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) @@ -15,6 +15,9 @@ process BWA_SAMSE { 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}" 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 e00538c9..900f27d4 100644 --- a/modules/bwamem2/index/main.nf +++ b/modules/bwamem2/index/main.nf @@ -14,6 +14,9 @@ process BWAMEM2_INDEX { path "bwamem2" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ @@ -28,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 6d4d8028..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) @@ -16,11 +16,13 @@ process BWAMEM2_MEM { 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 read_group = meta.read_group ? "-R ${meta.read_group}" : "" def samtools_command = sort_bam ? 'sort' : 'view' """ INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` @@ -28,7 +30,6 @@ process BWAMEM2_MEM { bwa-mem2 \\ mem \\ $args \\ - $read_group \\ -t $task.cpus \\ \$INDEX \\ $reads \\ @@ -40,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/main.nf b/modules/bwameth/align/main.nf index 0bcd9bac..6d9c4431 100644 --- a/modules/bwameth/align/main.nf +++ b/modules/bwameth/align/main.nf @@ -15,6 +15,9 @@ process BWAMETH_ALIGN { 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 ?: '' 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/main.nf b/modules/bwameth/index/main.nf index f5b8ff59..4c106826 100644 --- a/modules/bwameth/index/main.nf +++ b/modules/bwameth/index/main.nf @@ -14,6 +14,9 @@ process BWAMETH_INDEX { path "bwameth" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 2efe20a5..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,14 @@ 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 script: def args = task.ext.args ?: '' @@ -26,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 d02598e1..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*/*") @@ -14,6 +14,9 @@ process CAT_FASTQ { tuple val(meta), path("*.merged.fastq.gz"), emit: 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}" 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/main.nf b/modules/cellranger/count/main.nf index 63fac709..6a206b6e 100644 --- a/modules/cellranger/count/main.nf +++ b/modules/cellranger/count/main.nf @@ -15,6 +15,9 @@ process CELLRANGER_COUNT { path("sample-${meta.gem}/outs/*"), emit: outs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def sample_arg = meta.samples.unique().join(",") 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/main.nf b/modules/cellranger/mkfastq/main.nf index f47aa75c..9c023bca 100644 --- a/modules/cellranger/mkfastq/main.nf +++ b/modules/cellranger/mkfastq/main.nf @@ -15,6 +15,9 @@ process CELLRANGER_MKFASTQ { path "versions.yml", emit: versions path "${bcl.getSimpleName()}/outs/fastq_path/*.fastq.gz" , emit: fastq + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/cellranger/mkgtf/main.nf index 4342fd00..9dc2fe1a 100644 --- a/modules/cellranger/mkgtf/main.nf +++ b/modules/cellranger/mkgtf/main.nf @@ -14,6 +14,9 @@ process CELLRANGER_MKGTF { path "*.filtered.gtf", emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/cellranger/mkref/main.nf index d38d6809..11cf80e3 100644 --- a/modules/cellranger/mkref/main.nf +++ b/modules/cellranger/mkref/main.nf @@ -16,6 +16,9 @@ process CELLRANGER_MKREF { path "${reference_name}", emit: reference path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/checkm/lineagewf/main.nf index 992b165e..d92f2c78 100644 --- a/modules/checkm/lineagewf/main.nf +++ b/modules/checkm/lineagewf/main.nf @@ -16,6 +16,9 @@ process CHECKM_LINEAGEWF { tuple val(meta), path("${prefix}.tsv"), emit: checkm_tsv 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}" 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 67384b0c..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) @@ -23,6 +23,9 @@ process CHROMAP_CHROMAP { tuple val(meta), path("*.pairs.gz") , optional:true, emit: pairs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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 61bcee10..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 @@ -15,6 +14,9 @@ process CHROMAP_INDEX { path "*.index" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = fasta.baseName 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/main.nf b/modules/clonalframeml/main.nf index db647a38..24502796 100644 --- a/modules/clonalframeml/main.nf +++ b/modules/clonalframeml/main.nf @@ -19,6 +19,9 @@ process CLONALFRAMEML { tuple val(meta), path("*.position_cross_reference.txt"), emit: pos_ref 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}" 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/main.nf b/modules/cmseq/polymut/main.nf index 47e86f0c..a02551c8 100644 --- a/modules/cmseq/polymut/main.nf +++ b/modules/cmseq/polymut/main.nf @@ -16,6 +16,9 @@ process CMSEQ_POLYMUT { tuple val(meta), path("*.txt"), emit: polymut 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}" 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/main.nf b/modules/cnvkit/batch/main.nf index 811cb409..7c44d9f6 100644 --- a/modules/cnvkit/batch/main.nf +++ b/modules/cnvkit/batch/main.nf @@ -20,6 +20,9 @@ process CNVKIT_BATCH { tuple val(meta), path("*.cns"), emit: cns, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def normal_args = normal ? "--normal $normal" : "" 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..17675cde --- /dev/null +++ b/modules/cnvpytor/callcnvs/main.nf @@ -0,0 +1,44 @@ +process CNVPYTOR_CALLCNVS { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': + 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + + input: + tuple val(meta), path(pytor) + + output: + tuple val(meta), path("*.tsv"), emit: cnvs + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '1000' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + cnvpytor \\ + -root $pytor \\ + -call $args > ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/callcnvs/meta.yml b/modules/cnvpytor/callcnvs/meta.yml new file mode 100644 index 00000000..edfc462a --- /dev/null +++ b/modules/cnvpytor/callcnvs/meta.yml @@ -0,0 +1,39 @@ +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: cnvpytor root file + pattern: "*.{pytor}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - cnvs: + type: file + description: file containing identified copy numer variations + pattern: "*.{tsv}" + - 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..9e59c6b8 --- /dev/null +++ b/modules/cnvpytor/histogram/main.nf @@ -0,0 +1,42 @@ +process CNVPYTOR_HISTOGRAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': + 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + + input: + tuple val(meta), path(pytor) + + 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 args = task.ext.args ?: '1000' + """ + cnvpytor \\ + -root $pytor \\ + -his $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ + + stub: + """ + touch ${pytor.baseName}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml new file mode 100644 index 00000000..fcad2221 --- /dev/null +++ b/modules/cnvpytor/histogram/meta.yml @@ -0,0 +1,42 @@ +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}" + +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" diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf new file mode 100644 index 00000000..162da719 --- /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.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': + 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + + 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/^.*pyCNVnator //; s/Using.*\$//' )) + 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/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/importreaddepth/meta.yml b/modules/cnvpytor/importreaddepth/meta.yml new file mode 100644 index 00000000..1cf3c0d0 --- /dev/null +++ b/modules/cnvpytor/importreaddepth/meta.yml @@ -0,0 +1,54 @@ +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" diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf new file mode 100644 index 00000000..0311bdfc --- /dev/null +++ b/modules/cnvpytor/partition/main.nf @@ -0,0 +1,42 @@ +process CNVPYTOR_PARTITION { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': + 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + + input: + tuple val(meta), path(pytor) + + 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 args = task.ext.args ?: '' + """ + cnvpytor \\ + -root $pytor \\ + -partition $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ + + stub: + """ + touch ${pytor.baseName}.pytor + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml new file mode 100644 index 00000000..a72cea4c --- /dev/null +++ b/modules/cnvpytor/partition/meta.yml @@ -0,0 +1,42 @@ +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}" + +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" 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/main.nf b/modules/cooler/cload/main.nf index d8bdc031..52964b8d 100644 --- a/modules/cooler/cload/main.nf +++ b/modules/cooler/cload/main.nf @@ -16,6 +16,9 @@ process COOLER_CLOAD { tuple val(meta), val(cool_bin), path("*.cool"), emit: cool 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}" 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/main.nf b/modules/cooler/digest/main.nf index 9658ec31..7e8e36f0 100644 --- a/modules/cooler/digest/main.nf +++ b/modules/cooler/digest/main.nf @@ -16,6 +16,9 @@ process COOLER_DIGEST { path "*.bed" , emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/cooler/dump/main.nf index a438acc8..996e9b5b 100644 --- a/modules/cooler/dump/main.nf +++ b/modules/cooler/dump/main.nf @@ -15,6 +15,9 @@ process COOLER_DUMP { tuple val(meta), path("*.bedpe"), emit: bedpe 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}" 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/main.nf b/modules/cooler/merge/main.nf index b1814b68..1e439caf 100644 --- a/modules/cooler/merge/main.nf +++ b/modules/cooler/merge/main.nf @@ -14,6 +14,9 @@ process COOLER_MERGE { tuple val(meta), path("*.cool"), emit: cool 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}" 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/main.nf b/modules/cooler/zoomify/main.nf index 226d4114..942282c0 100644 --- a/modules/cooler/zoomify/main.nf +++ b/modules/cooler/zoomify/main.nf @@ -14,6 +14,9 @@ process COOLER_ZOOMIFY { tuple val(meta), path("*.mcool"), emit: mcool 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}" 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/main.nf b/modules/csvtk/concat/main.nf index 94b1925a..f30e8332 100644 --- a/modules/csvtk/concat/main.nf +++ b/modules/csvtk/concat/main.nf @@ -16,6 +16,9 @@ process CSVTK_CONCAT { tuple val(meta), path("${prefix}.${out_extension}"), emit: csv 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}" 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/main.nf b/modules/csvtk/split/main.nf index 52ab7ec7..5653d192 100644 --- a/modules/csvtk/split/main.nf +++ b/modules/csvtk/split/main.nf @@ -16,6 +16,9 @@ process CSVTK_SPLIT { tuple val(meta), path("*.${out_extension}"), emit: split_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}" 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/main.nf b/modules/custom/dumpsoftwareversions/main.nf index 934bb467..327d5100 100644 --- a/modules/custom/dumpsoftwareversions/main.nf +++ b/modules/custom/dumpsoftwareversions/main.nf @@ -15,6 +15,9 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { path "software_versions_mqc.yml", emit: mqc_yml path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' template 'dumpsoftwareversions.py' 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 270b3f48..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 @@ -15,6 +15,9 @@ process CUSTOM_GETCHROMSIZES { path '*.fai' , emit: fai path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/cutadapt/main.nf b/modules/cutadapt/main.nf index 74c42768..9b310c0e 100644 --- a/modules/cutadapt/main.nf +++ b/modules/cutadapt/main.nf @@ -15,6 +15,9 @@ process CUTADAPT { 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}" 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/main.nf b/modules/damageprofiler/main.nf index 23eb9397..4b146e7f 100644 --- a/modules/damageprofiler/main.nf +++ b/modules/damageprofiler/main.nf @@ -17,6 +17,9 @@ process DAMAGEPROFILER { 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}" 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 722f6c55..a7d9c6f6 100644 --- a/modules/dastool/dastool/main.nf +++ b/modules/dastool/dastool/main.nf @@ -2,45 +2,44 @@ 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 + when: + task.ext.when == null || task.ext.when + script: 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 @@ -50,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 09f800bb..365872fd 100644 --- a/modules/dastool/scaffolds2bin/main.nf +++ b/modules/dastool/scaffolds2bin/main.nf @@ -15,13 +15,17 @@ process DASTOOL_SCAFFOLDS2BIN { tuple val(meta), path("*.tsv"), emit: scaffolds2bin 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" """ - 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/main.nf b/modules/dedup/main.nf index 8b4bdc37..c612ec14 100644 --- a/modules/dedup/main.nf +++ b/modules/dedup/main.nf @@ -17,6 +17,9 @@ process DEDUP { 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 ?: '' prefix = task.ext.prefix ?: "${meta.id}" 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 cc420e6a..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: @@ -14,6 +20,9 @@ process DEEPARG_DOWNLOADDATA { path "db/" , emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 9408fa3d..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) @@ -20,6 +25,9 @@ process DEEPARG_PREDICT { tuple val(meta), path("*.mapping.potential.ARG"), emit: potential_arg 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}" 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/main.nf b/modules/deeptools/computematrix/main.nf index 70be934b..96dfef3c 100644 --- a/modules/deeptools/computematrix/main.nf +++ b/modules/deeptools/computematrix/main.nf @@ -16,6 +16,9 @@ process DEEPTOOLS_COMPUTEMATRIX { tuple val(meta), path("*.mat.tab"), 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}" 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/main.nf b/modules/deeptools/plotfingerprint/main.nf index 7925c9a9..83613be7 100644 --- a/modules/deeptools/plotfingerprint/main.nf +++ b/modules/deeptools/plotfingerprint/main.nf @@ -16,6 +16,9 @@ process DEEPTOOLS_PLOTFINGERPRINT { tuple val(meta), path("*.qcmetrics.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}" 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/main.nf b/modules/deeptools/plotheatmap/main.nf index 992c9058..1e402e39 100644 --- a/modules/deeptools/plotheatmap/main.nf +++ b/modules/deeptools/plotheatmap/main.nf @@ -15,6 +15,9 @@ process DEEPTOOLS_PLOTHEATMAP { tuple val(meta), path("*.tab"), 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}" 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/main.nf b/modules/deeptools/plotprofile/main.nf index 60184fa6..d83a9493 100644 --- a/modules/deeptools/plotprofile/main.nf +++ b/modules/deeptools/plotprofile/main.nf @@ -15,6 +15,9 @@ process DEEPTOOLS_PLOTPROFILE { tuple val(meta), path("*.tab"), 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}" 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 98345c83..e2a0bee7 100644 --- a/modules/deepvariant/main.nf +++ b/modules/deepvariant/main.nf @@ -17,13 +17,16 @@ 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: + 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}" def regions = intervals ? "--regions ${intervals}" : "" """ @@ -41,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/main.nf b/modules/delly/call/main.nf index fc04cda7..d639ee16 100644 --- a/modules/delly/call/main.nf +++ b/modules/delly/call/main.nf @@ -17,6 +17,9 @@ process DELLY_CALL { tuple val(meta), path("*.csi"), emit: csi 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}" 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 c7342767..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -2,24 +2,48 @@ 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 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//'` @@ -28,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 bd7d1dd9..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -2,24 +2,48 @@ 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 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//'` @@ -28,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 cccfcce9..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 @@ -16,6 +14,9 @@ process DIAMOND_MAKEDB { path "${fasta}.dmnd", emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 8a6f082a..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) @@ -17,45 +17,30 @@ process DRAGMAP_ALIGN { 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 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/main.nf b/modules/dragmap/hashtable/main.nf index ab55364b..81333dfd 100644 --- a/modules/dragmap/hashtable/main.nf +++ b/modules/dragmap/hashtable/main.nf @@ -14,6 +14,9 @@ process DRAGMAP_HASHTABLE { path "dragmap" , emit: hashmap path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 8ca98832..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) @@ -18,6 +18,9 @@ process DRAGONFLYE { tuple val(meta), path("flye-info.txt"), optional:true , emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def memory = task.memory.toGiga() @@ -29,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 0a1920a6..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) @@ -14,6 +14,9 @@ process DSHBIO_EXPORTSEGMENTS { tuple val(meta), path("*.fa.gz"), 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}" 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 6efe07e8..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) @@ -14,6 +14,9 @@ process DSHBIO_FILTERBED { 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 prefix = task.ext.prefix ?: "${meta.id}" 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 5214ce23..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) @@ -14,6 +14,9 @@ process DSHBIO_FILTERGFF3 { tuple val(meta), path("*.gff3.gz"), emit: gff3 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}" 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 c0ca6a8b..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) @@ -14,6 +14,9 @@ process DSHBIO_SPLITBED { 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 prefix = task.ext.prefix ?: "${meta.id}" 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 012afec7..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) @@ -14,6 +14,9 @@ process DSHBIO_SPLITGFF3 { tuple val(meta), path("*.gff3.gz"), emit: gff3 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}" 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/main.nf b/modules/ectyper/main.nf index 0e040958..34973ee6 100644 --- a/modules/ectyper/main.nf +++ b/modules/ectyper/main.nf @@ -16,6 +16,9 @@ process ECTYPER { tuple val(meta), path("*.txt"), emit: 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}" 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/main.nf b/modules/emmtyper/main.nf index 70dabfb7..955cc308 100644 --- a/modules/emmtyper/main.nf +++ b/modules/emmtyper/main.nf @@ -14,6 +14,9 @@ process EMMTYPER { 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}" 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/main.nf b/modules/ensemblvep/main.nf index e3d0c286..c2bd055f 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -19,6 +19,9 @@ process ENSEMBLVEP { path "*.summary.html" , 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}" diff --git a/modules/ensemblvep/meta.yml b/modules/ensemblvep/meta.yml index 1b819227..cd9c8905 100644 --- a/modules/ensemblvep/meta.yml +++ b/modules/ensemblvep/meta.yml @@ -1,65 +1,65 @@ 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'] + - 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 + - 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 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) 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 4db78230..f60b75b4 100644 --- a/modules/expansionhunter/main.nf +++ b/modules/expansionhunter/main.nf @@ -16,6 +16,9 @@ process EXPANSIONHUNTER { tuple val(meta), path("*.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}" @@ -34,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/main.nf b/modules/fargene/main.nf index 73bdd411..029f6065 100644 --- a/modules/fargene/main.nf +++ b/modules/fargene/main.nf @@ -31,6 +31,9 @@ process FARGENE { tuple val(meta), path("${prefix}/tmpdir/*.out") , optional: true, emit: tmp 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}" 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/main.nf b/modules/fastani/main.nf index cc1c4902..e6b44a82 100644 --- a/modules/fastani/main.nf +++ b/modules/fastani/main.nf @@ -15,6 +15,9 @@ process FASTANI { tuple val(meta), path("*.ani.txt"), emit: ani 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}" 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 a406036a..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 @@ -21,6 +21,9 @@ process FASTP { tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged + 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 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 d250eca0..05730368 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -15,6 +15,9 @@ process FASTQC { tuple val(meta), path("*.zip") , emit: zip path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' // Add soft-links to original FastQs for consistent naming in pipeline @@ -41,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/main.nf b/modules/fastqscan/main.nf index a0dcc46a..4cca0317 100644 --- a/modules/fastqscan/main.nf +++ b/modules/fastqscan/main.nf @@ -14,6 +14,9 @@ process FASTQSCAN { tuple val(meta), path("*.json"), emit: json 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}" 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/main.nf b/modules/fasttree/main.nf index 5e57aae9..ce65846a 100644 --- a/modules/fasttree/main.nf +++ b/modules/fasttree/main.nf @@ -13,6 +13,9 @@ process FASTTREE { path "*.tre", emit: phylogeny path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/fgbio/callmolecularconsensusreads/main.nf index 3aab935b..347dc269 100644 --- a/modules/fgbio/callmolecularconsensusreads/main.nf +++ b/modules/fgbio/callmolecularconsensusreads/main.nf @@ -14,6 +14,9 @@ process FGBIO_CALLMOLECULARCONSENSUSREADS { 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}" 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/main.nf b/modules/fgbio/fastqtobam/main.nf index 3060d715..329aff33 100644 --- a/modules/fgbio/fastqtobam/main.nf +++ b/modules/fgbio/fastqtobam/main.nf @@ -15,6 +15,9 @@ process FGBIO_FASTQTOBAM { tuple val(meta), path("*_umi_converted.bam"), emit: umibam 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}" 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/main.nf b/modules/fgbio/groupreadsbyumi/main.nf index 47f000a5..31250d23 100644 --- a/modules/fgbio/groupreadsbyumi/main.nf +++ b/modules/fgbio/groupreadsbyumi/main.nf @@ -16,6 +16,9 @@ process FGBIO_GROUPREADSBYUMI { tuple val(meta), path("*_umi_histogram.txt"), emit: histogram 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}" 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/main.nf b/modules/fgbio/sortbam/main.nf index c542f3df..5026987c 100644 --- a/modules/fgbio/sortbam/main.nf +++ b/modules/fgbio/sortbam/main.nf @@ -14,6 +14,9 @@ process FGBIO_SORTBAM { 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}" 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/main.nf b/modules/filtlong/main.nf index bb1c1eb3..0e6fdd53 100644 --- a/modules/filtlong/main.nf +++ b/modules/filtlong/main.nf @@ -14,6 +14,9 @@ process FILTLONG { tuple val(meta), path("${meta.id}_lr_filtlong.fastq.gz"), emit: 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}" 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/main.nf b/modules/flash/main.nf index 7bc38c97..bb6f2499 100644 --- a/modules/flash/main.nf +++ b/modules/flash/main.nf @@ -13,6 +13,9 @@ process FLASH { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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 1dd91fef..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 @@ -20,11 +19,14 @@ process FREEBAYES { 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 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}" : "" @@ -41,7 +43,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -60,7 +62,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": 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 c246190a..7a64dab2 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) @@ -14,15 +14,17 @@ 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 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) { @@ -32,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..04303c09 --- /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.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' : + 'quay.io/biocontainers/gatk4:4.2.3.0--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 99233975..8b235809 100644 --- a/modules/gatk4/applyvqsr/main.nf +++ b/modules/gatk4/applyvqsr/main.nf @@ -2,32 +2,29 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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) { @@ -37,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 42391d62..766a8338 100644 --- a/modules/gatk4/baserecalibrator/main.nf +++ b/modules/gatk4/baserecalibrator/main.nf @@ -2,28 +2,31 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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) { @@ -31,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..70c70181 --- /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.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(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 37f46f48..118f535b 100644 --- a/modules/gatk4/bedtointervallist/main.nf +++ b/modules/gatk4/bedtointervallist/main.nf @@ -2,22 +2,26 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(bed) - path sequence_dict + path dict output: tuple val(meta), path('*.interval_list'), emit: interval_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}" + 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.' @@ -26,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 @@ -36,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 f4e98f64..197fe6c2 100644 --- a/modules/gatk4/calculatecontamination/main.nf +++ b/modules/gatk4/calculatecontamination/main.nf @@ -2,25 +2,27 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(pileup), path(matched) - val segmentout output: tuple val(meta), path('*.contamination.table'), emit: contamination tuple val(meta), path('*.segmentation.table') , emit: segmentation, 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 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.' @@ -29,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..45bf4372 --- /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.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 2cbd8948..dbf37048 100644 --- a/modules/gatk4/createsequencedictionary/main.nf +++ b/modules/gatk4/createsequencedictionary/main.nf @@ -2,20 +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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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.' @@ -23,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 @@ -34,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 8ab578c4..3df29947 100644 --- a/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -2,25 +2,29 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 tuple val(meta), path("*.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 CreateSomaticPanelOfNormals] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -28,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 744ebf21..caa34630 100644 --- a/modules/gatk4/estimatelibrarycomplexity/main.nf +++ b/modules/gatk4/estimatelibrarycomplexity/main.nf @@ -2,25 +2,28 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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) { @@ -29,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 f0116b41..199058d0 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(reads) @@ -14,10 +14,14 @@ process GATK4_FASTQTOSAM { 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 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.' @@ -26,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 2f5f8dcb..c1c82e0b 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 @@ -19,24 +19,18 @@ process GATK4_FILTERMUTECTCALLS { tuple val(meta), path("*.filteringStats.tsv"), emit: stats 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 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.' @@ -45,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 b084ab00..1f5f2e1b 100644 --- a/modules/gatk4/gatherbqsrreports/main.nf +++ b/modules/gatk4/gatherbqsrreports/main.nf @@ -2,22 +2,25 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: - tuple val(meta), path(recal_table) + tuple val(meta), path(table) 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 input = recal_table.collect{"-I ${it}"}.join(' ') + def input_list = table.collect{"--input $it"}.join(' ') def avail_mem = 3 if (!task.memory) { @@ -26,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..f5e9cf22 --- /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.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 94a589cd..d2b78899 100644 --- a/modules/gatk4/genomicsdbimport/main.nf +++ b/modules/gatk4/genomicsdbimport/main.nf @@ -2,44 +2,47 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' 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 @@ -50,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 016da1f5..0df88d66 100644 --- a/modules/gatk4/genotypegvcfs/main.nf +++ b/modules/gatk4/genotypegvcfs/main.nf @@ -1,31 +1,35 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 tuple val(meta), path("*.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 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.' @@ -33,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 a81ae635..c0946f71 100644 --- a/modules/gatk4/getpileupsummaries/main.nf +++ b/modules/gatk4/getpileupsummaries/main.nf @@ -2,27 +2,31 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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) { @@ -32,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 \\ + $sites_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 8c22da68..2cd9e7d4 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -2,46 +2,48 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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: + task.ext.when == null || task.ext.when + 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 ecd24173..90ff94e6 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(feature_file) @@ -14,8 +14,12 @@ process GATK4_INDEXFEATUREFILE { tuple val(meta), path("*.{tbi,idx}"), emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + 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.' @@ -23,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..c0f9df63 --- /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.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 17412160..1b9b37f4 100644 --- a/modules/gatk4/intervallisttools/main.nf +++ b/modules/gatk4/intervallisttools/main.nf @@ -2,21 +2,25 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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.' @@ -27,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 d1bce19f..717cf211 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(f1r2) @@ -14,11 +14,14 @@ process GATK4_LEARNREADORIENTATIONMODEL { tuple val(meta), path("*.tar.gz"), emit: artifactprior 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 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.' @@ -26,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 c101d042..2650925b 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -2,24 +2,28 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 + when: + task.ext.when == null || task.ext.when + 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.' @@ -28,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 0e294454..5c36b4ba 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(aligned), path(unmapped) @@ -16,9 +16,13 @@ process GATK4_MERGEBAMALIGNMENT { 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 '[GATK MergeBamAlignment] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -27,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 @@ -38,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..409e06f6 --- /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.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 b2e584a8..06ff3acb 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -2,30 +2,28 @@ 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 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{ "--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.' @@ -34,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 c33cee18..9969ad70 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 @@ -28,30 +24,16 @@ process GATK4_MUTECT2 { tuple val(meta), path("*.f1r2.tar.gz"), optional:true, emit: f1r2 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 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) { @@ -61,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 @@ -73,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 5a13d61d..3084658d 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -14,9 +14,13 @@ process GATK4_REVERTSAM { 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 '[GATK RevertSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -25,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 @@ -34,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 0a75f604..d8d94d69 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -14,10 +14,14 @@ process GATK4_SAMTOFASTQ { tuple val(meta), path('*.fastq.gz'), emit: 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}" - 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.' @@ -26,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 @@ -35,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..22779211 --- /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.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.2.5.0--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/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index 29483fb5..85e5daa8 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai), path(intervals) path fasta path fai path dict @@ -17,9 +17,14 @@ process GATK4_SPLITNCIGARREADS { 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 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.' @@ -28,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 beaec0c0..6beb87ef 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: - tuple val(meta), path(vcf), path(vcf_tbi) + tuple val(meta), path(vcf), path(tbi) path fasta path fai path dict @@ -18,9 +18,13 @@ process GATK4_VARIANTFILTRATION { tuple val(meta), path("*.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.' @@ -29,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 c4aa5535..cdcc1221 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.5.0" : 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.5.0--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.5.0--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 @@ -25,15 +21,14 @@ process GATK4_VARIANTRECALIBRATOR { tuple val(meta), path("*plots.R") , emit: plots, 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}" - 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) { @@ -43,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/main.nf b/modules/genmap/index/main.nf index 943f1a31..a19c6619 100644 --- a/modules/genmap/index/main.nf +++ b/modules/genmap/index/main.nf @@ -14,6 +14,9 @@ process GENMAP_INDEX { path "genmap" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/genmap/mappability/main.nf index 94083f14..50a17493 100644 --- a/modules/genmap/mappability/main.nf +++ b/modules/genmap/mappability/main.nf @@ -16,6 +16,9 @@ process GENMAP_MAPPABILITY { path "*.txt" , optional:true, emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/genrich/main.nf b/modules/genrich/main.nf index d9deea3c..d276c410 100644 --- a/modules/genrich/main.nf +++ b/modules/genrich/main.nf @@ -24,6 +24,9 @@ process GENRICH { tuple val(meta), path("*duplicates.txt") , optional:true, emit: duplicates 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}" 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/main.nf b/modules/gffread/main.nf index e7893f8b..7c575c97 100644 --- a/modules/gffread/main.nf +++ b/modules/gffread/main.nf @@ -14,6 +14,9 @@ process GFFREAD { path "*.gtf" , emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${gff.baseName}" 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 b8afca22..a26ab4ce 100644 --- a/modules/glnexus/main.nf +++ b/modules/glnexus/main.nf @@ -14,6 +14,9 @@ process GLNEXUS { tuple val(meta), path("*.bcf"), 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}" @@ -39,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/main.nf b/modules/graphmap2/align/main.nf index 554e585b..8834cc0a 100644 --- a/modules/graphmap2/align/main.nf +++ b/modules/graphmap2/align/main.nf @@ -17,6 +17,9 @@ process GRAPHMAP2_ALIGN { tuple val(meta), path("*.sam"), emit: sam 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}" 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/main.nf b/modules/graphmap2/index/main.nf index fffc7bcb..ef240b6c 100644 --- a/modules/graphmap2/index/main.nf +++ b/modules/graphmap2/index/main.nf @@ -13,6 +13,9 @@ process GRAPHMAP2_INDEX { path "*.gmidx" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/collapse/main.nf b/modules/gstama/collapse/main.nf index 1c06692d..36d8a311 100644 --- a/modules/gstama/collapse/main.nf +++ b/modules/gstama/collapse/main.nf @@ -24,6 +24,9 @@ process GSTAMA_COLLAPSE { tuple val(meta), path("*_varcov.txt") , emit: varcov , optional: true tuple val(meta), path("*_variants.txt") , emit: variants, optional: true + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gstama/merge/main.nf b/modules/gstama/merge/main.nf index 53ff93e4..221ec3c9 100644 --- a/modules/gstama/merge/main.nf +++ b/modules/gstama/merge/main.nf @@ -18,6 +18,9 @@ process GSTAMA_MERGE { tuple val(meta), path("*_trans_report.txt"), emit: trans_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}" 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/main.nf b/modules/gtdbtk/classifywf/main.nf index 009efa8d..bf83c2ad 100644 --- a/modules/gtdbtk/classifywf/main.nf +++ b/modules/gtdbtk/classifywf/main.nf @@ -25,6 +25,9 @@ process GTDBTK_CLASSIFYWF { path "gtdbtk.${meta.assembler}-${meta.id}.failed_genomes.tsv" , emit: failed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def pplacer_scratch = params.gtdbtk_pplacer_scratch ? "--scratch_dir pplacer_tmp" : "" 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/main.nf b/modules/gubbins/main.nf index b4c6dc23..17a271d8 100644 --- a/modules/gubbins/main.nf +++ b/modules/gubbins/main.nf @@ -21,6 +21,9 @@ process GUBBINS { path "*.node_labelled.final_tree.tre" , emit: tree_labelled path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/gunc/downloaddb/main.nf index 430b862b..00638693 100644 --- a/modules/gunc/downloaddb/main.nf +++ b/modules/gunc/downloaddb/main.nf @@ -14,6 +14,9 @@ process GUNC_DOWNLOADDB { path "*.dmnd" , emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/gunc/run/main.nf index 8508c9f0..ce9bd7c6 100644 --- a/modules/gunc/run/main.nf +++ b/modules/gunc/run/main.nf @@ -16,6 +16,9 @@ process GUNC_RUN { tuple val(meta), path("*all_levels.tsv") , optional: true, emit: all_levels_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}" 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 77a4e546..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) @@ -14,6 +14,9 @@ process GUNZIP { tuple val(meta), path("$gunzip"), emit: gunzip path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' gunzip = archive.toString() - '.gz' 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/hicap/main.nf b/modules/hicap/main.nf index a96343f6..51fe0b83 100644 --- a/modules/hicap/main.nf +++ b/modules/hicap/main.nf @@ -18,6 +18,9 @@ process HICAP { tuple val(meta), path("*.tsv"), emit: tsv, 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}" 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/hifiasm/main.nf b/modules/hifiasm/main.nf index 208554d6..ea7c4976 100644 --- a/modules/hifiasm/main.nf +++ b/modules/hifiasm/main.nf @@ -25,6 +25,9 @@ process HIFIASM { tuple val(meta), path("*.hap2.p_ctg.gfa") , emit: maternal_contigs , 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}" diff --git a/modules/hisat2/align/main.nf b/modules/hisat2/align/main.nf index ae888616..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) @@ -20,6 +20,9 @@ process HISAT2_ALIGN { tuple val(meta), path("*fastq.gz"), optional:true, emit: 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}" 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/main.nf b/modules/hisat2/build/main.nf index 4e8cd02b..50f65e3a 100644 --- a/modules/hisat2/build/main.nf +++ b/modules/hisat2/build/main.nf @@ -19,6 +19,9 @@ process HISAT2_BUILD { path "hisat2" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 0 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/main.nf b/modules/hisat2/extractsplicesites/main.nf index 302c35f1..94135977 100644 --- a/modules/hisat2/extractsplicesites/main.nf +++ b/modules/hisat2/extractsplicesites/main.nf @@ -16,6 +16,9 @@ process HISAT2_EXTRACTSPLICESITES { path "*.splice_sites.txt", emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/hmmcopy/gccounter/main.nf index a1de8b97..3911df6b 100644 --- a/modules/hmmcopy/gccounter/main.nf +++ b/modules/hmmcopy/gccounter/main.nf @@ -15,6 +15,9 @@ process HMMCOPY_GCCOUNTER { path "*.gc.wig" , emit: wig path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/hmmcopy/generatemap/main.nf index 1d248853..c6c08725 100644 --- a/modules/hmmcopy/generatemap/main.nf +++ b/modules/hmmcopy/generatemap/main.nf @@ -16,6 +16,9 @@ process HMMCOPY_GENERATEMAP { path "*.map.bw" , emit: bigwig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' 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/main.nf b/modules/hmmcopy/mapcounter/main.nf index ab20868e..b369d12b 100644 --- a/modules/hmmcopy/mapcounter/main.nf +++ b/modules/hmmcopy/mapcounter/main.nf @@ -15,6 +15,9 @@ process HMMCOPY_MAPCOUNTER { path "*.map.wig" , emit: wig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' 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/main.nf b/modules/hmmcopy/readcounter/main.nf index a6e89f91..ff13770d 100644 --- a/modules/hmmcopy/readcounter/main.nf +++ b/modules/hmmcopy/readcounter/main.nf @@ -16,6 +16,9 @@ process HMMCOPY_READCOUNTER { tuple val(meta), path("*.wig"), emit: wig 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}" 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 e6d04044..f8156e04 100644 --- a/modules/hmmer/hmmalign/main.nf +++ b/modules/hmmer/hmmalign/main.nf @@ -15,16 +15,17 @@ process HMMER_HMMALIGN { tuple val(meta), path("*.sthlm.gz"), emit: sthlm 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 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/main.nf b/modules/homer/annotatepeaks/main.nf index 84e0241a..c9da82ed 100644 --- a/modules/homer/annotatepeaks/main.nf +++ b/modules/homer/annotatepeaks/main.nf @@ -18,6 +18,9 @@ process HOMER_ANNOTATEPEAKS { tuple val(meta), path("*annotatePeaks.txt"), emit: 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}" 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 66de06b6..4858d6da 100644 --- a/modules/homer/findpeaks/main.nf +++ b/modules/homer/findpeaks/main.nf @@ -13,8 +13,11 @@ 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 script: def args = task.ext.args ?: '' 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 72e2091f..35b6904c 100644 --- a/modules/homer/maketagdirectory/main.nf +++ b/modules/homer/maketagdirectory/main.nf @@ -4,32 +4,37 @@ 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 script: def args = task.ext.args ?: '' 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 17e86947..379fad3d 100644 --- a/modules/homer/makeucscfile/main.nf +++ b/modules/homer/makeucscfile/main.nf @@ -13,8 +13,11 @@ 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 script: def args = task.ext.args ?: '' @@ -22,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/main.nf b/modules/idr/main.nf index 7e377878..d18ef2eb 100644 --- a/modules/idr/main.nf +++ b/modules/idr/main.nf @@ -18,6 +18,9 @@ process IDR { path "*.png" , emit: png path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' if (peaks.toList().size < 2) { 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/imputeme/vcftoprs/main.nf b/modules/imputeme/vcftoprs/main.nf index 5fee90c2..8ce3f73d 100644 --- a/modules/imputeme/vcftoprs/main.nf +++ b/modules/imputeme/vcftoprs/main.nf @@ -14,6 +14,9 @@ process IMPUTEME_VCFTOPRS { tuple val(meta), path("*.json"), emit: json 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}" diff --git a/modules/iqtree/main.nf b/modules/iqtree/main.nf index 54a6486d..db394bd2 100644 --- a/modules/iqtree/main.nf +++ b/modules/iqtree/main.nf @@ -15,6 +15,9 @@ process IQTREE { path "*.treefile", emit: phylogeny path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def fconst_args = constant_sites ? "-fconst $constant_sites" : '' 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/main.nf b/modules/ismapper/main.nf index a51cc01e..a2c79115 100644 --- a/modules/ismapper/main.nf +++ b/modules/ismapper/main.nf @@ -14,6 +14,9 @@ process ISMAPPER { tuple val(meta), path("results/*"), 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}" 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/main.nf b/modules/isoseq3/cluster/main.nf index fdd47971..fe1b10d4 100644 --- a/modules/isoseq3/cluster/main.nf +++ b/modules/isoseq3/cluster/main.nf @@ -24,6 +24,9 @@ process ISOSEQ3_CLUSTER { tuple val(meta), path("*.transcripts.singletons.bam.pbi"), optional: true, emit: singletons_pbi 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}" 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/main.nf b/modules/isoseq3/refine/main.nf index 5044cba2..25014811 100644 --- a/modules/isoseq3/refine/main.nf +++ b/modules/isoseq3/refine/main.nf @@ -19,6 +19,9 @@ process ISOSEQ3_REFINE { tuple val(meta), path("*.report.csv") , 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}" 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/main.nf b/modules/ivar/consensus/main.nf index 96d00ce2..db6301e9 100644 --- a/modules/ivar/consensus/main.nf +++ b/modules/ivar/consensus/main.nf @@ -18,6 +18,9 @@ process IVAR_CONSENSUS { tuple val(meta), path("*.mpileup") , optional:true, emit: mpileup path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/main.nf b/modules/ivar/trim/main.nf index 4d0c70a2..819aa5dd 100644 --- a/modules/ivar/trim/main.nf +++ b/modules/ivar/trim/main.nf @@ -16,6 +16,9 @@ process IVAR_TRIM { 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}" 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 bb6e402b..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 @@ -18,6 +19,9 @@ process IVAR_VARIANTS { tuple val(meta), path("*.mpileup"), optional:true, emit: mpileup path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/jupyternotebook/main.nf b/modules/jupyternotebook/main.nf index 871d6ccd..baed502c 100644 --- a/modules/jupyternotebook/main.nf +++ b/modules/jupyternotebook/main.nf @@ -22,6 +22,9 @@ process JUPYTERNOTEBOOK { tuple val(meta), path("artifacts/"), emit: artifacts, 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}" 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/main.nf b/modules/kallisto/index/main.nf index 4dc9c6d0..0f10e564 100644 --- a/modules/kallisto/index/main.nf +++ b/modules/kallisto/index/main.nf @@ -14,6 +14,9 @@ process KALLISTO_INDEX { path "kallisto" , emit: idx path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/kallistobustools/count/main.nf b/modules/kallistobustools/count/main.nf index d67eba31..d674aece 100644 --- a/modules/kallistobustools/count/main.nf +++ b/modules/kallistobustools/count/main.nf @@ -20,6 +20,9 @@ process KALLISTOBUSTOOLS_COUNT { tuple val(meta), path ("*.count"), emit: count 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}" diff --git a/modules/kallistobustools/ref/main.nf b/modules/kallistobustools/ref/main.nf index 1e496f67..1e789615 100644 --- a/modules/kallistobustools/ref/main.nf +++ b/modules/kallistobustools/ref/main.nf @@ -21,6 +21,9 @@ process KALLISTOBUSTOOLS_REF { path "cdna_t2c.txt" , optional:true, emit: cdna_t2c path "intron_t2c.txt" , optional:true, emit: intron_t2c + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' if (workflow_mode == "standard") { diff --git a/modules/khmer/normalizebymedian/main.nf b/modules/khmer/normalizebymedian/main.nf index 50b3d603..f89b2585 100644 --- a/modules/khmer/normalizebymedian/main.nf +++ b/modules/khmer/normalizebymedian/main.nf @@ -16,6 +16,9 @@ process KHMER_NORMALIZEBYMEDIAN { path "${name}.fastq.gz", emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' pe_args = pe_reads ? "--paired" : "" 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/main.nf b/modules/kleborate/main.nf index 4a793793..88cbc951 100644 --- a/modules/kleborate/main.nf +++ b/modules/kleborate/main.nf @@ -14,6 +14,9 @@ process KLEBORATE { tuple val(meta), path("*.txt"), emit: 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}" 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 eaabb229..d4000233 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -10,12 +10,18 @@ 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 script: def args = task.ext.args ?: '' @@ -23,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 d8156035..afcb0694 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -12,6 +12,9 @@ process KRONA_KRONADB { 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 ?: '' """ diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index bc79c98c..7837bb87 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -17,6 +17,9 @@ process KRONA_KTIMPORTTAXONOMY { 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 ?: '' """ 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/last/dotplot/main.nf b/modules/last/dotplot/main.nf index e8857403..a71d001a 100644 --- a/modules/last/dotplot/main.nf +++ b/modules/last/dotplot/main.nf @@ -16,6 +16,9 @@ process LAST_DOTPLOT { tuple val(meta), path("*.png"), optional:true, emit: png 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}" 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/main.nf b/modules/last/lastal/main.nf index b5ac8bfe..882b16cd 100644 --- a/modules/last/lastal/main.nf +++ b/modules/last/lastal/main.nf @@ -15,6 +15,9 @@ process LAST_LASTAL { tuple val(meta), path("*.maf.gz"), emit: maf 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}" 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/main.nf b/modules/last/lastdb/main.nf index e9895c5c..0747ba4d 100644 --- a/modules/last/lastdb/main.nf +++ b/modules/last/lastdb/main.nf @@ -14,6 +14,9 @@ process LAST_LASTDB { tuple val(meta), path("lastdb"), emit: 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}" 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/main.nf b/modules/last/mafconvert/main.nf index ca60e7fe..8ffec2f9 100644 --- a/modules/last/mafconvert/main.nf +++ b/modules/last/mafconvert/main.nf @@ -23,6 +23,9 @@ process LAST_MAFCONVERT { tuple val(meta), path("*.tab.gz"), optional:true, emit: tab_gz 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}" 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/main.nf b/modules/last/mafswap/main.nf index 0a58b027..55f6a1a9 100644 --- a/modules/last/mafswap/main.nf +++ b/modules/last/mafswap/main.nf @@ -14,6 +14,9 @@ process LAST_MAFSWAP { tuple val(meta), path("*.maf.gz"), emit: maf 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}" 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/main.nf b/modules/last/postmask/main.nf index ca981e1c..6bc64930 100644 --- a/modules/last/postmask/main.nf +++ b/modules/last/postmask/main.nf @@ -14,6 +14,9 @@ process LAST_POSTMASK { tuple val(meta), path("*.maf.gz"), emit: maf 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}" 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/main.nf b/modules/last/split/main.nf index 60ed135b..433eff0c 100644 --- a/modules/last/split/main.nf +++ b/modules/last/split/main.nf @@ -14,6 +14,9 @@ process LAST_SPLIT { tuple val(meta), path("*.maf.gz"), emit: maf 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}" 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/main.nf b/modules/last/train/main.nf index 471db7c1..23f4f36b 100644 --- a/modules/last/train/main.nf +++ b/modules/last/train/main.nf @@ -15,6 +15,9 @@ process LAST_TRAIN { tuple val(meta), path("*.par"), emit: param_file 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}" 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/main.nf b/modules/leehom/main.nf index b5cb2dcb..906d094e 100644 --- a/modules/leehom/main.nf +++ b/modules/leehom/main.nf @@ -23,6 +23,9 @@ process LEEHOM { 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 ?: '' prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/lima/main.nf index 691e43f2..e98fd157 100644 --- a/modules/lima/main.nf +++ b/modules/lima/main.nf @@ -28,6 +28,9 @@ process LIMA { tuple val(meta), path("*.clips") , optional: true, emit: clips tuple val(meta), path("*.guess") , optional: true, emit: guess + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/lissero/main.nf index 667697ef..29995db8 100644 --- a/modules/lissero/main.nf +++ b/modules/lissero/main.nf @@ -14,6 +14,9 @@ process LISSERO { 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}" 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/main.nf b/modules/lofreq/call/main.nf index d7fd078b..773bc212 100644 --- a/modules/lofreq/call/main.nf +++ b/modules/lofreq/call/main.nf @@ -15,6 +15,9 @@ process LOFREQ_CALL { 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 prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/lofreq/callparallel/main.nf index 764efcc5..4dffc302 100644 --- a/modules/lofreq/callparallel/main.nf +++ b/modules/lofreq/callparallel/main.nf @@ -16,6 +16,9 @@ process LOFREQ_CALLPARALLEL { 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 prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/lofreq/filter/main.nf index 34a5aef8..bddc012f 100644 --- a/modules/lofreq/filter/main.nf +++ b/modules/lofreq/filter/main.nf @@ -14,6 +14,9 @@ process LOFREQ_FILTER { 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}" 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/main.nf b/modules/lofreq/indelqual/main.nf index 5e5b8f44..ac53d70f 100644 --- a/modules/lofreq/indelqual/main.nf +++ b/modules/lofreq/indelqual/main.nf @@ -15,6 +15,9 @@ process LOFREQ_INDELQUAL { 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}" 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/main.nf b/modules/macrel/contigs/main.nf index 558ef6e8..65db4d3e 100644 --- a/modules/macrel/contigs/main.nf +++ b/modules/macrel/contigs/main.nf @@ -18,6 +18,9 @@ process MACREL_CONTIGS { tuple val(meta), path("*/*_log.txt") , emit: log_file 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}" 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/main.nf b/modules/macs2/callpeak/main.nf index c5c88f8e..9aaf97a9 100644 --- a/modules/macs2/callpeak/main.nf +++ b/modules/macs2/callpeak/main.nf @@ -20,6 +20,9 @@ process MACS2_CALLPEAK { tuple val(meta), path("*.bed") , optional:true, emit: bed tuple val(meta), path("*.bdg") , optional:true, emit: bdg + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" 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/main.nf b/modules/malt/build/main.nf index d1b0c427..8eeb304b 100644 --- a/modules/malt/build/main.nf +++ b/modules/malt/build/main.nf @@ -18,6 +18,9 @@ process MALT_BUILD { path "versions.yml" , emit: versions path "malt-build.log", emit: log + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 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 5e81667e..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,18 +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.' @@ -35,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/main.nf b/modules/maltextract/main.nf index e3a42016..75710141 100644 --- a/modules/maltextract/main.nf +++ b/modules/maltextract/main.nf @@ -16,6 +16,9 @@ process MALTEXTRACT { path "results" , emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 2a8c0acc..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 @@ -23,16 +22,21 @@ process MANTA_GERMLINE { tuple val(meta), path("*diploid_sv.vcf.gz.tbi") , emit: diploid_sv_vcf_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 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 @@ -54,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 1d62635b..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 @@ -25,6 +23,9 @@ process MANTA_SOMATIC { tuple val(meta), path("*.somatic_sv.vcf.gz.tbi") , emit: somatic_sv_vcf_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}" 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 63f7a840..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 @@ -23,6 +21,9 @@ process MANTA_TUMORONLY { tuple val(meta), path("*tumor_sv.vcf.gz.tbi") , emit: tumor_sv_vcf_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}" 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/main.nf b/modules/mapdamage2/main.nf index e3668fda..53007115 100644 --- a/modules/mapdamage2/main.nf +++ b/modules/mapdamage2/main.nf @@ -32,6 +32,9 @@ process MAPDAMAGE2 { tuple val(meta), path("*/"), optional: true ,emit: folder 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}" 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/main.nf b/modules/mash/dist/main.nf index 323bd339..270767b5 100644 --- a/modules/mash/dist/main.nf +++ b/modules/mash/dist/main.nf @@ -15,6 +15,9 @@ process MASH_DIST { tuple val(meta), path("*.txt"), emit: dist 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}" 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/main.nf b/modules/mash/sketch/main.nf index d93641f7..54263af7 100644 --- a/modules/mash/sketch/main.nf +++ b/modules/mash/sketch/main.nf @@ -14,6 +14,9 @@ process MASH_SKETCH { tuple val(meta), path("*.mash_stats") , emit: stats 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}" 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/main.nf b/modules/mashtree/main.nf index 5da2f805..4cd9af19 100644 --- a/modules/mashtree/main.nf +++ b/modules/mashtree/main.nf @@ -15,6 +15,9 @@ process MASHTREE { tuple val(meta), path("*.tsv"), emit: matrix 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}" 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 4d384391..a48df43f 100644 --- a/modules/maxbin2/main.nf +++ b/modules/maxbin2/main.nf @@ -21,13 +21,17 @@ process MAXBIN2 { tuple val(meta), path("*_gene.tar.gz"), emit: marker_genes, 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 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/medaka/main.nf b/modules/medaka/main.nf index 761b1c34..da77d0f0 100644 --- a/modules/medaka/main.nf +++ b/modules/medaka/main.nf @@ -14,6 +14,9 @@ process MEDAKA { tuple val(meta), path("*.fa.gz"), emit: assembly 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}" 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/main.nf b/modules/megahit/main.nf index 7b511883..6e6a1ad1 100644 --- a/modules/megahit/main.nf +++ b/modules/megahit/main.nf @@ -18,6 +18,9 @@ process MEGAHIT { tuple val(meta), path("megahit_out/intermediate_contigs/k*.final.contigs.fa.gz"), emit: kfinal_contigs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/main.nf b/modules/meningotype/main.nf index c3b65b9d..24c30029 100644 --- a/modules/meningotype/main.nf +++ b/modules/meningotype/main.nf @@ -14,6 +14,9 @@ process MENINGOTYPE { 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}" 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/metabat2/jgisummarizebamcontigdepths/main.nf b/modules/metabat2/jgisummarizebamcontigdepths/main.nf index 4a5869b6..7125eeb2 100644 --- a/modules/metabat2/jgisummarizebamcontigdepths/main.nf +++ b/modules/metabat2/jgisummarizebamcontigdepths/main.nf @@ -14,6 +14,9 @@ process METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS { tuple val(meta), path("*.txt.gz"), emit: depth 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}" 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/main.nf b/modules/metabat2/metabat2/main.nf index a8af0ae9..23ebe19a 100644 --- a/modules/metabat2/metabat2/main.nf +++ b/modules/metabat2/metabat2/main.nf @@ -18,6 +18,9 @@ process METABAT2_METABAT2 { tuple val(meta), path("bins/*.fa.gz") , 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}" 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 64965af3..bff0eb9a 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -17,10 +17,13 @@ process METAPHLAN3 { tuple val(meta), path('*.bowtie2out.txt'), optional:true, emit: bt2out 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_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/main.nf b/modules/methyldackel/extract/main.nf index a39c0305..b4242073 100644 --- a/modules/methyldackel/extract/main.nf +++ b/modules/methyldackel/extract/main.nf @@ -16,6 +16,9 @@ process METHYLDACKEL_EXTRACT { tuple val(meta), path("*.bedGraph"), emit: bedgraph path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/methyldackel/mbias/main.nf index 021f76f1..755e62f8 100644 --- a/modules/methyldackel/mbias/main.nf +++ b/modules/methyldackel/mbias/main.nf @@ -16,6 +16,9 @@ process METHYLDACKEL_MBIAS { tuple val(meta), path("*.mbias.txt"), emit: 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}" 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/main.nf b/modules/minia/main.nf index 968cafa5..87dd74f9 100644 --- a/modules/minia/main.nf +++ b/modules/minia/main.nf @@ -16,6 +16,9 @@ process MINIA { tuple val(meta), path('*.h5') , emit: h5 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}" 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/main.nf b/modules/miniasm/main.nf index b0db6925..f77b10f2 100644 --- a/modules/miniasm/main.nf +++ b/modules/miniasm/main.nf @@ -15,6 +15,9 @@ process MINIASM { tuple val(meta), path("*.fasta.gz"), emit: assembly 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}" 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 500250e9..08ac6eef 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -2,30 +2,43 @@ 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 script: 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/main.nf b/modules/minimap2/index/main.nf index 10cdd142..3dfeb861 100644 --- a/modules/minimap2/index/main.nf +++ b/modules/minimap2/index/main.nf @@ -13,6 +13,9 @@ process MINIMAP2_INDEX { path "*.mmi" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/mlst/main.nf index b2983b82..65396548 100644 --- a/modules/mlst/main.nf +++ b/modules/mlst/main.nf @@ -14,6 +14,9 @@ process MLST { 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}" 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 d2669b7e..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,18 +14,28 @@ 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: + task.ext.when == null || task.ext.when + 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 \\ @@ -37,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/msisensor/msi/main.nf b/modules/msisensor/msi/main.nf index 398b34a6..954c5bec 100644 --- a/modules/msisensor/msi/main.nf +++ b/modules/msisensor/msi/main.nf @@ -17,6 +17,9 @@ process MSISENSOR_MSI { 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}" 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/main.nf b/modules/msisensor/scan/main.nf index 223b4f44..399513ce 100644 --- a/modules/msisensor/scan/main.nf +++ b/modules/msisensor/scan/main.nf @@ -14,6 +14,9 @@ process MSISENSOR_SCAN { tuple val(meta), path("*.tab"), emit: 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}" 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/main.nf b/modules/mtnucratio/main.nf index 83d6ea2b..cb8d27e3 100644 --- a/modules/mtnucratio/main.nf +++ b/modules/mtnucratio/main.nf @@ -16,6 +16,9 @@ process MTNUCRATIO { tuple val(meta), path("*.json") , emit: json 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}" 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 3dceb162..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 @@ -15,6 +15,9 @@ process MULTIQC { path "*_plots" , optional:true, emit: plots path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ @@ -25,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/main.nf b/modules/mummer/main.nf index 39ad3e8b..1fe91404 100644 --- a/modules/mummer/main.nf +++ b/modules/mummer/main.nf @@ -16,6 +16,9 @@ process MUMMER { tuple val(meta), path("*.coords"), emit: coords 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}" 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/main.nf b/modules/muscle/main.nf index 6d549aaa..b2a1a131 100644 --- a/modules/muscle/main.nf +++ b/modules/muscle/main.nf @@ -21,6 +21,9 @@ process MUSCLE { 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}" 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/main.nf b/modules/nanolyse/main.nf index 0ad0f799..2b4f0928 100644 --- a/modules/nanolyse/main.nf +++ b/modules/nanolyse/main.nf @@ -16,6 +16,9 @@ process NANOLYSE { 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}" 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/main.nf b/modules/nanoplot/main.nf index c3fb8a37..083e2374 100644 --- a/modules/nanoplot/main.nf +++ b/modules/nanoplot/main.nf @@ -17,6 +17,9 @@ process NANOPLOT { 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 input_file = ("$ontfile".endsWith(".fastq.gz")) ? "--fastq ${ontfile}" : 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/main.nf b/modules/ncbigenomedownload/main.nf index 9897c861..60323dc8 100644 --- a/modules/ncbigenomedownload/main.nf +++ b/modules/ncbigenomedownload/main.nf @@ -27,6 +27,9 @@ process NCBIGENOMEDOWNLOAD { tuple val(meta), path("*_assembly_stats.txt") , emit: stats , 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}" 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/main.nf b/modules/nextclade/datasetget/main.nf index 00dc8ff9..4dd82ee3 100644 --- a/modules/nextclade/datasetget/main.nf +++ b/modules/nextclade/datasetget/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_DATASETGET { tag "$dataset" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.10.1" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.10.1--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.10.1--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.2--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.2--h9ee0642_0' }" input: val dataset @@ -16,6 +16,9 @@ process NEXTCLADE_DATASETGET { path "$prefix" , emit: dataset path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${dataset}" 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/main.nf b/modules/nextclade/run/main.nf index 36e19aab..4d4bdb88 100644 --- a/modules/nextclade/run/main.nf +++ b/modules/nextclade/run/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_RUN { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.10.1" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.10.1--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.10.1--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.2--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.2--h9ee0642_0' }" input: tuple val(meta), path(fasta) @@ -18,6 +18,9 @@ process NEXTCLADE_RUN { tuple val(meta), path("${prefix}.tree.json"), emit: json_tree 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}" 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/main.nf b/modules/ngmaster/main.nf index 7d04031c..ef288e8f 100644 --- a/modules/ngmaster/main.nf +++ b/modules/ngmaster/main.nf @@ -14,6 +14,9 @@ process NGMASTER { 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}" 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/main.nf b/modules/nucmer/main.nf index 4e296515..5b70abd9 100644 --- a/modules/nucmer/main.nf +++ b/modules/nucmer/main.nf @@ -15,6 +15,9 @@ process NUCMER { tuple val(meta), path("*.coords"), emit: coords 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}" 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 d27f7f9f..b6a3e200 100644 --- a/modules/optitype/main.nf +++ b/modules/optitype/main.nf @@ -8,12 +8,15 @@ 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 path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/main.nf b/modules/pairix/main.nf index c1b9658c..0b8c63c6 100644 --- a/modules/pairix/main.nf +++ b/modules/pairix/main.nf @@ -14,6 +14,9 @@ process PAIRIX { tuple val(meta), path(pair), path("*.px2"), emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/pairtools/dedup/main.nf index fe59e155..2c171e7a 100644 --- a/modules/pairtools/dedup/main.nf +++ b/modules/pairtools/dedup/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_DEDUP { tuple val(meta), path("*.pairs.stat"), emit: stat 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}" 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/main.nf b/modules/pairtools/flip/main.nf index 376191ce..4959c4ee 100644 --- a/modules/pairtools/flip/main.nf +++ b/modules/pairtools/flip/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_FLIP { tuple val(meta), path("*.flip.gz"), emit: flip 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}" 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/main.nf b/modules/pairtools/parse/main.nf index 7bd778c9..190346b1 100644 --- a/modules/pairtools/parse/main.nf +++ b/modules/pairtools/parse/main.nf @@ -16,6 +16,9 @@ process PAIRTOOLS_PARSE { tuple val(meta), path("*.pairsam.stat"), emit: stat 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}" 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/main.nf b/modules/pairtools/restrict/main.nf index 8759f709..59e18648 100644 --- a/modules/pairtools/restrict/main.nf +++ b/modules/pairtools/restrict/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_RESTRICT { tuple val(meta), path("*.pairs.gz"), emit: restrict 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}" 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/main.nf b/modules/pairtools/select/main.nf index a6d62ba7..9d434884 100644 --- a/modules/pairtools/select/main.nf +++ b/modules/pairtools/select/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_SELECT { tuple val(meta), path("*.unselected.pairs.gz"), emit: unselected 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}" 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/main.nf b/modules/pairtools/sort/main.nf index d5996dd0..15ed56d1 100644 --- a/modules/pairtools/sort/main.nf +++ b/modules/pairtools/sort/main.nf @@ -14,6 +14,9 @@ process PAIRTOOLS_SORT { tuple val(meta), path("*.pairs.gz"), emit: sorted 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}" 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 40d6d78e..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.17' : 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.17--pyhdfd78af_0' : - 'quay.io/biocontainers/pangolin:3.1.17--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) @@ -14,6 +14,9 @@ process PANGOLIN { tuple val(meta), path('*.csv'), 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}" 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/main.nf b/modules/paraclu/main.nf index cc16674e..1dcc4f90 100644 --- a/modules/paraclu/main.nf +++ b/modules/paraclu/main.nf @@ -17,6 +17,9 @@ process PARACLU { 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}" 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/main.nf b/modules/pbbam/pbmerge/main.nf index e0525cb1..aa0ca788 100644 --- a/modules/pbbam/pbmerge/main.nf +++ b/modules/pbbam/pbmerge/main.nf @@ -15,6 +15,9 @@ process PBBAM_PBMERGE { tuple val(meta), path("*.pbi"), emit: pbi 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}" 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/main.nf b/modules/pbccs/main.nf index 440fbc72..5bfae1bf 100644 --- a/modules/pbccs/main.nf +++ b/modules/pbccs/main.nf @@ -20,6 +20,9 @@ process PBCCS { tuple val(meta), path("*.metrics.json.gz"), 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}" 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/main.nf b/modules/peddy/main.nf index 1aa02a4f..50cdc698 100644 --- a/modules/peddy/main.nf +++ b/modules/peddy/main.nf @@ -18,6 +18,9 @@ process PEDDY { tuple val(meta), path("*.png") , optional: true, emit: png 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}" 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 6fe34cc2..d8f73342 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -18,12 +18,16 @@ process PHANTOMPEAKQUALTOOLS { tuple val(meta), path("*.Rdata"), emit: rdata 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 ?: '' 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/main.nf b/modules/phyloflash/main.nf index 9ebc40de..23c38d56 100644 --- a/modules/phyloflash/main.nf +++ b/modules/phyloflash/main.nf @@ -16,6 +16,9 @@ process PHYLOFLASH { tuple val(meta), path("${meta.id}*/*"), 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}" 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 ae3e4d96..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,11 @@ 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 script: def args = task.ext.args ?: '' @@ -35,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 9511f7a4..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) @@ -16,6 +16,9 @@ process PICARD_COLLECTMULTIPLEMETRICS { tuple val(meta), path("*.pdf") , emit: pdf 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}" @@ -30,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 dd9da1b6..e6dd49e9 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,19 +2,22 @@ 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: tuple val(meta), path("*_metrics"), 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}" @@ -29,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 6a9c9c72..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) @@ -15,6 +15,9 @@ process PICARD_FILTERSAMREADS { 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}" 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 7990d7e6..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) @@ -16,6 +16,9 @@ process PICARD_MARKDUPLICATES { 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}" @@ -30,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 96616a44..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) @@ -14,6 +14,9 @@ process PICARD_MERGESAMFILES { 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}" @@ -30,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 6676eed6..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) @@ -15,6 +15,9 @@ process PICARD_SORTSAM { 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}" 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 c7d7476c..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) @@ -15,6 +15,9 @@ process PIRATE { tuple val(meta), path("results/core_alignment.fasta"), 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}" 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/main.nf b/modules/plasmidid/main.nf index 7404a678..7911d806 100644 --- a/modules/plasmidid/main.nf +++ b/modules/plasmidid/main.nf @@ -22,6 +22,9 @@ process PLASMIDID { tuple val(meta), path("${prefix}/kmer/") , emit: kmer 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}" 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/main.nf b/modules/plink/extract/main.nf index 688ada67..fa22b527 100644 --- a/modules/plink/extract/main.nf +++ b/modules/plink/extract/main.nf @@ -16,6 +16,9 @@ process PLINK_EXTRACT { tuple val(meta), path("*.fam"), emit: fam 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}" 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/main.nf b/modules/plink/vcf/main.nf index 719e90d2..0a69a021 100644 --- a/modules/plink/vcf/main.nf +++ b/modules/plink/vcf/main.nf @@ -17,6 +17,9 @@ process PLINK_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}" 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 new file mode 100644 index 00000000..15f9c038 --- /dev/null +++ b/modules/plink2/extract/main.nf @@ -0,0 +1,42 @@ +process PLINK2_EXTRACT { + 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(variants) + + output: + tuple val(meta), path("*.pgen") , emit: extract_pgen + tuple val(meta), path("*.psam") , emit: extract_psam + tuple val(meta), path("*.pvar.zst"), emit: extract_pvar + 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( "$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 \\ + --extract $variants \\ + --make-pgen vzs \\ + --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/extract/meta.yml b/modules/plink2/extract/meta.yml new file mode 100644 index 00000000..07c13ebc --- /dev/null +++ b/modules/plink2/extract/meta.yml @@ -0,0 +1,64 @@ +name: plink2_extract +description: Subset plink pfiles with a text file of variant identifiers +keywords: + - plink2 + - extract +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}" + - variants: + type: file + description: A text file containing variant identifiers to keep (one per line) + pattern: "*.{keep}" + +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" + - extract_pgen: + type: file + description: PLINK 2 binary genotype table, containing extracted variants + pattern: "*.{pgen}" + - extract_psam: + type: file + description: PLINK 2 sample information file associated with the extracted data + pattern: "*.{psam}" + - extract_pvar: + type: file + description: PLINK 2 variant information file, containing extracted variants + pattern: "*.{pvar.zst}" + +authors: + - "@nebfield" 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 078ece1e..090851a8 100644 --- a/modules/plink2/vcf/main.nf +++ b/modules/plink2/vcf/main.nf @@ -11,18 +11,25 @@ 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 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/main.nf b/modules/pmdtools/filter/main.nf index b647b6d3..2d9d6eb3 100644 --- a/modules/pmdtools/filter/main.nf +++ b/modules/pmdtools/filter/main.nf @@ -16,6 +16,9 @@ process PMDTOOLS_FILTER { 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 ?: '' 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/porechop/main.nf b/modules/porechop/main.nf index f5ad93f8..65982b8b 100644 --- a/modules/porechop/main.nf +++ b/modules/porechop/main.nf @@ -14,6 +14,9 @@ process PORECHOP { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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 b5bd0620..97261557 100644 --- a/modules/preseq/lcextrap/main.nf +++ b/modules/preseq/lcextrap/main.nf @@ -5,16 +5,19 @@ 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 script: def args = task.ext.args ?: '' @@ -25,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/prodigal/main.nf b/modules/prodigal/main.nf index 63248931..5768952b 100644 --- a/modules/prodigal/main.nf +++ b/modules/prodigal/main.nf @@ -18,6 +18,9 @@ process PRODIGAL { tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations 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}" diff --git a/modules/prodigal/meta.yml b/modules/prodigal/meta.yml index 3062ccce..8cb3d12e 100644 --- a/modules/prodigal/meta.yml +++ b/modules/prodigal/meta.yml @@ -5,9 +5,9 @@ keywords: tools: - prodigal: description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program - homepage: {https://github.com/hyattpd/Prodigal} - documentation: {https://github.com/hyattpd/prodigal/wiki} - tool_dev_url: {} + homepage: https://github.com/hyattpd/Prodigal + documentation: https://github.com/hyattpd/prodigal/wiki + tool_dev_url: https://github.com/hyattpd/Prodigal doi: "10.1186/1471-2105-11-119" licence: ["GPL v3"] diff --git a/modules/prokka/main.nf b/modules/prokka/main.nf index 551a17b9..3e46d1a1 100644 --- a/modules/prokka/main.nf +++ b/modules/prokka/main.nf @@ -27,6 +27,9 @@ process PROKKA { tuple val(meta), path("${prefix}/*.tsv"), emit: tsv 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}" 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/main.nf b/modules/pycoqc/main.nf index e966b31c..a5e6fcb2 100644 --- a/modules/pycoqc/main.nf +++ b/modules/pycoqc/main.nf @@ -15,6 +15,9 @@ process PYCOQC { path "*.json" , emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 c06c592c..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) @@ -14,6 +14,9 @@ process PYDAMAGE_ANALYZE { tuple val(meta), path("pydamage_results/pydamage_results.csv"), emit: 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}" 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 ab0b2115..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) @@ -14,6 +14,9 @@ process PYDAMAGE_FILTER { tuple val(meta), path("pydamage_results/pydamage_filtered_results.csv"), emit: 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}" 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/main.nf b/modules/qcat/main.nf index 7d81952d..4c75b003 100644 --- a/modules/qcat/main.nf +++ b/modules/qcat/main.nf @@ -15,6 +15,9 @@ process QCAT { tuple val(meta), path("fastq/*.fastq.gz"), emit: 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}" 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 973fd6a4..3bfcb4c1 100644 --- a/modules/qualimap/bamqc/main.nf +++ b/modules/qualimap/bamqc/main.nf @@ -10,19 +10,21 @@ process QUALIMAP_BAMQC { input: tuple val(meta), path(bam) path gff - val use_gff 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 = use_gff ? "--gff $gff" : '' + def regions = gff ? "--gff $gff" : '' def strandedness = 'non-strand-specific' if (meta.strandedness == 'forward') { @@ -50,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/qualimap/rnaseq/main.nf b/modules/qualimap/rnaseq/main.nf index d83fcd99..3b2f88ad 100644 --- a/modules/qualimap/rnaseq/main.nf +++ b/modules/qualimap/rnaseq/main.nf @@ -15,6 +15,9 @@ process QUALIMAP_RNASEQ { 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}" diff --git a/modules/quast/main.nf b/modules/quast/main.nf index e88051b5..beb797d4 100644 --- a/modules/quast/main.nf +++ b/modules/quast/main.nf @@ -18,6 +18,9 @@ process QUAST { path '*.tsv' , emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: 'quast' 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/main.nf b/modules/racon/main.nf index 9be5ce63..6f844896 100644 --- a/modules/racon/main.nf +++ b/modules/racon/main.nf @@ -14,6 +14,9 @@ process RACON { tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly 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}" 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/main.nf b/modules/rapidnj/main.nf index 04a08227..952bae4c 100644 --- a/modules/rapidnj/main.nf +++ b/modules/rapidnj/main.nf @@ -16,6 +16,9 @@ process RAPIDNJ { path "*.tre" , emit: phylogeny path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/main.nf b/modules/rasusa/main.nf index c2893d18..47c8ece6 100644 --- a/modules/rasusa/main.nf +++ b/modules/rasusa/main.nf @@ -15,6 +15,9 @@ process RASUSA { tuple val(meta), path('*.fastq.gz'), emit: 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}" 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/main.nf b/modules/raven/main.nf new file mode 100644 index 00000000..8bcf6bb1 --- /dev/null +++ b/modules/raven/main.nf @@ -0,0 +1,42 @@ +process RAVEN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::raven-assembler=1.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/raven-assembler:1.6.1--h2e03b76_0' : + 'quay.io/biocontainers/raven-assembler:1.6.1--h2e03b76_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.fasta.gz"), emit: fasta + tuple val(meta), path("*.gfa.gz") , emit: gfa + 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}" + """ + # run tool + raven \\ + -t $task.cpus \\ + --graphical-fragment-assembly ${prefix}.gfa \\ + $args \\ + $reads | \\ + gzip -c > ${prefix}.fasta.gz + + # compress assembly graph + gzip -c ${prefix}.gfa > ${prefix}.gfa.gz + + # get tool version + cat <<-END_VERSIONS > versions.yml + "${task.process}": + raven: \$( raven --version ) + END_VERSIONS + """ +} diff --git a/modules/raven/meta.yml b/modules/raven/meta.yml new file mode 100644 index 00000000..53917625 --- /dev/null +++ b/modules/raven/meta.yml @@ -0,0 +1,47 @@ +name: raven +description: De novo genome assembler for long uncorrected reads. +keywords: + - de novo + - assembly + - genome + - genome assembler + - long uncorrected reads +tools: + - raven: + description: Raven is a de novo genome assembler for long uncorrected reads. + homepage: https://github.com/lbcb-sci/raven + 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"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', suffix:'bacteria' ] + - reads: + type: file + description: Input file in FASTA/FASTQ format. + pattern: "*.{fasta,fastq,fasta.gz,fastq.gz,fa,fq,fa.gz,fq.gz}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', suffix:'bacteria' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fasta: + type: file + description: Assembled FASTA file + pattern: "*.fasta.gz" + - gfa: + type: file + description: Repeat graph + pattern: "*.gfa.gz" + +authors: + - "@fmalmeida" diff --git a/modules/raxmlng/main.nf b/modules/raxmlng/main.nf index 62b6c78a..e872a4e6 100644 --- a/modules/raxmlng/main.nf +++ b/modules/raxmlng/main.nf @@ -14,6 +14,9 @@ process RAXMLNG { path "*.raxml.support" , optional:true, emit: phylogeny_bootstrapped path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/rmarkdownnotebook/main.nf b/modules/rmarkdownnotebook/main.nf index 18d8e150..336b0af0 100644 --- a/modules/rmarkdownnotebook/main.nf +++ b/modules/rmarkdownnotebook/main.nf @@ -23,6 +23,9 @@ process RMARKDOWNNOTEBOOK { tuple val(meta), path ("session_info.log"), emit: session_info 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}" diff --git a/modules/roary/main.nf b/modules/roary/main.nf index edda3281..fabb3234 100644 --- a/modules/roary/main.nf +++ b/modules/roary/main.nf @@ -15,6 +15,9 @@ process ROARY { tuple val(meta), path("results/*.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}" 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 4b2ada47..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) @@ -22,6 +22,9 @@ process RSEM_CALCULATEEXPRESSION { tuple val(meta), path("${prefix}.genome.bam") , optional:true, emit: bam_genome tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" 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 a5b8922a..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/*" @@ -16,6 +16,9 @@ process RSEM_PREPAREREFERENCE { path "*transcripts.fa", emit: transcript_fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' 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/main.nf b/modules/rseqc/bamstat/main.nf index 1141a13f..958221fd 100644 --- a/modules/rseqc/bamstat/main.nf +++ b/modules/rseqc/bamstat/main.nf @@ -14,6 +14,9 @@ process RSEQC_BAMSTAT { tuple val(meta), path("*.bam_stat.txt"), emit: 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}" 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/main.nf b/modules/rseqc/inferexperiment/main.nf index 2243c43e..23c1b688 100644 --- a/modules/rseqc/inferexperiment/main.nf +++ b/modules/rseqc/inferexperiment/main.nf @@ -15,6 +15,9 @@ process RSEQC_INFEREXPERIMENT { tuple val(meta), path("*.infer_experiment.txt"), emit: 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}" 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/main.nf b/modules/rseqc/innerdistance/main.nf index 425737d6..b05661de 100644 --- a/modules/rseqc/innerdistance/main.nf +++ b/modules/rseqc/innerdistance/main.nf @@ -19,6 +19,9 @@ process RSEQC_INNERDISTANCE { tuple val(meta), path("*.r") , optional:true, emit: rscript 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}" 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/main.nf b/modules/rseqc/junctionannotation/main.nf index d2562e5c..c3401dc5 100644 --- a/modules/rseqc/junctionannotation/main.nf +++ b/modules/rseqc/junctionannotation/main.nf @@ -21,6 +21,9 @@ process RSEQC_JUNCTIONANNOTATION { tuple val(meta), path("*events.pdf") , optional:true, emit: events_pdf 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}" 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/main.nf b/modules/rseqc/junctionsaturation/main.nf index 695762b5..11b62904 100644 --- a/modules/rseqc/junctionsaturation/main.nf +++ b/modules/rseqc/junctionsaturation/main.nf @@ -16,6 +16,9 @@ process RSEQC_JUNCTIONSATURATION { tuple val(meta), path("*.r") , emit: rscript 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}" 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/main.nf b/modules/rseqc/readdistribution/main.nf index 333193e3..3198c5c6 100644 --- a/modules/rseqc/readdistribution/main.nf +++ b/modules/rseqc/readdistribution/main.nf @@ -15,6 +15,9 @@ process RSEQC_READDISTRIBUTION { tuple val(meta), path("*.read_distribution.txt"), emit: 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}" 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/main.nf b/modules/rseqc/readduplication/main.nf index 134f2e8d..cb989a5f 100644 --- a/modules/rseqc/readduplication/main.nf +++ b/modules/rseqc/readduplication/main.nf @@ -17,6 +17,9 @@ process RSEQC_READDUPLICATION { tuple val(meta), path("*.r") , emit: rscript 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}" 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 b7bff0f3..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 ? @@ -16,6 +16,9 @@ process RSEQC_TIN { tuple val(meta), path("*.xls"), emit: xls 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}" 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/salmon/index/main.nf b/modules/salmon/index/main.nf index b0a2f973..737087f9 100644 --- a/modules/salmon/index/main.nf +++ b/modules/salmon/index/main.nf @@ -15,6 +15,9 @@ process SALMON_INDEX { path "salmon" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def get_decoy_ids = "grep '^>' $genome_fasta | cut -d ' ' -f 1 > decoys.txt" 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/main.nf b/modules/salmon/quant/main.nf index 6cae4f72..bd4792c5 100644 --- a/modules/salmon/quant/main.nf +++ b/modules/salmon/quant/main.nf @@ -19,6 +19,9 @@ process SALMON_QUANT { 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}" 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 4627b978..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) @@ -14,6 +14,9 @@ process SAMBLASTER { 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 ?: '' 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 e553f218..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) @@ -19,6 +19,9 @@ process SAMTOOLS_AMPLICONCLIP { tuple val(meta), path("*.cliprejects.bam"), optional:true, emit: rejects_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}" 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 32588dd7..5d6aa79d 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) @@ -15,6 +15,9 @@ process SAMTOOLS_BAM2FQ { tuple val(meta), path("*.fq.gz"), emit: 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}" 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/bamtocram/main.nf b/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b49c308f --- /dev/null +++ b/modules/samtools/bamtocram/main.nf @@ -0,0 +1,35 @@ +//There is a -L option to only output alignments in interval, might be an option for exons/panel data? +process SAMTOOLS_BAMTOCRAM { + 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"), path("*.crai"), emit: cram_crai + 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}" + """ + samtools view --threads ${task.cpus} --reference ${fasta} -C $args $input > ${prefix}.cram + samtools index -@${task.cpus} ${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/bamtocram/meta.yml b/modules/samtools/bamtocram/meta.yml new file mode 100644 index 00000000..037704c6 --- /dev/null +++ b/modules/samtools/bamtocram/meta.yml @@ -0,0 +1,52 @@ +name: samtools_bamtocram +description: filter/convert and then index 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/SAM file + pattern: "*.{bam,sam}" + - index: + type: file + description: BAM/SAM index file + pattern: "*.{bai,sai}" + - 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 ] + - cram_crai: + type: file + description: filtered/converted CRAM file + index + pattern: "*{.cram,.crai}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@FriederikeHanssen" + - "@maxulysse" 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/depth/main.nf b/modules/samtools/depth/main.nf index 50b2ed5d..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) @@ -14,6 +14,9 @@ process SAMTOOLS_DEPTH { 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}" 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 58c445d8..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) @@ -14,6 +14,9 @@ process SAMTOOLS_FAIDX { tuple val(meta), path ("*.fai"), emit: fai path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ @@ -26,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 a2dae087..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) @@ -14,6 +14,9 @@ process SAMTOOLS_FASTQ { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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 89ac666d..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) @@ -14,6 +14,9 @@ process SAMTOOLS_FIXMATE { 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}" 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 119adf77..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) @@ -14,6 +14,9 @@ process SAMTOOLS_FLAGSTAT { tuple val(meta), path("*.flagstat"), emit: flagstat path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 fc54e676..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) @@ -14,6 +14,9 @@ process SAMTOOLS_IDXSTATS { tuple val(meta), path("*.idxstats"), emit: idxstats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 c4fa2c63..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) @@ -16,6 +16,9 @@ process SAMTOOLS_INDEX { tuple val(meta), path("*.crai"), optional:true, emit: crai path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ @@ -30,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 a318bfc4..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) @@ -16,6 +16,9 @@ process SAMTOOLS_MERGE { tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram 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}" @@ -35,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 c40f46d1..fcd498be 100644 --- a/modules/samtools/mpileup/main.nf +++ b/modules/samtools/mpileup/main.nf @@ -2,28 +2,31 @@ 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: tuple val(meta), path("*.mpileup"), emit: mpileup 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 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 42c7bbf4..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) @@ -14,6 +14,9 @@ process SAMTOOLS_SORT { 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}" @@ -25,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 7209070d..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) @@ -15,6 +15,9 @@ process SAMTOOLS_STATS { tuple val(meta), path("*.stats"), emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def reference = fasta ? "--reference ${fasta}" : "" @@ -31,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 cb205d0b..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: @@ -16,6 +16,9 @@ process SAMTOOLS_VIEW { 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 args2 = task.ext.args2 ?: '' @@ -38,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/main.nf b/modules/scoary/main.nf index ca33041d..cfa58ab2 100644 --- a/modules/scoary/main.nf +++ b/modules/scoary/main.nf @@ -15,6 +15,9 @@ process SCOARY { tuple val(meta), path("*.csv"), emit: 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}" 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/main.nf b/modules/seacr/callpeak/main.nf index 12b9205f..340c0eef 100644 --- a/modules/seacr/callpeak/main.nf +++ b/modules/seacr/callpeak/main.nf @@ -17,6 +17,9 @@ process SEACR_CALLPEAK { 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}" 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/main.nf b/modules/seqkit/split2/main.nf index 5bed1dae..ff91d86b 100644 --- a/modules/seqkit/split2/main.nf +++ b/modules/seqkit/split2/main.nf @@ -14,6 +14,9 @@ process SEQKIT_SPLIT2 { tuple val(meta), path("**/*.gz"), emit: 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}" 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/main.nf b/modules/seqsero2/main.nf index 0a7aa6ad..a5393cf6 100644 --- a/modules/seqsero2/main.nf +++ b/modules/seqsero2/main.nf @@ -16,6 +16,9 @@ process SEQSERO2 { tuple val(meta), path("results/*_result.txt"), emit: 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}" 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/main.nf b/modules/seqtk/mergepe/main.nf index 299c9ea4..519a4ab9 100644 --- a/modules/seqtk/mergepe/main.nf +++ b/modules/seqtk/mergepe/main.nf @@ -14,6 +14,9 @@ process SEQTK_MERGEPE { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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/main.nf b/modules/seqtk/sample/main.nf index 96e08fd4..a9a89370 100644 --- a/modules/seqtk/sample/main.nf +++ b/modules/seqtk/sample/main.nf @@ -15,6 +15,9 @@ process SEQTK_SAMPLE { tuple val(meta), path("*.fastq.gz"), emit: 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}" 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/main.nf b/modules/seqtk/subseq/main.nf index abfe4faa..9dd58686 100644 --- a/modules/seqtk/subseq/main.nf +++ b/modules/seqtk/subseq/main.nf @@ -15,6 +15,9 @@ process SEQTK_SUBSEQ { 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 ?: '' 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/main.nf b/modules/sequenzautils/bam2seqz/main.nf index ce9d1962..f150e0bd 100644 --- a/modules/sequenzautils/bam2seqz/main.nf +++ b/modules/sequenzautils/bam2seqz/main.nf @@ -16,6 +16,9 @@ process SEQUENZAUTILS_BAM2SEQZ { tuple val(meta), path("*.gz"), emit: seqz 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}" 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/main.nf b/modules/sequenzautils/gcwiggle/main.nf index a6fcb559..23cc75b6 100644 --- a/modules/sequenzautils/gcwiggle/main.nf +++ b/modules/sequenzautils/gcwiggle/main.nf @@ -14,6 +14,9 @@ process SEQUENZAUTILS_GCWIGGLE { tuple val(meta), path("*.wig.gz"), emit: wig 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}" 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/main.nf b/modules/seqwish/induce/main.nf index 6d6b33e7..529629ac 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -17,6 +17,9 @@ process SEQWISH_INDUCE { tuple val(meta), path("*.gfa"), emit: gfa 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}" 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/shovill/main.nf b/modules/shovill/main.nf index 1a56df27..20a4548f 100644 --- a/modules/shovill/main.nf +++ b/modules/shovill/main.nf @@ -18,6 +18,9 @@ process SHOVILL { tuple val(meta), path("contigs.{fastg,gfa,LastGraph}") , optional:true, emit: gfa path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def memory = task.memory.toGiga() 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/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/snapaligner/paired/main.nf b/modules/snapaligner/paired/main.nf new file mode 100644 index 00000000..57044893 --- /dev/null +++ b/modules/snapaligner/paired/main.nf @@ -0,0 +1,41 @@ +process SNAPALIGNER_PAIRED { + 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}" + + """ + mkdir -p index + mv $index index/ + + snap-aligner paired \\ + index \\ + ${reads.join(" ")} \\ + -o -bam ${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/paired/meta.yml b/modules/snapaligner/paired/meta.yml new file mode 100644 index 00000000..b19e0174 --- /dev/null +++ b/modules/snapaligner/paired/meta.yml @@ -0,0 +1,48 @@ +name: "snapaligner_paired" +description: Performs paired end 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 fastq or 1 for bam + 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/single/main.nf b/modules/snapaligner/single/main.nf new file mode 100644 index 00000000..b13e1153 --- /dev/null +++ b/modules/snapaligner/single/main.nf @@ -0,0 +1,41 @@ +process SNAPALIGNER_SINGLE { + 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}" + + """ + mkdir -p index + mv $index index/ + + snap-aligner single \\ + index \\ + ${reads.join(" ")} \\ + -o -bam ${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/single/meta.yml b/modules/snapaligner/single/meta.yml new file mode 100644 index 00000000..e69cc721 --- /dev/null +++ b/modules/snapaligner/single/meta.yml @@ -0,0 +1,48 @@ +name: "snapaligner_single" +description: Performs single end 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 single end input files + 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/snpdists/main.nf b/modules/snpdists/main.nf index c8d61161..29febc68 100644 --- a/modules/snpdists/main.nf +++ b/modules/snpdists/main.nf @@ -14,6 +14,9 @@ process SNPDISTS { 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}" 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/main.nf b/modules/snpeff/main.nf index 6248fee3..1b4d5f43 100644 --- a/modules/snpeff/main.nf +++ b/modules/snpeff/main.nf @@ -17,6 +17,9 @@ process SNPEFF { path "*.csv" , emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 diff --git a/modules/snpeff/meta.yml b/modules/snpeff/meta.yml index 8ba18683..c191b9ac 100644 --- a/modules/snpeff/meta.yml +++ b/modules/snpeff/meta.yml @@ -1,58 +1,58 @@ 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'] + - 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 + - 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 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/main.nf b/modules/snpsift/split/main.nf index a83052ad..8531b4cb 100644 --- a/modules/snpsift/split/main.nf +++ b/modules/snpsift/split/main.nf @@ -14,6 +14,9 @@ process SNPSIFT_SPLIT { tuple val(meta), path("*.vcf"), emit: out_vcfs 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}" 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/main.nf b/modules/snpsites/main.nf index 60e694ac..33b1a2c9 100644 --- a/modules/snpsites/main.nf +++ b/modules/snpsites/main.nf @@ -15,6 +15,9 @@ process SNPSITES { path "versions.yml" , emit: versions env CONSTANT_SITES, emit: constant_sites_string + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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/sortmerna/main.nf b/modules/sortmerna/main.nf index 5c0950d8..419d2914 100644 --- a/modules/sortmerna/main.nf +++ b/modules/sortmerna/main.nf @@ -16,6 +16,9 @@ process SORTMERNA { 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}" 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/main.nf b/modules/spades/main.nf index ba690d35..b7ece6f6 100644 --- a/modules/spades/main.nf +++ b/modules/spades/main.nf @@ -20,6 +20,9 @@ process SPADES { 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}" 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/main.nf b/modules/spatyper/main.nf index d04fd265..2a116f09 100644 --- a/modules/spatyper/main.nf +++ b/modules/spatyper/main.nf @@ -16,6 +16,9 @@ process SPATYPER { 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}" 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 73e3673d..1980ffeb 100644 --- a/modules/sratools/fasterqdump/main.nf +++ b/modules/sratools/fasterqdump/main.nf @@ -14,6 +14,9 @@ process SRATOOLS_FASTERQDUMP { tuple val(meta), path(output), 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.args2 ?: '' diff --git a/modules/sratools/fasterqdump/meta.yml b/modules/sratools/fasterqdump/meta.yml index 1478bed8..ec5f69a5 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: ["US-Government-Work"] input: - meta: diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 1e1eb802..2233d0aa 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -15,6 +15,9 @@ process SRATOOLS_PREFETCH { 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" diff --git a/modules/sratools/prefetch/meta.yml b/modules/sratools/prefetch/meta.yml index 22213b29..e08b708c 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: ["US-Government-Work"] input: - meta: 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/main.nf b/modules/staphopiasccmec/main.nf index dbb61a27..dd173c2f 100644 --- a/modules/staphopiasccmec/main.nf +++ b/modules/staphopiasccmec/main.nf @@ -14,6 +14,9 @@ process STAPHOPIASCCMEC { 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}" 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 9725496f..762b84f6 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -29,6 +29,10 @@ 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 script: def args = task.ext.args ?: '' 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 ad32c0dd..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 @@ -16,6 +16,9 @@ process STAR_GENOMEGENERATE { path "star" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args_list = args.tokenize() 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 324be6df..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 @@ -21,10 +19,13 @@ process STRELKA_GERMLINE { tuple val(meta), path("*genome.vcf.gz.tbi") , emit: genome_vcf_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 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 a9766d01..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 @@ -21,18 +19,22 @@ process STRELKA_SOMATIC { tuple val(meta), path("*.somatic_snvs.vcf.gz.tbi") , emit: vcf_snvs_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 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 756dc6ec..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 @@ -15,6 +15,9 @@ process STRINGTIE_MERGE { path "stringtie.merged.gtf", emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ 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 9d62a966..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) @@ -18,6 +18,9 @@ process STRINGTIE { tuple val(meta), path("*.ballgown") , emit: ballgown 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}" 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/main.nf b/modules/subread/featurecounts/main.nf index 53eb279e..18e2a92b 100644 --- a/modules/subread/featurecounts/main.nf +++ b/modules/subread/featurecounts/main.nf @@ -15,6 +15,9 @@ process SUBREAD_FEATURECOUNTS { tuple val(meta), path("*featureCounts.txt.summary"), 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}" 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 new file mode 100644 index 00000000..4a39940c --- /dev/null +++ b/modules/svdb/merge/main.nf @@ -0,0 +1,57 @@ +process SVDB_MERGE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + + input: + tuple val(meta), path(vcfs) + val (priority) + + output: + tuple val(meta), path("*_sv_merge.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 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 \\ + $prio \\ + --vcf $input \\ + > ${prefix}_sv_merge.vcf + + 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}_sv_merge.vcf + + 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 + """ +} diff --git a/modules/svdb/merge/meta.yml b/modules/svdb/merge/meta.yml new file mode 100644 index 00000000..e166bad0 --- /dev/null +++ b/modules/svdb/merge/meta.yml @@ -0,0 +1,39 @@ +name: svdb_merge +description: The merge module merges structural variants within one or more vcf files. +keywords: + - structural variants +tools: + - svdb: + description: structural variant database software + homepage: https://github.com/J35P312/SVDB + documentation: https://github.com/J35P312/SVDB/blob/master/README.md + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - priority: + type: list + description: prioritise the input vcf files according to this list, e.g ['tiddit','cnvnator'] + - vcfs: + type: list + description: Two or more VCF files. Order of files should correspond to the order of tags used for priority. + pattern: "*.{vcf,vcf.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" + - vcf: + type: file + description: merged VCF file + pattern: "*_sv_merge.vcf" +authors: + - "@ramprasadn" diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf new file mode 100644 index 00000000..c669b5a5 --- /dev/null +++ b/modules/svdb/query/main.nf @@ -0,0 +1,73 @@ +process SVDB_QUERY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + + input: + tuple val(meta), path(vcf) + val(in_occs) + val(in_frqs) + val(out_occs) + val(out_frqs) + path (vcf_dbs) + + output: + 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 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_dbs.join(',')} \\ + --query_vcf $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}": + svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/svdb/query/meta.yml b/modules/svdb/query/meta.yml new file mode 100644 index 00000000..57e67e15 --- /dev/null +++ b/modules/svdb/query/meta.yml @@ -0,0 +1,55 @@ +name: svdb_query +description: Query a structural variant database, using a vcf file as query +keywords: + - structural variants +tools: + - svdb: + description: structural variant database software + homepage: https://github.com/J35P312/SVDB + documentation: https://github.com/J35P312/SVDB/blob/master/README.md + licence: ["MIT"] + +input: + - meta: + type: map + 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 + pattern: "*.{vcf,vcf.gz}" + - vcf_db: + type: file + description: database vcf file + pattern: "*.{vcf,vcf.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" + - 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: "*_query.vcf" + +authors: + - "@ramprasadn" diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index ed9362b2..18e83c84 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -11,14 +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 e419d153..77fd91a5 100644 --- a/modules/tabix/bgziptabix/main.nf +++ b/modules/tabix/bgziptabix/main.nf @@ -14,12 +14,15 @@ process TABIX_BGZIPTABIX { tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi 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}" """ - bgzip -c $args $input > ${prefix}.gz + bgzip --threads ${task.cpus} -c $args $input > ${prefix}.gz tabix $args2 ${prefix}.gz cat <<-END_VERSIONS > versions.yml @@ -27,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 c721a554..e155e468 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -11,9 +11,13 @@ 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: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ @@ -24,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/main.nf b/modules/tbprofiler/profile/main.nf index 87175a39..17c94a34 100644 --- a/modules/tbprofiler/profile/main.nf +++ b/modules/tbprofiler/profile/main.nf @@ -18,6 +18,9 @@ process TBPROFILER_PROFILE { tuple val(meta), path("vcf/*.vcf.gz") , emit: vcf 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}" 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 c5a1ca0f..578c4043 100644 --- a/modules/tiddit/cov/main.nf +++ b/modules/tiddit/cov/main.nf @@ -16,6 +16,9 @@ process TIDDIT_COV { tuple val(meta), path("*.wig"), optional: true, emit: wig 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}" @@ -33,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 08eecc01..b3e3813c 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -18,10 +18,13 @@ process TIDDIT_SV { tuple val(meta), path("*.signals.tab"), emit: signals 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 == "dummy_file.txt" ? "--ref $fasta" : "" + def reference = fasta ? "--ref $fasta" : "" """ tiddit \\ --sv \\ @@ -35,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/main.nf b/modules/transdecoder/longorf/main.nf new file mode 100644 index 00000000..9d5c20f2 --- /dev/null +++ b/modules/transdecoder/longorf/main.nf @@ -0,0 +1,40 @@ +process TRANSDECODER_LONGORF { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::transdecoder=5.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/transdecoder:5.5.0--pl5262hdfd78af_4' : + 'quay.io/comp-bio-aging/transdecoder' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("${meta.id}/*.pep") , emit: pep + tuple val(meta), path("${meta.id}/*.gff3"), emit: gff3 + tuple val(meta), path("${meta.id}/*.cds") , emit: cds + tuple val(meta), path("${meta.id}/*.dat") , emit: dat + path("${meta.id}/") , emit: folder + 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}" + + """ + TransDecoder.LongOrfs \\ + $args \\ + -O $prefix \\ + -t \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transdecoder: \$(echo \$(TransDecoder.LongOrfs --version) | sed -e "s/TransDecoder.LongOrfs //g") + END_VERSIONS + """ +} diff --git a/modules/transdecoder/longorf/meta.yml b/modules/transdecoder/longorf/meta.yml new file mode 100644 index 00000000..b039a261 --- /dev/null +++ b/modules/transdecoder/longorf/meta.yml @@ -0,0 +1,57 @@ +name: transdecoder_longorf +description: TransDecoder itentifies candidate coding regions within transcript sequences. it is used to build gff file. +keywords: + - eucaryotes + - gff +tools: + - transdecoder: + description: TransDecoder identifies candidate coding regions within transcript sequences, such as those generated by de novo RNA-Seq transcript assembly using Trinity, or constructed based on RNA-Seq alignments to the genome using Tophat and Cufflinks. + homepage: https://github.com/TransDecoder + documentation: https://github.com/TransDecoder/TransDecoder/wiki + tool_dev_url: https://github.com/TransDecoder/TransDecoder + doi: "" + licence: ["Broad Institute"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: fasta file + pattern: "*.{fasta}" + +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" + - pep: + type: Amino acids fasta file + description: all ORFs meeting the minimum length criteria, regardless of coding potential. file + pattern: "*.{pep}" + - gff3: + type: gff file + description: positions of all ORFs as found in the target transcripts. file + pattern: "*.{gff3}" + - cds: + type: fasta file + description: the nucleotide coding sequence for all detected ORFs. file + pattern: "*{cds}" + - dat: + type: tsv file + description: nucleotide frequencies + pattern: "*{dat}" + - folder: + type: folder + description: contains all the files from the run + +authors: + - "@Danilo2771" diff --git a/modules/transdecoder/predict/main.nf b/modules/transdecoder/predict/main.nf new file mode 100644 index 00000000..dccc031c --- /dev/null +++ b/modules/transdecoder/predict/main.nf @@ -0,0 +1,40 @@ +process TRANSDECODER_PREDICT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::transdecoder=5.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/transdecoder:5.5.0--pl5262hdfd78af_4': + 'quay.io/comp-bio-aging/transdecoder' }" + + input: + tuple val(meta), path(fasta) + path(fold) + + output: + tuple val(meta), path("*.transdecoder.pep") , emit: pep + tuple val(meta), path("*.transdecoder.gff3") , emit: gff3 + tuple val(meta), path("*.transdecoder.cds") , emit: cds + tuple val(meta), path("*.transdecoder.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}" + + """ + TransDecoder.Predict \\ + $args \\ + -O ${prefix} \\ + -t \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transdecoder: \$(echo \$(TransDecoder.Predict --version) | sed -e "s/TransDecoder.Predict //g") + END_VERSIONS + """ +} diff --git a/modules/transdecoder/predict/meta.yml b/modules/transdecoder/predict/meta.yml new file mode 100644 index 00000000..cb972112 --- /dev/null +++ b/modules/transdecoder/predict/meta.yml @@ -0,0 +1,59 @@ +name: transdecoder_predict +description: TransDecoder identifies candidate coding regions within transcript sequences. It is used to build gff file. You can use this module after transdecoder_longorf +keywords: + - eukaryotes + - gff + +tools: + - transdecoder: + description: TransDecoder identifies candidate coding regions within transcript sequences, such as those generated by de novo RNA-Seq transcript assembly using Trinity, or constructed based on RNA-Seq alignments to the genome using Tophat and Cufflinks. + homepage: https://github.com/TransDecoder + documentation: https://github.com/TransDecoder/TransDecoder/wiki + tool_dev_url: https://github.com/TransDecoder/TransDecoder + doi: "" + licence: ["Broad Institute"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: fasta file + pattern: "*.{fasta}" + - fold: + type: folder + description: Output from the module transdecoder_longorf + 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" + - pep: + type: amino acids fasta file + description: All ORFs meeting the minimum length criteria, regardless of coding potential + pattern: "*.{pep}" + - gff3: + type: gff3 file + description: Positions of all ORFs as found in the target transcripts + pattern: "*.{gff3}" + - cds: + type: nucleotide fasta file + description: the nucleotide coding sequence for all detected ORFs + pattern: "*{cds}" + - bed: + type: bed file + description: bed file + pattern: "*{bed}" + +authors: + - "@Danilo2771" diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index ee40b780..3a3fca90 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -11,12 +11,16 @@ 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 script: def args = task.ext.args ?: '' @@ -49,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.*\$//') @@ -70,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/bed12tobigbed/main.nf b/modules/ucsc/bed12tobigbed/main.nf index 742798b3..0c84cfe7 100644 --- a/modules/ucsc/bed12tobigbed/main.nf +++ b/modules/ucsc/bed12tobigbed/main.nf @@ -17,6 +17,9 @@ process UCSC_BED12TOBIGBED { tuple val(meta), path("*.bigBed"), emit: bigbed 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}" diff --git a/modules/ucsc/bedclip/main.nf b/modules/ucsc/bedclip/main.nf index dacd7260..969a8f73 100755 --- a/modules/ucsc/bedclip/main.nf +++ b/modules/ucsc/bedclip/main.nf @@ -17,6 +17,9 @@ process UCSC_BEDCLIP { tuple val(meta), path("*.bedGraph"), emit: bedgraph 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}" 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/bedgraphtobigwig/main.nf b/modules/ucsc/bedgraphtobigwig/main.nf index 9ba306ab..ef0ca088 100644 --- a/modules/ucsc/bedgraphtobigwig/main.nf +++ b/modules/ucsc/bedgraphtobigwig/main.nf @@ -17,6 +17,9 @@ process UCSC_BEDGRAPHTOBIGWIG { tuple val(meta), path("*.bigWig"), emit: bigwig 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}" diff --git a/modules/ucsc/bigwigaverageoverbed/main.nf b/modules/ucsc/bigwigaverageoverbed/main.nf index 1e97c83d..51d63de8 100644 --- a/modules/ucsc/bigwigaverageoverbed/main.nf +++ b/modules/ucsc/bigwigaverageoverbed/main.nf @@ -17,6 +17,9 @@ process UCSC_BIGWIGAVERAGEOVERBED { tuple val(meta), path("*.tab"), emit: tab 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}" 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/main.nf b/modules/ucsc/liftover/main.nf index 3dd9531e..be8fad3e 100644 --- a/modules/ucsc/liftover/main.nf +++ b/modules/ucsc/liftover/main.nf @@ -18,6 +18,9 @@ process UCSC_LIFTOVER { tuple val(meta), path("*.unlifted.bed"), emit: 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}" 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 6a1847b6..2af7190b 100644 --- a/modules/ucsc/wigtobigwig/main.nf +++ b/modules/ucsc/wigtobigwig/main.nf @@ -17,6 +17,9 @@ process UCSC_WIGTOBIGWIG { tuple val(meta), path("*.bw"), emit: bw 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}" @@ -32,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/main.nf b/modules/ultra/pipeline/main.nf index f2dcb543..c86a5802 100644 --- a/modules/ultra/pipeline/main.nf +++ b/modules/ultra/pipeline/main.nf @@ -16,6 +16,9 @@ process ULTRA_PIPELINE { tuple val(meta), path("*.sam"), emit: sam 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}" 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 ce21437d..dfcbcf2f 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -11,17 +11,25 @@ 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 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/main.nf b/modules/umitools/extract/main.nf index fba8f054..22a405b9 100644 --- a/modules/umitools/extract/main.nf +++ b/modules/umitools/extract/main.nf @@ -15,6 +15,9 @@ process UMITOOLS_EXTRACT { 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}" 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/main.nf b/modules/unicycler/main.nf index 1ccc72a9..4d3721b0 100644 --- a/modules/unicycler/main.nf +++ b/modules/unicycler/main.nf @@ -16,6 +16,9 @@ process UNICYCLER { 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}" 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 6d1996e7..058d1764 100644 --- a/modules/untar/main.nf +++ b/modules/untar/main.nf @@ -4,20 +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 \\ @@ -30,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 294ac0b0..8476a2eb 100644 --- a/modules/unzip/main.nf +++ b/modules/unzip/main.nf @@ -8,11 +8,14 @@ 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 script: def args = task.ext.args ?: '' 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..454b86a4 --- /dev/null +++ b/modules/vardictjava/main.nf @@ -0,0 +1,50 @@ +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/main.nf b/modules/variantbam/main.nf index 11059a9a..3370ca8f 100644 --- a/modules/variantbam/main.nf +++ b/modules/variantbam/main.nf @@ -16,6 +16,9 @@ process VARIANTBAM { 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}" 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 421fc0fa..bc0514c9 100644 --- a/modules/vcfanno/main.nf +++ b/modules/vcfanno/main.nf @@ -9,21 +9,29 @@ 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 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 @@ -31,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/main.nf b/modules/vcflib/vcfuniq/main.nf index 37fc51bc..a01e8485 100644 --- a/modules/vcflib/vcfuniq/main.nf +++ b/modules/vcflib/vcfuniq/main.nf @@ -16,6 +16,9 @@ process VCFLIB_VCFUNIQ { 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}" 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/main.nf b/modules/vcftools/main.nf index fbe646ca..78b95fae 100644 --- a/modules/vcftools/main.nf +++ b/modules/vcftools/main.nf @@ -81,6 +81,9 @@ process VCFTOOLS { tuple val(meta), path("*.diff.switch") , optional:true, emit: diff_switch_error 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}" 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/main.nf b/modules/yara/index/main.nf index 77122c78..0fa5f00b 100644 --- a/modules/yara/index/main.nf +++ b/modules/yara/index/main.nf @@ -14,6 +14,9 @@ process YARA_INDEX { path "yara" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' 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 4539033d..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,8 +13,12 @@ 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: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -25,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}": @@ -43,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/meta.yml b/subworkflows/nf-core/annotation_ensemblvep/meta.yml index e7d92ce9..991a8b2f 100644 --- a/subworkflows/nf-core/annotation_ensemblvep/meta.yml +++ b/subworkflows/nf-core/annotation_ensemblvep/meta.yml @@ -20,10 +20,10 @@ 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_snpeff/meta.yml b/subworkflows/nf-core/annotation_snpeff/meta.yml index 164a0ee2..e0773626 100644 --- a/subworkflows/nf-core/annotation_snpeff/meta.yml +++ b/subworkflows/nf-core/annotation_snpeff/meta.yml @@ -20,10 +20,10 @@ 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/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/meta.yml b/subworkflows/nf-core/sra_fastq/meta.yml index 3db93257..5114bce5 100644 --- a/subworkflows/nf-core/sra_fastq/meta.yml +++ b/subworkflows/nf-core/sra_fastq/meta.yml @@ -34,4 +34,4 @@ output: description: File containing software versions pattern: "versions.yml" authors: - - '@Midnighter' + - "@Midnighter" 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 2321c918..e966f18a 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,26 @@ 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/antismashlitedownloaddatabases: + - modules/antismash/antismashlitedownloaddatabases/** + - tests/modules/antismash/antismashlitedownloaddatabases/** + arriba: - modules/arriba/** - tests/modules/arriba/** @@ -30,6 +58,10 @@ artic/minion: - modules/artic/minion/** - tests/modules/artic/minion/** +ascat: + - modules/ascat/** + - tests/modules/ascat/** + assemblyscan: - modules/assemblyscan/** - tests/modules/assemblyscan/** @@ -46,6 +78,14 @@ bamaligncleaner: - modules/bamaligncleaner/** - tests/modules/bamaligncleaner/** +bamcmp: + - modules/bamcmp/** + - tests/modules/bamcmp/** + +bamtools/convert: + - modules/bamtools/convert/** + - tests/modules/bamtools/convert/** + bamtools/split: - modules/bamtools/split/** - tests/modules/bamtools/split/** @@ -74,6 +114,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/** @@ -126,6 +174,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/** @@ -170,6 +222,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/** @@ -230,6 +333,10 @@ bowtie2/build: - modules/bowtie2/build/** - tests/modules/bowtie2/build_test/** +bracken/bracken: + - modules/bracken/bracken/** + - tests/modules/bracken/bracken/** + bwa/aln: - modules/bwa/aln/** - tests/modules/bwa/aln/** @@ -300,6 +407,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/** @@ -324,6 +435,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/** @@ -372,6 +503,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/** @@ -388,6 +523,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/** @@ -460,6 +599,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/** @@ -472,6 +623,10 @@ expansionhunter: - modules/expansionhunter/** - tests/modules/expansionhunter/** +faqcs: + - modules/faqcs/** + - tests/modules/faqcs/** + fargene: - modules/fargene/** - tests/modules/fargene/** @@ -524,10 +679,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/** @@ -536,6 +699,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/** @@ -544,6 +711,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/** @@ -568,6 +739,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/** @@ -588,6 +763,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/** @@ -600,10 +779,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/** @@ -620,6 +807,10 @@ gatk4/samtofastq: - modules/gatk4/samtofastq/** - tests/modules/gatk4/samtofastq/** +gatk4/selectvariants: + - modules/gatk4/selectvariants/** + - tests/modules/gatk4/selectvariants/** + gatk4/splitncigarreads: - modules/gatk4/splitncigarreads/** - tests/modules/gatk4/splitncigarreads/** @@ -668,6 +859,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/** @@ -688,6 +883,14 @@ gunzip: - modules/gunzip/** - tests/modules/gunzip/** +hamronization/deeparg: + - modules/hamronization/deeparg/** + - tests/modules/hamronization/deeparg/** + +hamronization/summarize: + - modules/hamronization/summarize/** + - tests/modules/hamronization/summarize/** + hicap: - modules/hicap/** - tests/modules/hicap/** @@ -731,12 +934,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: @@ -747,6 +955,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/** @@ -787,6 +1013,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/** @@ -820,6 +1054,10 @@ krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** +krona/ktimporttext: + - modules/krona/ktimporttext/** + - tests/modules/krona/ktimporttext/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** @@ -856,6 +1094,10 @@ leehom: - modules/leehom/** - tests/modules/leehom/** +legsta: + - modules/legsta/** + - tests/modules/legsta/** + lima: - modules/lima/** - tests/modules/lima/** @@ -888,6 +1130,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/** @@ -940,6 +1186,10 @@ megahit: - modules/megahit/** - tests/modules/megahit/** +megan/rma2info: + - modules/megan/rma2info/** + - tests/modules/megan/rma2info/** + meningotype: - modules/meningotype/** - tests/modules/meningotype/** @@ -984,6 +1234,10 @@ mlst: - modules/mlst/** - tests/modules/mlst/** +mobsuite/recon: + - modules/mobsuite/recon/** + - tests/modules/mobsuite/recon/** + mosdepth: - modules/mosdepth/** - tests/modules/mosdepth/** @@ -996,6 +1250,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/** @@ -1037,6 +1299,10 @@ ngmaster: - modules/ngmaster/** - tests/modules/ngmaster/** +ngscheckmate/ncm: + - modules/ngscheckmate/ncm/** + - tests/modules/ngscheckmate/ncm/** + nucmer: - modules/nucmer/** - tests/modules/nucmer/** @@ -1073,6 +1339,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/** @@ -1093,10 +1363,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/** @@ -1109,10 +1391,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/** @@ -1125,6 +1423,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/** @@ -1141,6 +1443,14 @@ plink/vcf: - modules/plink/vcf/** - tests/modules/plink/vcf/** +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/** @@ -1153,10 +1463,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/** @@ -1185,6 +1503,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/** @@ -1201,10 +1523,18 @@ rasusa: - modules/rasusa/** - tests/modules/rasusa/** +raven: + - modules/raven/** + - tests/modules/raven/** + raxmlng: - modules/raxmlng/** - tests/modules/raxmlng/** +rgi/main: + - modules/rgi/main/** + - tests/modules/rgi/main/** + rmarkdownnotebook: - modules/rmarkdownnotebook/** - tests/modules/rmarkdownnotebook/** @@ -1273,6 +1603,14 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** +samtools/bamtocram: + - modules/samtools/bamtocram/** + - tests/modules/samtools/bamtocram/** + +samtools/collatefastq: + - modules/samtools/collatefastq/** + - tests/modules/samtools/collatefastq/** + samtools/depth: - modules/samtools/depth/** - tests/modules/samtools/depth/** @@ -1329,10 +1667,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/** @@ -1341,10 +1691,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/** @@ -1365,6 +1723,22 @@ shovill: - modules/shovill/** - tests/modules/shovill/** +sistr: + - modules/sistr/** + - tests/modules/sistr/** + +snapaligner/index: + - modules/snapaligner/index/** + - tests/modules/snapaligner/index/** + +snapaligner/paired: + - modules/snapaligner/paired/** + - tests/modules/snapaligner/paired/** + +snapaligner/single: + - modules/snapaligner/single/** + - tests/modules/snapaligner/single/** + snpdists: - modules/snpdists/** - tests/modules/snpdists/** @@ -1381,6 +1755,10 @@ snpsites: - modules/snpsites/** - tests/modules/snpsites/** +sourmash/sketch: + - modules/sourmash/sketch/** + - tests/modules/sourmash/sketch/** + spades: - modules/spades/** - tests/modules/spades/** @@ -1397,6 +1775,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/** @@ -1409,6 +1799,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/** @@ -1429,6 +1823,14 @@ subread/featurecounts: - modules/subread/featurecounts/** - tests/modules/subread/featurecounts/** +svdb/merge: + - modules/svdb/merge/** + - tests/modules/svdb/merge/** + +svdb/query: + - modules/svdb/query/** + - tests/modules/svdb/query/** + tabix/bgzip: - modules/tabix/bgzip/** - tests/modules/tabix/bgzip/** @@ -1445,6 +1847,10 @@ tbprofiler/profile: - modules/tbprofiler/profile/** - tests/modules/tbprofiler/profile/** +test/template: + - modules/test/template/** + - tests/modules/test/template/** + tiddit/cov: - modules/tiddit/cov/** - tests/modules/tiddit/cov/** @@ -1453,6 +1859,14 @@ tiddit/sv: - modules/tiddit/sv/** - tests/modules/tiddit/sv/** +transdecoder/longorf: + - modules/transdecoder/longorf/** + - tests/modules/transdecoder/longorf/** + +transdecoder/predict: + - modules/transdecoder/predict/** + - tests/modules/transdecoder/predict/** + trimgalore: - modules/trimgalore/** - tests/modules/trimgalore/** @@ -1485,6 +1899,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/** @@ -1497,6 +1920,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 f453baa6..62e38c4d 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,9 +110,13 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + } } '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" @@ -115,14 +128,21 @@ params { 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_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,6 +151,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" @@ -144,6 +167,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" @@ -151,6 +175,8 @@ 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" @@ -181,7 +207,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" @@ -222,8 +249,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" @@ -261,6 +288,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" @@ -277,6 +310,9 @@ params { cutandrun_bedgraph_test_2 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_igg_test_1.bedGraph" 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" @@ -303,7 +339,10 @@ params { '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" + } 'illumina' { test1_contigs_fa_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz" @@ -366,7 +405,7 @@ params { 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" 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/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/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/bamcmp/main.nf b/tests/modules/bamcmp/main.nf new file mode 100644 index 00000000..cf796406 --- /dev/null +++ b/tests/modules/bamcmp/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BWA_INDEX } from '../../../modules/bwa/index/main.nf' +include { BWA_MEM } from '../../../modules/bwa/mem/main.nf' +include { BWA_INDEX as BWA_INDEX_COV2 } from '../../../modules/bwa/index/main.nf' +include { BWA_MEM as BWA_MEM_COV2 } from '../../../modules/bwa/mem/main.nf' + +include { SAMTOOLS_SORT } from '../../../modules/samtools/sort/main.nf' +include { SAMTOOLS_SORT as SAMTOOLS_SORT_COV2 } from '../../../modules/samtools/sort/main.nf' + +include { BAMCMP } from '../../../modules/bamcmp/main.nf' + +workflow test_bamcmp { + + input = [ + [ id:'test'], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + fasta1 = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fasta2 = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta1 ) + BWA_MEM ( input, BWA_INDEX.out.index, false ) + SAMTOOLS_SORT (BWA_MEM.out.bam) + + + BWA_INDEX_COV2 ( fasta2 ) + BWA_MEM_COV2 ( input, BWA_INDEX_COV2.out.index, false ) + SAMTOOLS_SORT_COV2 (BWA_MEM_COV2.out.bam) + + BAMCMP (SAMTOOLS_SORT.out.bam.join(SAMTOOLS_SORT_COV2.out.bam, by: [0])) + +} diff --git a/tests/modules/bamcmp/nextflow.config b/tests/modules/bamcmp/nextflow.config new file mode 100644 index 00000000..d3c4858e --- /dev/null +++ b/tests/modules/bamcmp/nextflow.config @@ -0,0 +1,27 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BWA_MEM { + ext.prefix = "human" + } + + withName: BWA_MEM_COV2 { + ext.prefix = "cov2" + } + + withName: SAMTOOLS_SORT { + ext.args = '-n' + ext.prefix = "sorted" + } + + withName: SAMTOOLS_SORT_COV2 { + ext.args = '-n' + ext.prefix = "sorted_cov2" + } + + withName: BAMCMP { + ext.args = '-s "as"' + } + +} diff --git a/tests/modules/bamcmp/test.yml b/tests/modules/bamcmp/test.yml new file mode 100644 index 00000000..58fba458 --- /dev/null +++ b/tests/modules/bamcmp/test.yml @@ -0,0 +1,11 @@ +- name: bamcmp test_bamcmp + command: nextflow run tests/modules/bamcmp -entry test_bamcmp -c tests/config/nextflow.config + tags: + - bamcmp + files: + - path: output/bamcmp/test_contamination.bam + md5sum: 1fe730936d489c637479c1e51dd8ca55 + - path: output/bamcmp/test_primary.bam + md5sum: 80b9abd8ef83e63548a9b8b82be2a034 + - path: output/bamcmp/versions.yml + md5sum: 34d569665ff0459e84114e966dd3483b diff --git a/tests/modules/bamtools/convert/main.nf b/tests/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..bf57f248 --- /dev/null +++ b/tests/modules/bamtools/convert/main.nf @@ -0,0 +1,104 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_EXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_NOEXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_BED } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTA } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTQ } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_JSON } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_PILEUP } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_SAM } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_YAML } from '../../../../modules/bamtools/convert/main.nf' + +workflow test_bamtools_convert_ext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_EXT_ERROR ( input ) +} + +workflow test_bamtools_convert_noext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_NOEXT_ERROR ( input ) +} + +workflow test_bamtools_convert_bed { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_BED ( input ) +} + +workflow test_bamtools_convert_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTA ( input ) +} + +workflow test_bamtools_convert_fastq { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTQ ( input ) +} + +workflow test_bamtools_convert_json { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_JSON ( input ) +} + +workflow test_bamtools_convert_pileup { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_PILEUP ( input ) +} + +workflow test_bamtools_convert_sam { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_SAM ( input ) +} + +workflow test_bamtools_convert_yaml { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_YAML ( input ) +} + diff --git a/tests/modules/bamtools/convert/nextflow.config b/tests/modules/bamtools/convert/nextflow.config new file mode 100644 index 00000000..ae8fe345 --- /dev/null +++ b/tests/modules/bamtools/convert/nextflow.config @@ -0,0 +1,41 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BAMTOOLS_CONVERT_EXT_ERROR { + ext.args = "-format vcf" + } + + withName: BAMTOOLS_CONVERT_NOEXT_ERROR { + ext.args = "" + } + + withName: BAMTOOLS_CONVERT_BED { + ext.args = "-format bed" + } + + withName: BAMTOOLS_CONVERT_FASTA { + ext.args = "-format fasta" + } + + withName: BAMTOOLS_CONVERT_FASTQ { + ext.args = "-format fastq" + } + + withName: BAMTOOLS_CONVERT_JSON { + ext.args = "-format json" + } + + withName: BAMTOOLS_CONVERT_PILEUP { + ext.args = "-format pileup" + } + + withName: BAMTOOLS_CONVERT_SAM { + ext.args = "-format sam" + } + + withName: BAMTOOLS_CONVERT_YAML { + ext.args = "-format yaml" + } + +} diff --git a/tests/modules/bamtools/convert/test.yml b/tests/modules/bamtools/convert/test.yml new file mode 100644 index 00000000..3922ece2 --- /dev/null +++ b/tests/modules/bamtools/convert/test.yml @@ -0,0 +1,90 @@ +- name: bamtools convert test_bamtools_convert_ext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_ext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_noext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_noext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_bed + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_bed -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.bed + md5sum: 4e34cc15bf31e700f5f3a9f8fffb6c81 + - path: output/bamtools/versions.yml + md5sum: eb7a144b8a97965d3482f6f96b8a8243 + +- name: bamtools convert test_bamtools_convert_fasta + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fasta -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fasta + md5sum: 52aeacf78571862b7e97c7d44ac8f827 + - path: output/bamtools/versions.yml + md5sum: 42d19a2b2b07f05edb82b34369dfd754 + +- name: bamtools convert test_bamtools_convert_fastq + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fastq -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fastq + md5sum: e591c48daad2c56638e5d6f21f1f71c5 + - path: output/bamtools/versions.yml + md5sum: 13f0bf8a3e1f8f527f96dabaa5c8051e + +- name: bamtools convert test_bamtools_convert_json + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_json -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.json + md5sum: 04afed696f9f14da85a460353645d1f5 + - path: output/bamtools/versions.yml + md5sum: 33d633dbd6209cb93c9b071f8c0ed3b3 + +- name: bamtools convert test_bamtools_convert_pileup + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_pileup -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.pileup + md5sum: e5a3cb4a3e1bf980a575fafce6a2826f + - path: output/bamtools/versions.yml + md5sum: fd3ad0edd1e085b1a002e0593d1d5814 + +- name: bamtools convert test_bamtools_convert_sam + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_sam -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.sam + md5sum: 61ab3d0de16a9da8b651f9c692e19d5e + - path: output/bamtools/versions.yml + md5sum: 4be470ce3cc0143ae5ae415b612a4965 + +- name: bamtools convert test_bamtools_convert_yaml + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_yaml -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.yaml + md5sum: 68b56f198da036fef33e150eb773dc3b + - path: output/bamtools/versions.yml + md5sum: 1116abc088c5edf11bee393961c18b3e 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/bcftools/query/main.nf b/tests/modules/bcftools/query/main.nf index 733cae17..f40cb0fa 100644 --- a/tests/modules/bcftools/query/main.nf +++ b/tests/modules/bcftools/query/main.nf @@ -6,26 +6,24 @@ include { BCFTOOLS_QUERY } from '../../../../modules/bcftools/query/main.nf' workflow test_bcftools_query { - regions = [] - targets = [] - samples = [] - input = [ [ id:'out' ], // 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)] + regions = [] + targets = [] + samples = [] BCFTOOLS_QUERY ( input, regions, targets, samples ) } workflow test_bcftools_query_with_optional_files { + input = [ [ id:'out' ], // 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)] regions = file(params.test_data['sarscov2']['illumina']['test3_vcf_gz'], checkIfExists: true) targets = file(params.test_data['sarscov2']['illumina']['test2_vcf_targets_tsv_gz'], checkIfExists: true) samples = [] - input = [ [ id:'out' ], // 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)] - BCFTOOLS_QUERY ( input, regions, targets, samples ) } diff --git a/tests/modules/bcftools/query/test.yml b/tests/modules/bcftools/query/test.yml index aaa9af7b..647c62bb 100644 --- a/tests/modules/bcftools/query/test.yml +++ b/tests/modules/bcftools/query/test.yml @@ -4,7 +4,7 @@ - bcftools - bcftools/query files: - - path: output/bcftools/out.vcf.gz + - path: output/bcftools/out.txt md5sum: c32a6d28f185822d8fe1eeb7e42ec155 - name: bcftools query with optional files @@ -13,5 +13,5 @@ - bcftools - bcftools/query files: - - path: output/bcftools/out.vcf.gz + - path: output/bcftools/out.txt md5sum: 6bb5df49bfb5af39f7037cdf95032aac 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/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/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..4565151e --- /dev/null +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -0,0 +1,20 @@ +- 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.tsv + md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/cnvpytor/versions.yml + md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa + +- 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.tsv + - path: output/cnvpytor/versions.yml + md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa 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..0543fcc3 --- /dev/null +++ b/tests/modules/cnvpytor/histogram/test.yml @@ -0,0 +1,20 @@ +- 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 + md5sum: aa03a8fa15b39f77816705a48e10312a + - path: output/cnvpytor/versions.yml + md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 + +- 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 + md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 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..b148c38e --- /dev/null +++ b/tests/modules/cnvpytor/importreaddepth/test.yml @@ -0,0 +1,39 @@ +- 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 + md5sum: 5834495324c08a37f3fd73ccdd881dc8 + +- 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 + md5sum: 5834495324c08a37f3fd73ccdd881dc8 + +- 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 + md5sum: dfa0afb0982d985b96d1633f71ebb82a + +- 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 + md5sum: dfa0afb0982d985b96d1633f71ebb82a 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..10232097 --- /dev/null +++ b/tests/modules/cnvpytor/partition/test.yml @@ -0,0 +1,20 @@ +- 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 + md5sum: aa03a8fa15b39f77816705a48e10312a + - path: output/cnvpytor/versions.yml + md5sum: 7fd6ec952a316463bcd324f176b46b64 + +- 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 + md5sum: 7fd6ec952a316463bcd324f176b46b64 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/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/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 c9aa78da..c3c8e30b 100644 --- a/tests/modules/freebayes/test.yml +++ b/tests/modules/freebayes/test.yml @@ -1,34 +1,49 @@ - name: freebayes test_freebayes - command: nextflow run ./tests/modules/freebayes -entry test_freebayes -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: f28d0b8e2ccedeac0e590ca2ecaac83d + - path: output/freebayes/versions.yml + md5sum: 53651eb835af65df829241257584a7d2 - name: freebayes test_freebayes_bed - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_bed -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_bed -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 1927441d1b7a4c48cbb61821de300ad4 + - path: output/freebayes/versions.yml + md5sum: becc93c8a0be580c09d55b955d60a5e1 - name: freebayes test_freebayes_cram - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_cram -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_cram -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 9b8d1d51d779bbea4086c7f7a2ece641 + - path: output/freebayes/versions.yml + md5sum: 2e5b266edfc6cab81353cfc72c00f67c - name: freebayes test_freebayes_somatic - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: dcaa639912174055c1380913d6102c01 + - path: output/freebayes/versions.yml + md5sum: 8fbdb4c052fb3e42b5508a966125fa05 - name: freebayes test_freebayes_somatic_cram_intervals - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + 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..eaf1a08e 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: d088422be886dc8507ff97fcc7dd968a - 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: 4bfa18d651abd945e240b05e70107716 - 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: 2e0bca197af4f043a4a85152e6edbe04 - 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..d230c000 --- /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: d088422be886dc8507ff97fcc7dd968a + - 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: 4bfa18d651abd945e240b05e70107716 + - 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: 2e0bca197af4f043a4a85152e6edbe04 + - 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..573cc13e --- /dev/null +++ b/tests/modules/gatk4/combinegvcfs/nextflow.config @@ -0,0 +1,6 @@ +process { + + ext.args = "--tmp-dir ." + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file 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..75990958 100644 --- a/tests/modules/gatk4/genotypegvcfs/main.nf +++ b/tests/modules/gatk4/genotypegvcfs/main.nf @@ -9,162 +9,165 @@ 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([]) 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([]) 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)]) 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)]) 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..b0de9d6e 100644 --- a/tests/modules/gatk4/getpileupsummaries/main.nf +++ b/tests/modules/gatk4/getpileupsummaries/main.nf @@ -8,24 +8,45 @@ 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) ] + 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 ) + fasta = [] + fai = [] + dict = [] + GATK4_GETPILEUPSUMMARIES ( input , fasta, fai, dict, variants , variants_tbi ) } 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..2e4acce9 100644 --- a/tests/modules/gatk4/getpileupsummaries/test.yml +++ b/tests/modules/gatk4/getpileupsummaries/test.yml @@ -1,17 +1,29 @@ - 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 + command: nextflow run tests/modules/gatk4/getpileupsummaries -entry test_gatk4_getpileupsummaries_just_variants -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 - 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..5542714b 100644 --- a/tests/modules/gatk4/intervallisttools/test.yml +++ b/tests/modules/gatk4/intervallisttools/test.yml @@ -14,3 +14,4 @@ md5sum: 55da0f3c69504148f4e7002a0e072cfe - path: output/gatk4/test_split/temp_0004_of_6/4scattered.interval_list md5sum: d29ca4447f32547f2936567fa902796a + - 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..1fbd768e 100644 --- a/tests/modules/gatk4/markduplicates/test.yml +++ b/tests/modules/gatk4/markduplicates/test.yml @@ -5,12 +5,11 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: c8f7a9e426c768577f88f59cb1336bf3 + md5sum: e9c125e82553209933883b4fe2b8d7c2 - path: output/gatk4/test.bam - md5sum: fba0c99a0b087c90113a210e4465f91b + md5sum: 2efd50b2e6b7fd9bdf242cd9e266cfa9 - 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: 8187febc6108ffef7f907e89b9c091a4 - 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..0eb6876d 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 + "test_foo.bam", + "test_bar.bam" + ] + fasta = "genome.fasta" + dict = "genome.fasta.dict" + + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) +} diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index 5e1ab8d5..84a67654 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 -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..310e9ca1 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 + [ "foo_paired.bam", + "foo_paired2.bam" + ], + [ "foo_paired.bam.bai", + "foo_paired2.bam.bai" + ], + [] + ] + + fasta = "genome.fasta" + fai = "genome.fasta.fai" + dict = "genome.fasta.dict" + germline_resource = "genome_gnomAD.r2.1.1.vcf.gz" + germline_resource_tbi = "genome_gnomAD.r2.1.1.vcf.gz.tbi" + panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" + panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" + + 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..3853801d 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 -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..738ecd8f 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 + "foo_paired_end.bam" + ] + + GATK4_REVERTSAM ( input ) +} diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 4199b118..89e78659 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 -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..79d04c7c 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: false ], // meta map + [ "foo_paired_end.bam" ] + ] + + GATK4_SAMTOFASTQ ( input ) +} diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index 66d3ee4c..1288a270 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 -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/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..d9a58901 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: 436d8e31285c6b588bdd1c7f1d07f6f2 + - 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: cd56e3225950f519fd47164cca60a0bb - 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..bc84bfb3 100644 --- a/tests/modules/gatk4/variantrecalibrator/test.yml +++ b/tests/modules/gatk4/variantrecalibrator/test.yml @@ -10,6 +10,7 @@ - path: output/gatk4/test.recal.idx - path: output/gatk4/test.tranches md5sum: d238e97bf996863969dac7751e345549 + - 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 @@ -23,3 +24,4 @@ - path: output/gatk4/test.recal.idx - path: output/gatk4/test.tranches md5sum: 444438d46716593634a6817958099292 + - path: output/gatk4/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/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/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/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/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/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/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 15be6973..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: 2563856ee31ba2a4a05705ff940a28cc + 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/extract/main.nf b/tests/modules/plink2/extract/main.nf new file mode 100644 index 00000000..a72e153c --- /dev/null +++ b/tests/modules/plink2/extract/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PLINK2_VCF } from '../../../../modules/plink2/vcf/main.nf' +include { PLINK2_EXTRACT } from '../../../../modules/plink2/extract/main.nf' + +workflow test_plink2_extract { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_vcf_gz'], checkIfExists: true) + ] + PLINK2_VCF ( input ) + + PLINK2_VCF.out.pvar + .splitText(file: 'variants.keep', keepHeader: false, by: 10) + .last() + .set { ch_variants } + + ch_variants.view() + + PLINK2_VCF.out.pgen + .concat(PLINK2_VCF.out.psam, PLINK2_VCF.out.pvar.concat(ch_variants)) + .groupTuple() + .map{ meta, paths -> [meta, paths[0], paths[1], paths[2], paths[3]] } + .set { ch_extract } + + PLINK2_EXTRACT ( ch_extract ) +} diff --git a/tests/modules/plink2/extract/nextflow.config b/tests/modules/plink2/extract/nextflow.config new file mode 100644 index 00000000..2a541c99 --- /dev/null +++ b/tests/modules/plink2/extract/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: PLINK2_VCF { + ext.args = '--make-pgen --set-missing-var-ids @:#:\\$1:\\$2' + } + + withName: PLINK2_EXTRACT { + ext.prefix = { "${meta.id}.extract" } + } +} diff --git a/tests/modules/plink2/extract/test.yml b/tests/modules/plink2/extract/test.yml new file mode 100644 index 00000000..737ca215 --- /dev/null +++ b/tests/modules/plink2/extract/test.yml @@ -0,0 +1,20 @@ +- name: plink2 extract test_plink2_extract + command: nextflow run tests/modules/plink2/extract -entry test_plink2_extract -c tests/config/nextflow.config + tags: + - plink2/extract + - plink2 + files: + - path: output/plink2/test.extract.pgen + md5sum: 785e729a293ecabb0d39394865316bda + - path: output/plink2/test.extract.psam + md5sum: e6c714488754cb8448c3dfda08c4c0ea + - path: output/plink2/test.extract.pvar.zst + md5sum: 076767e6695e681115eabb924a447ee9 + - path: output/plink2/test.pgen + md5sum: fac12ca9041d6950f6b7d60ac2120721 + - path: output/plink2/test.psam + md5sum: e6c714488754cb8448c3dfda08c4c0ea + - path: output/plink2/test.pvar + md5sum: ff9e44f8e5f4035d8cf2bfe7be6755b3 + - path: output/plink2/versions.yml + md5sum: c477b7c9f6e39b89710fe1a0bceee50d 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/raven/main.nf b/tests/modules/raven/main.nf new file mode 100644 index 00000000..01b04519 --- /dev/null +++ b/tests/modules/raven/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RAVEN } from '../../../modules/raven/main.nf' + +workflow test_raven { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['bacteroides_fragilis']['nanopore']['test_fastq_gz'], checkIfExists: true) ] + ] + + RAVEN ( input ) +} diff --git a/tests/modules/raven/nextflow.config b/tests/modules/raven/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/raven/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/raven/test.yml b/tests/modules/raven/test.yml new file mode 100644 index 00000000..bbede642 --- /dev/null +++ b/tests/modules/raven/test.yml @@ -0,0 +1,9 @@ +- name: raven test_raven + command: nextflow run ./tests/modules/raven -entry test_raven -c ./tests/config/nextflow.config -c ./tests/modules/raven/nextflow.config + tags: + - raven + files: + - path: output/raven/test.fasta.gz + md5sum: b026b6aba793a9f2bbfb17f732c91926 + - path: output/raven/test.gfa.gz + md5sum: 09053490495f6deb7a3941e559cda626 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/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..213c7a2d 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -14,9 +14,9 @@ - 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 diff --git a/tests/modules/samtools/bamtocram/main.nf b/tests/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b1743310 --- /dev/null +++ b/tests/modules/samtools/bamtocram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_BAMTOCRAM } from '../../../../modules/samtools/bamtocram/main.nf' + +workflow test_samtools_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 ) +} \ No newline at end of file diff --git a/tests/modules/samtools/bamtocram/nextflow.config b/tests/modules/samtools/bamtocram/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/bamtocram/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/bamtocram/test.yml b/tests/modules/samtools/bamtocram/test.yml new file mode 100644 index 00000000..3cb82902 --- /dev/null +++ b/tests/modules/samtools/bamtocram/test.yml @@ -0,0 +1,9 @@ +- name: samtools bamtocram test_samtools_bamtocram + command: nextflow run ./tests/modules/samtools/bamtocram -entry test_samtools_bamtocram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bamtocram/nextflow.config + tags: + - samtools/bamtocram + - samtools + files: + - path: output/samtools/test.cram + - path: output/samtools/test.cram.crai + - path: output/samtools/versions.yml 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/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..bdad1078 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 + "foo_paired_end.bam", + [] + ] + + SAMTOOLS_VIEW ( input, [] ) +} diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 1287d455..2718130e 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 -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/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/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/snapaligner/paired/main.nf b/tests/modules/snapaligner/paired/main.nf new file mode 100644 index 00000000..b25ca8c2 --- /dev/null +++ b/tests/modules/snapaligner/paired/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' +include { SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/paired/main.nf' + +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/paired/nextflow.config b/tests/modules/snapaligner/paired/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/snapaligner/paired/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/paired/test.yml b/tests/modules/snapaligner/paired/test.yml new file mode 100644 index 00000000..7df1e02b --- /dev/null +++ b/tests/modules/snapaligner/paired/test.yml @@ -0,0 +1,9 @@ +- name: snapaligner paired test_snapaligner_paired + command: nextflow run tests/modules/snapaligner/paired -entry test_snapaligner_paired -c tests/config/nextflow.config + tags: + - snapaligner + - snapaligner/paired + files: + - path: output/snapaligner/test.bam + md5sum: 2ac92e9539fa246dd6db52b5de56fca5 + - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/single/main.nf b/tests/modules/snapaligner/single/main.nf new file mode 100644 index 00000000..616e517a --- /dev/null +++ b/tests/modules/snapaligner/single/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' +include { SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/single/main.nf' + +workflow test_snapaligner_single { + + input = [ + [ id:'test', single_end:false ], // 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 ) +} diff --git a/tests/modules/snapaligner/single/nextflow.config b/tests/modules/snapaligner/single/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/snapaligner/single/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/single/test.yml b/tests/modules/snapaligner/single/test.yml new file mode 100644 index 00000000..bbcbba1f --- /dev/null +++ b/tests/modules/snapaligner/single/test.yml @@ -0,0 +1,9 @@ +- name: snapaligner single test_snapaligner_single + command: nextflow run tests/modules/snapaligner/single -entry test_snapaligner_single -c tests/config/nextflow.config + tags: + - snapaligner/single + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: 696f7ea8e1aa5f9d7dafb9d0134fe25d + - 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..c2b98526 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 ) } 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 ) } 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 new file mode 100644 index 00000000..3cbb4b44 --- /dev/null +++ b/tests/modules/svdb/merge/main.nf @@ -0,0 +1,26 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVDB_MERGE } from '../../../../modules/svdb/merge/main.nf' + +workflow test_svdb_merge { + + 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) ] + ] + priority = [ 'tiddit', 'cnvnator'] + + 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/nextflow.config b/tests/modules/svdb/merge/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/svdb/merge/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/svdb/merge/test.yml b/tests/modules/svdb/merge/test.yml new file mode 100644 index 00000000..46c4fef0 --- /dev/null +++ b/tests/modules/svdb/merge/test.yml @@ -0,0 +1,14 @@ +- name: svdb merge + command: nextflow run ./tests/modules/svdb/merge -entry test_svdb_merge -c ./tests/config/nextflow.config -c ./tests/modules/svdb/merge/nextflow.config + tags: + - svdb + - 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 new file mode 100644 index 00000000..c014320f --- /dev/null +++ b/tests/modules/svdb/query/main.nf @@ -0,0 +1,42 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVDB_QUERY } from '../../../../modules/svdb/query/main.nf' + +workflow test_svdb_query { + + 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) + ] + + 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 new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/svdb/query/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/svdb/query/test.yml b/tests/modules/svdb/query/test.yml new file mode 100644 index 00000000..a7cbe3a6 --- /dev/null +++ b/tests/modules/svdb/query/test.yml @@ -0,0 +1,15 @@ +- name: svdb query + command: nextflow run ./tests/modules/svdb/query -entry test_svdb_query -c ./tests/config/nextflow.config -c ./tests/modules/svdb/query/nextflow.config + tags: + - svdb + - svdb/query + files: + - 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/transdecoder/longorf/main.nf b/tests/modules/transdecoder/longorf/main.nf new file mode 100644 index 00000000..90f75d19 --- /dev/null +++ b/tests/modules/transdecoder/longorf/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { TRANSDECODER_LONGORF } from '../../../../modules/transdecoder/longorf/main.nf' + +workflow test_transdecoder_longorf { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + TRANSDECODER_LONGORF ( input ) +} diff --git a/tests/modules/transdecoder/longorf/nextflow.config b/tests/modules/transdecoder/longorf/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/transdecoder/longorf/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/transdecoder/longorf/test.yml b/tests/modules/transdecoder/longorf/test.yml new file mode 100644 index 00000000..4e88f0e8 --- /dev/null +++ b/tests/modules/transdecoder/longorf/test.yml @@ -0,0 +1,16 @@ +- name: transdecoder longorf test_transdecoder_longorf + command: nextflow run tests/modules/transdecoder/longorf -entry test_transdecoder_longorf -c tests/config/nextflow.config + tags: + - transdecoder + - transdecoder/longorf + files: + - path: output/transdecoder/versions.yml + md5sum: 15cffd5b1119e63d52dc754caf0f2d3c + - path: output/transdecoder/test/base_freqs.dat + md5sum: 5226ef383532e9b16c16b03e35ce181e + - path: output/transdecoder/test/longest_orfs.cds + md5sum: 041ac609e4c4ffb38676b1f88365be0f + - path: output/transdecoder/test/longest_orfs.gff3 + md5sum: 96062ef88364f6bf1368d65cd1aad350 + - path: output/transdecoder/test/longest_orfs.pep + md5sum: 0b903d36040676efeb2c50ab5ba46bbd diff --git a/tests/modules/transdecoder/predict/main.nf b/tests/modules/transdecoder/predict/main.nf new file mode 100644 index 00000000..02026a37 --- /dev/null +++ b/tests/modules/transdecoder/predict/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { TRANSDECODER_PREDICT } from '../../../../modules/transdecoder/predict/main.nf' +include { TRANSDECODER_LONGORF } from '../../../../modules/transdecoder/longorf/main.nf' + +workflow test_transdecoder_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + + TRANSDECODER_LONGORF ( input ) + TRANSDECODER_PREDICT ( input, TRANSDECODER_LONGORF.out.folder ) + +} + diff --git a/tests/modules/transdecoder/predict/nextflow.config b/tests/modules/transdecoder/predict/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/transdecoder/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/transdecoder/predict/test.yml b/tests/modules/transdecoder/predict/test.yml new file mode 100644 index 00000000..cf2c0d07 --- /dev/null +++ b/tests/modules/transdecoder/predict/test.yml @@ -0,0 +1,12 @@ +- name: transdecoder predict test_transdecoder_predict + command: nextflow run tests/modules/transdecoder/predict -entry test_transdecoder_predict -c tests/config/nextflow.config + tags: + - transdecoder + - transdecoder/predict + files: + - path: output/transdecoder/genome.fasta.transdecoder.bed + - path: output/transdecoder/genome.fasta.transdecoder.cds + - path: output/transdecoder/genome.fasta.transdecoder.gff3 + - path: output/transdecoder/genome.fasta.transdecoder.pep + - path: output/transdecoder/versions.yml + md5sum: 2847cc159dc93e9014b57d76987623ea 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..d392358a --- /dev/null +++ b/tests/modules/vardictjava/main.nf @@ -0,0 +1,23 @@ +#!/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) + ]) + + bed = Channel.value(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, bed, 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/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