Merge branch 'master' into expected_error_fix

This commit is contained in:
Chris Cheshire 2022-05-03 11:49:35 +01:00 committed by GitHub
commit 61f68913fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1511 changed files with 26891 additions and 6584 deletions

View file

@ -8,5 +8,5 @@ trim_trailing_whitespace = true
indent_size = 4 indent_size = 4
indent_style = space indent_style = space
[*.{yml,yaml}] [*.{md,yml,yaml}]
indent_size = 2 indent_size = 2

View file

@ -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: 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 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 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) 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) 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)). 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 ### 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). For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).

View file

@ -1,64 +0,0 @@
---
name: Bug report
about: Report something that is broken or incorrect
title: "[BUG]"
---
<!--
# nf-core/module bug report
Hi there!
Thanks for telling us about a problem with the modules.
Please delete this text and anything that's not relevant from the template below:
-->
## 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
<!-- A clear and concise description of what the bug is. -->
## Steps to reproduce
Steps to reproduce the behaviour:
1. Command line: <!-- [e.g. `nextflow run ...`] -->
2. See error: <!-- [Please provide your error message] -->
## Expected behaviour
<!-- A clear and concise description of what you expected to happen. -->
## Log files
Have you provided the following extra information/files:
- [ ] The command used to run the module
- [ ] The `.nextflow.log` file <!-- this is a hidden file in the directory where you launched the module -->
## System
- Hardware: <!-- [e.g. HPC, Desktop, Cloud...] -->
- Executor: <!-- [e.g. slurm, local, awsbatch...] -->
- OS: <!-- [e.g. CentOS Linux, macOS, Linux Mint...] -->
- Version <!-- [e.g. 7, 10.13.6, 18.3...] -->
## Nextflow Installation
- Version: <!-- [e.g. 19.10.0] -->
## Container engine
- Engine: <!-- [e.g. Conda, Docker, Singularity or Podman] -->
- version: <!-- [e.g. 1.0.0] -->
- Image tag: <!-- [e.g. nfcore/module:2.6] -->
## Additional context
<!-- Add any other context about the problem here. -->

52
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View file

@ -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: <!-- [e.g. nfcore/cellranger:2.6] -->

View file

@ -1,32 +0,0 @@
---
name: Feature request
about: Suggest an idea for nf-core/modules
title: "[FEATURE]"
---
<!--
# nf-core/modules feature request
Hi there!
Thanks for suggesting a new feature for the modules!
Please delete this text and anything that's not relevant from the template below:
-->
## Is your feature request related to a problem? Please describe
<!-- A clear and concise description of what the problem is. -->
<!-- e.g. [I'm always frustrated when ...] -->
## Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
## Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
## Additional context
<!-- Add any other context about the feature request here. -->

View file

@ -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: |
<!-- e.g. [I'm always frustrated when ...] -->
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.

View file

@ -1,26 +0,0 @@
---
name: New module
about: Suggest a new module for nf-core/modules
title: "new module: TOOL/SUBTOOL"
label: new module
---
<!--
# nf-core/modules new module suggestion
Hi there!
Thanks for suggesting a new module for the modules!
Please delete this text and anything that's not relevant from the template below:
Replace TOOL with the bioconda name for the tool in the following text, so that the link is functional.
Replace TOOL/SUBTOOL in the issue title so that it's understandable.
-->
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

36
.github/ISSUE_TEMPLATE/new_module.yml vendored Normal file
View file

@ -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

View file

@ -27,6 +27,6 @@ Closes #XXX <!-- If this PR fixes an issue, please link it here! -->
- [ ] Add a resource `label` - [ ] Add a resource `label`
- [ ] Use BioConda and BioContainers if possible to fulfil software requirements. - [ ] 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: - Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
- [ ] `PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`
- [ ] `PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`
- [ ] `PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`

View file

@ -5,51 +5,31 @@ on:
pull_request: pull_request:
branches: [master] branches: [master]
jobs: jobs:
Markdown: Prettier:
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:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install NodeJS - name: Install NodeJS
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with:
node-version: "10"
- name: Install yaml-lint - name: Install Prettier
run: npm install -g yaml-lint run: npm install -g prettier
- name: Run yaml-lint - name: Run Prettier --check
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yaml" -or -name "*.yml") 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)

View file

@ -86,17 +86,13 @@ jobs:
# Test the module # Test the module
- name: Run pytest-workflow - name: Run pytest-workflow
# only use one thread for pytest-workflow to avoid race condition on conda cache. # 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 - name: Output log on failure
if: failure() if: failure()
run: | run: |
echo "======> log.out <=======" sudo apt install bat > /dev/null
cat /home/runner/pytest_workflow_*/*/log.out batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err}
echo
echo
echo "======> log.err <======="
cat /home/runner/pytest_workflow_*/*/log.err
- name: Upload logs on failure - name: Upload logs on failure
if: failure() if: failure()

View file

@ -1,10 +1,14 @@
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ image: nfcore/gitpod:latest
tasks:
- name: Install Nextflow
init: |
curl -s https://get.nextflow.io | bash
sudo mv nextflow /usr/local/bin
- name: Install pytest-workflow vscode:
init: | extensions: # based on nf-core.nf-core-extensionpack
pip install pytest-workflow - 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

View file

@ -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

View file

@ -1,3 +1,4 @@
repository_type: modules
bump-versions: bump-versions:
rseqc/junctionannotation: False rseqc/junctionannotation: False
rseqc/bamstat: False rseqc/bamstat: False

16
.prettierignore Normal file
View file

@ -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

1
.prettierrc.yml Normal file
View file

@ -0,0 +1 @@
printWidth: 120

144
README.md
View file

@ -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`) 1. Install the latest version of [`nf-core/tools`](https://github.com/nf-core/tools#installation) (`>=2.0`)
2. List the available modules: 2. List the available modules:
```console ```console
$ nf-core modules list remote $ 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 ┃ ┃ Module Name ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ bandage/image │ │ bandage/image │
│ bcftools/consensus │ │ bcftools/consensus │
│ bcftools/filter │ │ bcftools/filter │
│ bcftools/isec │ │ bcftools/isec │
..truncated.. ..truncated..
``` ```
3. Install the module in your pipeline directory: 3. Install the module in your pipeline directory:
```console ```console
$ nf-core modules install fastqc $ 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 Installing fastqc pipeline_modules.py:213
INFO Downloaded 3 files to ./modules/nf-core/modules/fastqc pipeline_modules.py:236 INFO Downloaded 3 files to ./modules/nf-core/modules/fastqc pipeline_modules.py:236
``` ```
4. Import the module in your Nextflow script: 4. Import the module in your Nextflow script:
```nextflow ```nextflow
#!/usr/bin/env 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: 5. Remove the module from the pipeline repository if required:
```console ```console
$ nf-core modules remove fastqc $ 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 Removing fastqc pipeline_modules.py:271
INFO Successfully removed fastqc pipeline_modules.py:285 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: 6. Check that a locally installed nf-core module is up-to-date compared to the one hosted in this repo:
```console ```console
$ nf-core modules lint fastqc $ 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 pipeline: . lint.py:104
INFO Linting module: fastqc lint.py:106 INFO Linting module: fastqc lint.py:106
╭─────────────────────────────────────────────────────────────────────────────────╮ ╭─────────────────────────────────────────────────────────────────────────────────╮
│ [!] 1 Test Warning │ │ [!] 1 Test Warning │
╰─────────────────────────────────────────────────────────────────────────────────╯ ╰─────────────────────────────────────────────────────────────────────────────────╯
╭──────────────┬───────────────────────────────┬──────────────────────────────────╮ ╭──────────────┬───────────────────────────────┬──────────────────────────────────╮
│ Module name │ Test message │ File path │ │ Module name │ Test message │ File path │
├──────────────┼───────────────────────────────┼──────────────────────────────────┤ ├──────────────┼───────────────────────────────┼──────────────────────────────────┤
│ fastqc │ Local copy of module outdated │ modules/nf-core/modules/fastqc/ │ │ fastqc │ Local copy of module outdated │ modules/nf-core/modules/fastqc/ │
╰──────────────┴────────────────────────────── ┴──────────────────────────────────╯ ╰──────────────┴────────────────────────────── ┴──────────────────────────────────╯
╭──────────────────────╮ ╭──────────────────────╮
│ LINT RESULTS SUMMARY │ │ LINT RESULTS SUMMARY │
├──────────────────────┤ ├──────────────────────┤
│ [✔] 15 Tests Passed │ │ [✔] 15 Tests Passed │
│ [!] 1 Test Warning │ │ [!] 1 Test Warning │
│ [✗] 0 Test Failed │ │ [✗] 0 Test Failed │
╰──────────────────────╯ ╰──────────────────────╯
``` ```
## Adding new modules ## 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 :) > Please be kind to our code reviewers and submit one pull request per module :)

View file

@ -15,6 +15,9 @@ process ABACAS {
tuple val(meta), path('*.abacas*'), emit: results tuple val(meta), path('*.abacas*'), emit: results
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -14,7 +14,7 @@ tools:
documentation: http://abacas.sourceforge.net/documentation.html documentation: http://abacas.sourceforge.net/documentation.html
tool_dev_url: None tool_dev_url: None
doi: "10.1093/bioinformatics/btp347" doi: "10.1093/bioinformatics/btp347"
licence: ['GPL v2-or-later'] licence: ["GPL v2-or-later"]
input: input:
- meta: - meta:

View file

@ -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
"""
}

View file

@ -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"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -9,46 +9,46 @@ process ADAPTERREMOVAL {
input: input:
tuple val(meta), path(reads) tuple val(meta), path(reads)
path(adapterlist)
output: output:
tuple val(meta), path('*.fastq.gz'), emit: reads tuple val(meta), path("${prefix}.truncated.fastq.gz") , optional: true, emit: singles_truncated
tuple val(meta), path('*.log') , emit: log tuple val(meta), path("${prefix}.discarded.fastq.gz") , optional: true, emit: discarded
path "versions.yml" , emit: versions 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: script:
def args = task.ext.args ?: '' 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) { if (meta.single_end) {
""" """
AdapterRemoval \\ AdapterRemoval \\
--file1 $reads \\ --file1 $reads \\
$args \\ $args \\
--basename $prefix \\ $adapterlist \\
--threads $task.cpus \\ --basename ${prefix} \\
--settings ${prefix}.log \\ --threads ${task.cpus} \\
--output1 ${prefix}.trimmed.fastq.gz \\
--seed 42 \\ --seed 42 \\
--gzip \\ --gzip
cat <<-END_VERSIONS > versions.yml ensure_fastq() {
"${task.process}": if [ -f "\${1}" ]; then
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g") mv "\${1}" "\${1::-3}.fastq.gz"
END_VERSIONS fi
"""
} else if (!meta.single_end && !meta.collapse) { }
"""
AdapterRemoval \\ ensure_fastq '${prefix}.truncated.gz'
--file1 ${reads[0]} \\ ensure_fastq '${prefix}.discarded.gz'
--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 \\
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
@ -60,15 +60,28 @@ process ADAPTERREMOVAL {
AdapterRemoval \\ AdapterRemoval \\
--file1 ${reads[0]} \\ --file1 ${reads[0]} \\
--file2 ${reads[1]} \\ --file2 ${reads[1]} \\
--collapse \\
$args \\ $args \\
--basename $prefix \\ $adapterlist \\
--basename ${prefix} \\
--threads $task.cpus \\ --threads $task.cpus \\
--settings ${prefix}.log \\
--seed 42 \\ --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 cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g") adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")

View file

@ -1,50 +1,90 @@
name: adapterremoval name: adapterremoval
description: Trim sequencing adapters and collapse overlapping reads description: Trim sequencing adapters and collapse overlapping reads
keywords: keywords:
- trimming - trimming
- adapters - adapters
- merging - merging
- fastq - fastq
tools: tools:
- adapterremoval: - adapterremoval:
description: The AdapterRemoval v2 tool for merging and clipping reads. description: The AdapterRemoval v2 tool for merging and clipping reads.
homepage: https://github.com/MikkelSchubert/adapterremoval homepage: https://github.com/MikkelSchubert/adapterremoval
documentation: https://adapterremoval.readthedocs.io documentation: https://adapterremoval.readthedocs.io
licence: ['GPL v3'] licence: ["GPL v3"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false, collapse:false ] e.g. [ id:'test', single_end:false ]
- reads: - reads:
type: file type: file
description: | description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data, List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively. respectively.
pattern: "*.{fq,fastq,fg.gz,fastq.gz}" 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: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- reads: - singles_truncated:
type: file type: file
description: | description: |
List of input adapter trimmed FastQ files of size 1 or 2 for Adapter trimmed FastQ files of either single-end reads, or singleton
single-end or collapsed data and paired-end data, respectively. 'orphaned' reads from merging of paired-end data (i.e., one of the pair
pattern: "*.{fastq.gz}" was lost due to filtering thresholds).
- log: pattern: "*.truncated.fastq.gz"
type: file - discarded:
description: AdapterRemoval log file type: file
pattern: "*.log" description: |
- versions: Adapter trimmed FastQ files of reads that did not pass filtering
type: file thresholds.
description: File containing software versions pattern: "*.discarded.fastq.gz"
pattern: "versions.yml" - 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: authors:
- "@maxibor" - "@maxibor"
- "@jfy133"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -15,6 +15,9 @@ process AGRVATE {
path "${fasta.baseName}-results" , emit: results_dir path "${fasta.baseName}-results" , emit: results_dir
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -11,7 +11,7 @@ tools:
documentation: https://github.com/VishnuRaghuram94/AgrVATE documentation: https://github.com/VishnuRaghuram94/AgrVATE
tool_dev_url: https://github.com/VishnuRaghuram94/AgrVATE tool_dev_url: https://github.com/VishnuRaghuram94/AgrVATE
doi: "" doi: ""
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:

View file

@ -16,6 +16,9 @@ process ALLELECOUNTER {
tuple val(meta), path("*.alleleCount"), emit: allelecount tuple val(meta), path("*.alleleCount"), emit: allelecount
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -32,8 +32,8 @@ input:
description: loci file <CHR><tab><POS1> description: loci file <CHR><tab><POS1>
pattern: "*.{tsv}" pattern: "*.{tsv}"
- fasta: - fasta:
type: file type: file
description: Input genome fasta file. Required when passing CRAM files. description: Input genome fasta file. Required when passing CRAM files.
output: output:
- meta: - meta:

View file

@ -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
"""
}

View file

@ -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"

View file

@ -18,6 +18,9 @@ process AMPS {
path "results/pdf_candidate_profiles/" , emit: candidate_pdfs path "results/pdf_candidate_profiles/" , emit: candidate_pdfs
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
""" """

View file

@ -24,7 +24,7 @@ tools:
documentation: "https://github.com/keyfm/amps" documentation: "https://github.com/keyfm/amps"
tool_dev_url: "https://github.com/keyfm/amps" tool_dev_url: "https://github.com/keyfm/amps"
doi: "10.1186/s13059-019-1903-0" doi: "10.1186/s13059-019-1903-0"
licence: ['GPL >=3'] licence: ["GPL >=3"]
input: input:
- maltextract_results: - maltextract_results:

View file

@ -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
"""
}

View file

@ -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"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -17,6 +17,9 @@ process ARRIBA {
tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -10,7 +10,7 @@ tools:
documentation: https://arriba.readthedocs.io/en/latest/ documentation: https://arriba.readthedocs.io/en/latest/
tool_dev_url: https://github.com/suhrig/arriba tool_dev_url: https://github.com/suhrig/arriba
doi: "10.1101/gr.257246.119" doi: "10.1101/gr.257246.119"
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:

View file

@ -14,6 +14,9 @@ process ARTIC_GUPPYPLEX {
tuple val(meta), path("*.fastq.gz"), emit: fastq tuple val(meta), path("*.fastq.gz"), emit: fastq
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -11,7 +11,7 @@ tools:
documentation: https://artic.readthedocs.io/en/latest/ documentation: https://artic.readthedocs.io/en/latest/
tool_dev_url: https://github.com/artic-network/fieldbioinformatics tool_dev_url: https://github.com/artic-network/fieldbioinformatics
doi: "" doi: ""
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:

View file

@ -13,7 +13,8 @@ process ARTIC_MINION {
path sequencing_summary path sequencing_summary
path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.reference.fasta") path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.reference.fasta")
path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.scheme.bed") 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
val scheme_version val scheme_version
@ -31,6 +32,9 @@ process ARTIC_MINION {
tuple val(meta), path("*.json"), optional:true , emit: json tuple val(meta), path("*.json"), optional:true , emit: json
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"
@ -41,7 +45,7 @@ process ARTIC_MINION {
if (args.tokenize().contains('--medaka')) { if (args.tokenize().contains('--medaka')) {
fast5 = "" fast5 = ""
summary = "" 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" 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"
""" """

View file

@ -1,6 +1,6 @@
name: artic_minion name: artic_minion
description: | description: |
Run the alignment/variant-call/consensus logic of the artic pipeline Run the alignment/variant-call/consensus logic of the artic pipeline
keywords: keywords:
- artic - artic
- aggregate - aggregate
@ -12,7 +12,7 @@ tools:
documentation: https://artic.readthedocs.io/en/latest/ documentation: https://artic.readthedocs.io/en/latest/
tool_dev_url: https://github.com/artic-network/fieldbioinformatics tool_dev_url: https://github.com/artic-network/fieldbioinformatics
doi: "" doi: ""
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
@ -21,11 +21,11 @@ input:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- fastq: - fastq:
type: file type: file
description: FastQ file containing reads description: FastQ file containing reads
pattern: "*.{fastq.gz}" pattern: "*.{fastq.gz}"
- fast5_dir: - fast5_dir:
type: directory type: directory
description: Directory containing MinION FAST5 files description: Directory containing MinION FAST5 files
pattern: "*" pattern: "*"
- sequencing_summary: - sequencing_summary:
type: file type: file
@ -42,11 +42,16 @@ input:
bed files containing coordinates of each primer in the scheme, bed files containing coordinates of each primer in the scheme,
relative to the reference genome relative to the reference genome
pattern: "*.{scheme.bed}" pattern: "*.{scheme.bed}"
- medaka_model: - medaka_model_file:
type: file type: file
description: | description: |
Medaka model to use (if option --medaka is set) Medaka model file to use (if option --medaka is set)
pattern: "*.*" pattern: "*.hdf5"
- medaka_model_string:
type: value
description: |
Medaka model string to use (if option --medaka is set)
pattern: "*"
- scheme: - scheme:
type: value type: value
description: Name of the primer scheme description: Name of the primer scheme

155
modules/ascat/main.nf Normal file
View file

@ -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
"""
}

92
modules/ascat/meta.yml Normal file
View file

@ -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"

View file

@ -14,6 +14,9 @@ process ASSEMBLYSCAN {
tuple val(meta), path("*.json"), emit: json tuple val(meta), path("*.json"), emit: json
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -10,7 +10,7 @@ tools:
documentation: https://github.com/rpetit3/assembly-scan documentation: https://github.com/rpetit3/assembly-scan
tool_dev_url: https://github.com/rpetit3/assembly-scan tool_dev_url: https://github.com/rpetit3/assembly-scan
doi: "" doi: ""
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:

View file

@ -19,6 +19,9 @@ process ATAQV_ATAQV {
tuple val(meta), path("*.problems") , emit: problems, optional: true tuple val(meta), path("*.problems") , emit: problems, optional: true
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -9,7 +9,7 @@ tools:
documentation: https://github.com/ParkerLab/ataqv/blob/master/README.rst documentation: https://github.com/ParkerLab/ataqv/blob/master/README.rst
tool_dev_url: https://github.com/ParkerLab/ataqv tool_dev_url: https://github.com/ParkerLab/ataqv
doi: "https://doi.org/10.1016/j.cels.2020.02.009" doi: "https://doi.org/10.1016/j.cels.2020.02.009"
licence: ['GPL v3'] licence: ["GPL v3"]
input: input:
- meta: - meta:

View file

@ -2,10 +2,10 @@ process BAKTA {
tag "$meta.id" tag "$meta.id"
label 'process_medium' 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 ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bakta:1.2.2--pyhdfd78af_0' : 'https://depot.galaxyproject.org/singularity/bakta:1.4.0--pyhdfd78af_1' :
'quay.io/biocontainers/bakta:1.2.2--pyhdfd78af_0' }" 'quay.io/biocontainers/bakta:1.4.0--pyhdfd78af_1' }"
input: input:
tuple val(meta), path(fasta) 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.tsv"), emit: hypotheticals_tsv
tuple val(meta), path("${prefix}.hypotheticals.faa"), emit: hypotheticals_faa tuple val(meta), path("${prefix}.hypotheticals.faa"), emit: hypotheticals_faa
tuple val(meta), path("${prefix}.tsv") , emit: tsv tuple val(meta), path("${prefix}.tsv") , emit: tsv
tuple val(meta), path("${prefix}.txt") , emit: txt
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"
@ -58,6 +62,7 @@ process BAKTA {
touch ${prefix}.hypotheticals.tsv touch ${prefix}.hypotheticals.tsv
touch ${prefix}.hypotheticals.faa touch ${prefix}.hypotheticals.faa
touch ${prefix}.tsv touch ${prefix}.tsv
touch ${prefix}.txt
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -1,17 +1,17 @@
name: bakta name: bakta
description: Rapid annotation of bacterial genomes & plasmids. description: Annotation of bacterial genomes (isolates, MAGs) and plasmids
keywords: keywords:
- annotation - annotation
- fasta - fasta
- prokaryote - bacteria
tools: tools:
- bakta: - bakta:
description: Rapid & standardized annotation of bacterial genomes & plasmids. description: Rapid & standardized annotation of bacterial genomes, MAGs & plasmids.
homepage: https://github.com/oschwengers/bakta homepage: https://github.com/oschwengers/bakta
documentation: https://github.com/oschwengers/bakta documentation: https://github.com/oschwengers/bakta
tool_dev_url: https://github.com/oschwengers/bakta tool_dev_url: https://github.com/oschwengers/bakta
doi: "10.1099/mgen.0.000685" doi: "10.1099/mgen.0.000685"
licence: ['GPL v3'] licence: ["GPL v3"]
input: input:
- meta: - meta:
@ -29,7 +29,7 @@ input:
Path to the Bakta database Path to the Bakta database
- proteins: - proteins:
type: file 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: - prodigal_tf:
type: file type: file
description: Training file to use for Prodigal (optional) description: Training file to use for Prodigal (optional)
@ -44,6 +44,10 @@ output:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
- txt:
type: file
description: genome statistics and annotation summary
pattern: "*.txt"
- tsv: - tsv:
type: file type: file
description: annotations as simple human readble tab separated values description: annotations as simple human readble tab separated values
@ -74,7 +78,7 @@ output:
pattern: "*.ffn" pattern: "*.ffn"
- hypotheticals_tsv: - hypotheticals_tsv:
type: file 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" pattern: "*.hypotheticals.tsv"
- hypotheticals_faa: - hypotheticals_faa:
type: file type: file
@ -83,3 +87,4 @@ output:
authors: authors:
- "@rpetit3" - "@rpetit3"
- "@oschwengers"

View file

@ -14,6 +14,9 @@ process BAMALIGNCLEANER {
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -8,7 +8,7 @@ tools:
homepage: https://github.com/maxibor/bamAlignCleaner homepage: https://github.com/maxibor/bamAlignCleaner
documentation: https://github.com/maxibor/bamAlignCleaner documentation: https://github.com/maxibor/bamAlignCleaner
tool_dev_url: https://github.com/maxibor/bamAlignCleaner tool_dev_url: https://github.com/maxibor/bamAlignCleaner
licence: ['GPL v3'] licence: ["GPL v3"]
input: input:
- meta: - meta:

38
modules/bamcmp/main.nf Normal file
View file

@ -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
"""
}

58
modules/bamcmp/meta.yml Normal file
View file

@ -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"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -2,10 +2,10 @@ process BAMTOOLS_SPLIT {
tag "$meta.id" tag "$meta.id"
label 'process_low' 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 ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' :
'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }"
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
@ -14,14 +14,21 @@ process BAMTOOLS_SPLIT {
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def input_list = bam.collect{"-in $it"}.join(' ')
""" """
bamtools \\ bamtools \\
split \\ merge \\
-in $bam \\ $input_list \\
$args | bamtools \\
split \\
-stub $prefix \\
$args
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -13,7 +13,7 @@ tools:
documentation: https://github.com/pezmaster31/bamtools/wiki documentation: https://github.com/pezmaster31/bamtools/wiki
tool_dev_url: http://github.com/pezmaster31/bamtools tool_dev_url: http://github.com/pezmaster31/bamtools
doi: "" doi: ""
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
@ -23,7 +23,7 @@ input:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bam: - bam:
type: file type: file
description: A BAM file to split description: A list of one or more BAM files to merge and then split
pattern: "*.bam" pattern: "*.bam"
output: output:
@ -43,3 +43,4 @@ output:
authors: authors:
- "@sguizard" - "@sguizard"
- "@matthdsm"

View file

@ -14,6 +14,9 @@ process BAMUTIL_TRIMBAM {
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -13,7 +13,7 @@ tools:
documentation: https://genome.sph.umich.edu/wiki/BamUtil:_trimBam documentation: https://genome.sph.umich.edu/wiki/BamUtil:_trimBam
tool_dev_url: https://github.com/statgen/bamUtil tool_dev_url: https://github.com/statgen/bamUtil
doi: "10.1101/gr.176552.114" doi: "10.1101/gr.176552.114"
licence: ['GPL v3'] licence: ["GPL v3"]
input: input:
- meta: - meta:

View file

@ -15,6 +15,9 @@ process BANDAGE_IMAGE {
tuple val(meta), path('*.svg'), emit: svg tuple val(meta), path('*.svg'), emit: svg
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,44 +1,44 @@
name: bandage_image name: bandage_image
description: Render an assembly graph in GFA 1.0 format to PNG and SVG image formats description: Render an assembly graph in GFA 1.0 format to PNG and SVG image formats
keywords: keywords:
- gfa - gfa
- graph - graph
- assembly - assembly
- visualisation - visualisation
tools: tools:
- bandage: - bandage:
description: | description: |
Bandage - a Bioinformatics Application for Navigating De novo Assembly Graphs Easily Bandage - a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
homepage: https://github.com/rrwick/Bandage homepage: https://github.com/rrwick/Bandage
documentation: https://github.com/rrwick/Bandage documentation: https://github.com/rrwick/Bandage
licence: ['GPL-3.0-or-later'] licence: ["GPL-3.0-or-later"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- gfa: - gfa:
type: file type: file
description: Assembly graph in GFA 1.0 format description: Assembly graph in GFA 1.0 format
pattern: "*.gfa" pattern: "*.gfa"
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- png: - png:
type: file type: file
description: Bandage image in PNG format description: Bandage image in PNG format
pattern: "*.png" pattern: "*.png"
- svg: - svg:
type: file type: file
description: Bandage image in SVG format description: Bandage image in SVG format
pattern: "*.svg" pattern: "*.svg"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@heuermh" - "@heuermh"

View file

@ -2,10 +2,10 @@ process BBMAP_ALIGN {
tag "$meta.id" tag "$meta.id"
label 'process_medium' 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 ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' : 'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' :
'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' }" 'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' }"
input: input:
tuple val(meta), path(fastq) tuple val(meta), path(fastq)
@ -16,6 +16,9 @@ process BBMAP_ALIGN {
tuple val(meta), path("*.log"), emit: log tuple val(meta), path("*.log"), emit: log
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -13,7 +13,7 @@ tools:
documentation: 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: None tool_dev_url: None
doi: "" doi: ""
licence: ['UC-LBL license (see package)'] licence: ["UC-LBL license (see package)"]
input: input:
- meta: - meta:
@ -24,14 +24,14 @@ input:
- fastq: - fastq:
type: file type: file
description: | description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data, List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively. respectively.
- ref: - ref:
type: file type: file
description: | description: |
Either "ref" a directory containing an index, the name of another directory 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 with a "ref" subdirectory containing an index or the name of a fasta formatted
nucleotide file containg the reference to map to. nucleotide file containg the reference to map to.
output: output:
- meta: - meta:

View file

@ -16,6 +16,9 @@ process BBMAP_BBDUK {
tuple val(meta), path('*.log') , emit: log tuple val(meta), path('*.log') , emit: log
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -11,7 +11,7 @@ tools:
documentation: 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: None tool_dev_url: None
doi: "" doi: ""
licence: ['UC-LBL license (see package)'] licence: ["UC-LBL license (see package)"]
input: input:
- meta: - meta:
@ -20,14 +20,14 @@ input:
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- reads: - reads:
type: file type: file
description: | description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data, List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively. respectively.
- contaminants: - contaminants:
type: file type: file
description: | description: |
Reference files containing adapter and/or contaminant sequences for sequence kmer matching Reference files containing adapter and/or contaminant sequences for sequence kmer matching
output: output:
- meta: - meta:

View file

@ -20,6 +20,9 @@ process BBMAP_BBSPLIT {
tuple val(meta), path('*txt') , optional:true, emit: stats tuple val(meta), path('*txt') , optional:true, emit: stats
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -12,7 +12,7 @@ tools:
documentation: 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: None tool_dev_url: None
doi: "" doi: ""
licence: ['UC-LBL license (see package)'] licence: ["UC-LBL license (see package)"]
input: input:
- meta: - meta:

View file

@ -14,6 +14,9 @@ process BBMAP_INDEX {
path 'ref' , emit: index path 'ref' , emit: index
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
""" """

View file

@ -11,7 +11,7 @@ tools:
documentation: 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: None tool_dev_url: None
doi: "" doi: ""
licence: ['UC-LBL license (see package)'] licence: ["UC-LBL license (see package)"]
input: input:
- fasta: - fasta:

View file

@ -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
"""
}

View file

@ -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"

View file

@ -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
"""
}

View file

@ -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"

View file

@ -14,6 +14,9 @@ process BCFTOOLS_CONCAT {
tuple val(meta), path("*.gz"), emit: vcf tuple val(meta), path("*.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,43 +1,43 @@
name: bcftools_concat name: bcftools_concat
description: Concatenate VCF files description: Concatenate VCF files
keywords: keywords:
- variant calling - variant calling
- concat - concat
- bcftools - bcftools
- VCF - VCF
tools: tools:
- concat: - concat:
description: | description: |
Concatenate VCF files. Concatenate VCF files.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcfs: - vcfs:
type: files type: files
description: | description: |
List containing 2 or more vcf files List containing 2 or more vcf files
e.g. [ 'file1.vcf', 'file2.vcf' ] e.g. [ 'file1.vcf', 'file2.vcf' ]
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF concatenated output file description: VCF concatenated output file
pattern: "*.{vcf.gz}" pattern: "*.{vcf.gz}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@abhi18av" - "@abhi18av"

View file

@ -14,6 +14,9 @@ process BCFTOOLS_CONSENSUS {
tuple val(meta), path('*.fa'), emit: fasta tuple val(meta), path('*.fa'), emit: fasta
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,49 +1,49 @@
name: bcftools_consensus name: bcftools_consensus
description: Compresses VCF files description: Compresses VCF files
keywords: keywords:
- variant calling - variant calling
- consensus - consensus
- VCF - VCF
tools: tools:
- consensus: - consensus:
description: | description: |
Create consensus sequence by applying VCF variants to a reference fasta file. Create consensus sequence by applying VCF variants to a reference fasta file.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF file description: VCF file
pattern: "*.{vcf}" pattern: "*.{vcf}"
- tbi: - tbi:
type: file type: file
description: tabix index file description: tabix index file
pattern: "*.{tbi}" pattern: "*.{tbi}"
- fasta: - fasta:
type: file type: file
description: FASTA reference file description: FASTA reference file
pattern: "*.{fasta,fa}" pattern: "*.{fasta,fa}"
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- fasta: - fasta:
type: file type: file
description: FASTA reference consensus file description: FASTA reference consensus file
pattern: "*.{fasta,fa}" pattern: "*.{fasta,fa}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"

View file

@ -14,6 +14,9 @@ process BCFTOOLS_FILTER {
tuple val(meta), path("*.gz"), emit: vcf tuple val(meta), path("*.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,41 +1,41 @@
name: bcftools_filter name: bcftools_filter
description: Filters VCF files description: Filters VCF files
keywords: keywords:
- variant calling - variant calling
- filtering - filtering
- VCF - VCF
tools: tools:
- filter: - filter:
description: | description: |
Apply fixed-threshold filters to VCF files. Apply fixed-threshold filters to VCF files.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF input file description: VCF input file
pattern: "*.{vcf}" pattern: "*.{vcf}"
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF filtered output file description: VCF filtered output file
pattern: "*.{vcf}" pattern: "*.{vcf}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"

View file

@ -15,6 +15,9 @@ process BCFTOOLS_INDEX {
tuple val(meta), path("*.tbi"), optional:true, emit: tbi tuple val(meta), path("*.tbi"), optional:true, emit: tbi
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -13,7 +13,7 @@ tools:
documentation: https://samtools.github.io/bcftools/howtos/index.html documentation: https://samtools.github.io/bcftools/howtos/index.html
tool_dev_url: https://github.com/samtools/bcftools tool_dev_url: https://github.com/samtools/bcftools
doi: "10.1093/gigascience/giab008" doi: "10.1093/gigascience/giab008"
licence: ['MIT', 'GPL-3.0-or-later'] licence: ["MIT", "GPL-3.0-or-later"]
input: input:
- meta: - meta:

View file

@ -14,6 +14,9 @@ process BCFTOOLS_ISEC {
tuple val(meta), path("${prefix}"), emit: results tuple val(meta), path("${prefix}"), emit: results
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,49 +1,49 @@
name: bcftools_isec name: bcftools_isec
description: Apply set operations to VCF files description: Apply set operations to VCF files
keywords: keywords:
- variant calling - variant calling
- intersect - intersect
- union - union
- complement - complement
- VCF - VCF
tools: tools:
- isec: - isec:
description: | description: |
Computes intersections, unions and complements of VCF files. Computes intersections, unions and complements of VCF files.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcfs: - vcfs:
type: files type: files
description: | description: |
List containing 2 or more vcf files List containing 2 or more vcf files
e.g. [ 'file1.vcf', 'file2.vcf' ] e.g. [ 'file1.vcf', 'file2.vcf' ]
- tbis: - tbis:
type: files type: files
description: | description: |
List containing the tbi index files corresponding to the vcfs input files List containing the tbi index files corresponding to the vcfs input files
e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ]
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- results: - results:
type: directory type: directory
description: Folder containing the set operations results perform on the vcf files description: Folder containing the set operations results perform on the vcf files
pattern: "${prefix}" pattern: "${prefix}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"

View file

@ -14,6 +14,9 @@ process BCFTOOLS_MERGE {
tuple val(meta), path("*.gz"), emit: vcf tuple val(meta), path("*.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -1,47 +1,47 @@
name: bcftools_merge name: bcftools_merge
description: Merge VCF files description: Merge VCF files
keywords: keywords:
- variant calling - variant calling
- merge - merge
- VCF - VCF
tools: tools:
- merge: - merge:
description: | description: |
Merge VCF files. Merge VCF files.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcfs: - vcfs:
type: files type: files
description: | description: |
List containing 2 or more vcf files List containing 2 or more vcf files
e.g. [ 'file1.vcf', 'file2.vcf' ] e.g. [ 'file1.vcf', 'file2.vcf' ]
- tbis: - tbis:
type: files type: files
description: | description: |
List containing the tbi index files corresponding to the vcfs input files List containing the tbi index files corresponding to the vcfs input files
e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ]
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF merged output file description: VCF merged output file
pattern: "*.{vcf.gz}" pattern: "*.{vcf.gz}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"

View file

@ -19,6 +19,9 @@ process BCFTOOLS_MPILEUP {
tuple val(meta), path("*.mpileup") , emit: mpileup, optional: true tuple val(meta), path("*.mpileup") , emit: mpileup, optional: true
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: '' def args2 = task.ext.args2 ?: ''

View file

@ -1,57 +1,57 @@
name: bcftools_mpileup name: bcftools_mpileup
description: Compresses VCF files description: Compresses VCF files
keywords: keywords:
- variant calling - variant calling
- mpileup - mpileup
- VCF - VCF
tools: tools:
- mpileup: - mpileup:
description: | description: |
Generates genotype likelihoods at each genomic position with coverage. Generates genotype likelihoods at each genomic position with coverage.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bam: - bam:
type: file type: file
description: Input BAM file description: Input BAM file
pattern: "*.{bam}" pattern: "*.{bam}"
- fasta: - fasta:
type: file type: file
description: FASTA reference file description: FASTA reference file
pattern: "*.{fasta,fa}" pattern: "*.{fasta,fa}"
- save_mpileup: - save_mpileup:
type: boolean type: boolean
description: Save mpileup file generated by bcftools mpileup description: Save mpileup file generated by bcftools mpileup
patter: "*.mpileup" patter: "*.mpileup"
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF gzipped output file description: VCF gzipped output file
pattern: "*.{vcf.gz}" pattern: "*.{vcf.gz}"
- tbi: - tbi:
type: file type: file
description: tabix index file description: tabix index file
pattern: "*.{tbi}" pattern: "*.{tbi}"
- stats: - stats:
type: file type: file
description: Text output file containing stats description: Text output file containing stats
pattern: "*{stats.txt}" pattern: "*{stats.txt}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"

View file

@ -15,6 +15,9 @@ process BCFTOOLS_NORM {
tuple val(meta), path("*.gz") , emit: vcf tuple val(meta), path("*.gz") , emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" 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/ .*\$//') bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS 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
"""
} }

View file

@ -6,41 +6,41 @@ keywords:
- variant calling - variant calling
- VCF - VCF
tools: tools:
- norm: - norm:
description: | description: |
Normalize VCF files. Normalize VCF files.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: | description: |
The vcf file to be normalized The vcf file to be normalized
e.g. 'file1.vcf' e.g. 'file1.vcf'
- fasta: - fasta:
type: file type: file
description: FASTA reference file description: FASTA reference file
pattern: "*.{fasta,fa}" pattern: "*.{fasta,fa}"
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: VCF normalized output file description: VCF normalized output file
pattern: "*.{vcf.gz}" pattern: "*.{vcf.gz}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@abhi18av" - "@abhi18av"

View file

@ -8,30 +8,32 @@ process BCFTOOLS_QUERY {
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
input: input:
tuple val(meta), path(vcf), path(index) tuple val(meta), path(vcf), path(tbi)
path(regions) path regions
path(targets) path targets
path(samples) path samples
output: output:
tuple val(meta), path("*.gz") , emit: vcf tuple val(meta), path("*.txt"), emit: txt
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" 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 targets_file = targets ? "--targets-file ${targets}" : ""
def samples_file = samples ? "--samples-file ${samples}" : "" def samples_file = samples ? "--samples-file ${samples}" : ""
""" """
bcftools query \\ bcftools query \\
--output ${prefix}.vcf.gz \\ --output ${prefix}.txt \\
${regions_file} \\ $regions_file \\
${targets_file} \\ $targets_file \\
${samples_file} \\ $samples_file \\
$args \\ $args \\
${vcf} $vcf
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -6,57 +6,56 @@ keywords:
- bcftools - bcftools
- VCF - VCF
tools: tools:
- query: - query:
description: | description: |
Extracts fields from VCF or BCF files and outputs them in user-defined format. Extracts fields from VCF or BCF files and outputs them in user-defined format.
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://www.htslib.org/doc/bcftools.html documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352 doi: 10.1093/bioinformatics/btp352
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - vcf:
type: file type: file
description: | description: |
The vcf file to be qeuried. The vcf file to be qeuried.
e.g. 'file.vcf' pattern: "*.{vcf.gz, vcf}"
- index: - tbi:
type: file type: file
description: | description: |
The tab index for the VCF file to be inspected. The tab index for the VCF file to be inspected.
e.g. 'file.tbi' pattern: "*.tbi"
- regions: - regions:
type: file type: file
description: | description: |
Optionally, restrict the operation to regions listed in this file. Optionally, restrict the operation to regions listed in this file.
e.g. 'file.vcf' - targets:
- targets: type: file
type: file description: |
description: | Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files)
Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) - samples:
e.g. 'file.vcf' type: file
- samples: description: |
type: file Optional, file of sample names to be included or excluded.
description: | e.g. 'file.tsv'
Optional, file of sample names to be included or excluded.
e.g. 'file.tsv'
output: output:
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- vcf: - txt:
type: file type: file
description: VCF query output file description: BCFTools query output file
pattern: "*.{vcf.gz}" pattern: "*.txt"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
authors: authors:
- "@abhi18av" - "@abhi18av"
- "@drpatelh"

View file

@ -16,6 +16,9 @@ process BCFTOOLS_REHEADER {
tuple val(meta), path("*.vcf.gz"), emit: vcf tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

View file

@ -11,7 +11,7 @@ tools:
homepage: http://samtools.github.io/bcftools/bcftools.html homepage: http://samtools.github.io/bcftools/bcftools.html
documentation: http://samtools.github.io/bcftools/bcftools.html#reheader documentation: http://samtools.github.io/bcftools/bcftools.html#reheader
doi: 10.1093/gigascience/giab008 doi: 10.1093/gigascience/giab008
licence: ['MIT'] licence: ["MIT"]
input: input:
- meta: - meta:

View file

@ -14,6 +14,9 @@ process BCFTOOLS_SORT {
tuple val(meta), path("*.gz"), emit: vcf tuple val(meta), path("*.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"

Some files were not shown because too many files have changed in this diff Show more