Merge branch 'master' into busco

This commit is contained in:
Mahesh Binzer-Panchal 2022-05-03 10:48:03 +02:00 committed by GitHub
commit ddbe6e8f40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
756 changed files with 15232 additions and 1869 deletions

View file

@ -8,5 +8,5 @@ trim_trailing_whitespace = true
indent_size = 4
indent_style = space
[*.{yml,yaml}]
[*.{md,yml,yaml}]
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:
1. Check that there isn't already an issue about your idea in the [nf-core/modules issues](https://github.com/nf-core/modules/issues) to avoid duplicating work
* If there isn't one already, please create one so that others know you're working on this
- If there isn't one already, please create one so that others know you're working on this
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/modules repository](https://github.com/nf-core/modules) to your GitHub account
3. When adding a module file, follow the [guidelines](https://github.com/nf-core/modules#adding-a-new-module-file)
4. Ensure that [tests are working locally](https://github.com/nf-core/modules#running-tests-locally)
@ -40,7 +42,6 @@ These tests are run both with the latest available version of `Nextflow` and als
For further information/help, please consult the [nf-core/modules README](https://github.com/nf-core/modules) and don't hesitate to get in touch on the nf-core Slack [#modules](https://nfcore.slack.com/channels/modules) channel ([join our Slack here](https://nf-co.re/join/slack)).
### Images and figures
For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).

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`
- [ ] Use BioConda and BioContainers if possible to fulfil software requirements.
- Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
- [ ] `PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd`
- [ ] `PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd`
- [ ] `PROFILE=conda 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 --git-aware`
- [ ] `PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`

View file

@ -5,20 +5,21 @@ on:
pull_request:
branches: [master]
jobs:
Markdown:
Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install NodeJS
uses: actions/setup-node@v2
- name: Install markdownlint
run: npm install -g markdownlint-cli
- name: Install Prettier
run: npm install -g prettier
- name: Run Markdownlint
run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.markdownlint.yml
- name: Run Prettier --check
run: prettier --check .
EditorConfig:
runs-on: ubuntu-latest
@ -32,18 +33,3 @@ jobs:
- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(git ls-files | grep -v test)
YAML:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install NodeJS
uses: actions/setup-node@v2
- name: Install yaml-lint
run: npm install -g yaml-lint
- name: Run yaml-lint
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yaml" -or -name "*.yml")

View file

@ -86,17 +86,13 @@ jobs:
# Test the module
- name: Run pytest-workflow
# only use one thread for pytest-workflow to avoid race condition on conda cache.
run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof
run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof --git-aware --color=yes
- name: Output log on failure
if: failure()
run: |
echo "======> log.out <======="
cat /home/runner/pytest_workflow_*/*/log.out
echo
echo
echo "======> log.err <======="
cat /home/runner/pytest_workflow_*/*/log.err
sudo apt install bat > /dev/null
batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err}
- name: Upload logs on failure
if: failure()

View file

@ -4,7 +4,7 @@ vscode:
extensions: # based on nf-core.nf-core-extensionpack
- codezombiech.gitignore # Language support for .gitignore files
# - cssho.vscode-svgviewer # SVG viewer
- davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code
- 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

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

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

View file

@ -1,5 +0,0 @@
extends: default
rules:
document-start: disable
line-length: disable

View file

@ -133,7 +133,7 @@ We have written a helper command in the `nf-core/tools` package that uses the Gi
## 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 :)

View file

@ -11,7 +11,7 @@ tools:
documentation: https://github.com/tseemann/abricate
tool_dev_url: https://github.com/tseemann/abricate
doi: ""
licence: ['GPL v2', 'GPL v2']
licence: ["GPL v2", "GPL v2"]
input:
- meta:

View file

@ -11,7 +11,7 @@ tools:
documentation: https://github.com/tseemann/abricate
tool_dev_url: https://github.com/tseemann/abricate
doi: ""
licence: ['GPL v2', 'GPL v2']
licence: ["GPL v2", "GPL v2"]
input:
- meta:

View file

@ -9,10 +9,16 @@ process ADAPTERREMOVAL {
input:
tuple val(meta), path(reads)
path(adapterlist)
output:
tuple val(meta), path('*.fastq.gz'), emit: reads
tuple val(meta), path('*.log') , emit: log
tuple val(meta), path("${prefix}.truncated.fastq.gz") , optional: true, emit: singles_truncated
tuple val(meta), path("${prefix}.discarded.fastq.gz") , optional: true, emit: discarded
tuple val(meta), path("${prefix}.pair{1,2}.truncated.fastq.gz") , optional: true, emit: paired_truncated
tuple val(meta), path("${prefix}.collapsed.fastq.gz") , optional: true, emit: collapsed
tuple val(meta), path("${prefix}.collapsed.truncated.fastq.gz") , optional: true, emit: collapsed_truncated
tuple val(meta), path("${prefix}.paired.fastq.gz") , optional: true, emit: paired_interleaved
tuple val(meta), path('*.settings') , emit: settings
path "versions.yml" , emit: versions
when:
@ -20,38 +26,29 @@ process ADAPTERREMOVAL {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def list = adapterlist ? "--adapter-list ${adapterlist}" : ""
prefix = task.ext.prefix ?: "${meta.id}"
if (meta.single_end) {
"""
AdapterRemoval \\
--file1 $reads \\
$args \\
--basename $prefix \\
--threads $task.cpus \\
--settings ${prefix}.log \\
--output1 ${prefix}.trimmed.fastq.gz \\
$adapterlist \\
--basename ${prefix} \\
--threads ${task.cpus} \\
--seed 42 \\
--gzip \\
--gzip
cat <<-END_VERSIONS > versions.yml
"${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
END_VERSIONS
"""
} else if (!meta.single_end && !meta.collapse) {
"""
AdapterRemoval \\
--file1 ${reads[0]} \\
--file2 ${reads[1]} \\
$args \\
--basename $prefix \\
--threads $task.cpus \\
--settings ${prefix}.log \\
--output1 ${prefix}.pair1.trimmed.fastq.gz \\
--output2 ${prefix}.pair2.trimmed.fastq.gz \\
--seed 42 \\
--gzip \\
ensure_fastq() {
if [ -f "\${1}" ]; then
mv "\${1}" "\${1::-3}.fastq.gz"
fi
}
ensure_fastq '${prefix}.truncated.gz'
ensure_fastq '${prefix}.discarded.gz'
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@ -63,15 +60,28 @@ process ADAPTERREMOVAL {
AdapterRemoval \\
--file1 ${reads[0]} \\
--file2 ${reads[1]} \\
--collapse \\
$args \\
--basename $prefix \\
$adapterlist \\
--basename ${prefix} \\
--threads $task.cpus \\
--settings ${prefix}.log \\
--seed 42 \\
--gzip \\
--gzip
ensure_fastq() {
if [ -f "\${1}" ]; then
mv "\${1}" "\${1::-3}.fastq.gz"
fi
}
ensure_fastq '${prefix}.truncated.gz'
ensure_fastq '${prefix}.discarded.gz'
ensure_fastq '${prefix}.pair1.truncated.gz'
ensure_fastq '${prefix}.pair2.truncated.gz'
ensure_fastq '${prefix}.collapsed.gz'
ensure_fastq '${prefix}.collapsed.truncated.gz'
ensure_fastq '${prefix}.paired.gz'
cat *.collapsed.gz *.collapsed.truncated.gz > ${prefix}.merged.fastq.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")

View file

@ -17,13 +17,19 @@ input:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false, collapse:false ]
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
pattern: "*.{fq,fastq,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:
- meta:
@ -31,16 +37,49 @@ output:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
- singles_truncated:
type: file
description: |
List of input adapter trimmed FastQ files of size 1 or 2 for
single-end or collapsed data and paired-end data, respectively.
pattern: "*.{fastq.gz}"
Adapter trimmed FastQ files of either single-end reads, or singleton
'orphaned' reads from merging of paired-end data (i.e., one of the pair
was lost due to filtering thresholds).
pattern: "*.truncated.fastq.gz"
- discarded:
type: file
description: |
Adapter trimmed FastQ files of reads that did not pass filtering
thresholds.
pattern: "*.discarded.fastq.gz"
- pair1_truncated:
type: file
description: |
Adapter trimmed R1 FastQ files of paired-end reads that did not merge
with their respective R2 pair due to long templates. The respective pair
is stored in 'pair2_truncated'.
pattern: "*.pair1.truncated.fastq.gz"
- pair2_truncated:
type: file
description: |
Adapter trimmed R2 FastQ files of paired-end reads that did not merge
with their respective R1 pair due to long templates. The respective pair
is stored in 'pair1_truncated'.
pattern: "*.pair2.truncated.fastq.gz"
- collapsed:
type: file
description: |
Collapsed FastQ of paired-end reads that successfully merged with their
respective R1 pair but were not trimmed.
pattern: "*.collapsed.fastq.gz"
- collapsed_truncated:
type: file
description: |
Collapsed FastQ of paired-end reads that successfully merged with their
respective R1 pair and were trimmed of adapter due to sufficient overlap.
pattern: "*.collapsed.truncated.fastq.gz"
- log:
type: file
description: AdapterRemoval log file
pattern: "*.log"
pattern: "*.settings"
- versions:
type: file
description: File containing software versions
@ -48,3 +87,4 @@ output:
authors:
- "@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

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

@ -11,7 +11,7 @@ tools:
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']
licence: ["Public Domain"]
input:
- meta:

View file

@ -11,7 +11,7 @@ tools:
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']
licence: ["Public Domain"]
input:
- input_not_required:

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"

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

@ -2,10 +2,10 @@ process BAKTA {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::bakta=1.3.1" : null)
conda (params.enable_conda ? "bioconda::bakta=1.4.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bakta:1.3.1--pyhdfd78af_0' :
'quay.io/biocontainers/bakta:1.3.1--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/bakta:1.4.0--pyhdfd78af_1' :
'quay.io/biocontainers/bakta:1.4.0--pyhdfd78af_1' }"
input:
tuple val(meta), path(fasta)

View file

@ -78,7 +78,7 @@ output:
pattern: "*.ffn"
- hypotheticals_tsv:
type: file
description: further information on hypothetical protein CDS as simple human readble tab separated values
description: additional information on hypothetical protein CDS as simple human readble tab separated values
pattern: "*.hypotheticals.tsv"
- hypotheticals_faa:
type: file

View file

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

View file

@ -23,7 +23,7 @@ input:
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: A BAM file to split
description: A list of one or more BAM files to merge and then split
pattern: "*.bam"
output:
@ -43,3 +43,4 @@ output:
authors:
- "@sguizard"
- "@matthdsm"

View file

@ -2,10 +2,10 @@ process BBMAP_ALIGN {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.13 pigz=2.6" : null)
conda (params.enable_conda ? "bioconda::bbmap=38.92 bioconda::samtools=1.15.1 pigz=2.6" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' :
'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:f5f55fc5623bb7b3f725e8d2f86bedacfd879510-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' :
'quay.io/biocontainers/mulled-v2-008daec56b7aaf3f162d7866758142b9f889d690:2fee0e0facec1dfe32a1ee4aa516aef7d0296ebf-0' }"
input:
tuple val(meta), path(fastq)

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

@ -34,4 +34,15 @@ process BCFTOOLS_NORM {
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -41,4 +41,15 @@ process BCFTOOLS_VIEW {
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
}

2
modules/bclconvert/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
bcl-convert
*.rpm

View file

@ -0,0 +1,15 @@
# Dockerfile to create container with bcl-convert
# Push to nfcore/bclconvert:<VER>
FROM debian:bullseye-slim
LABEL authors="Matthias De Smet <matthias.desmet@ugent.be>" \
description="Docker image containing bcl-convert"
# Disclaimer: this container is not provided nor supported by Illumina
# 'ps' command is need by some nextflow executions to collect system stats
# Install procps and clean apt cache
RUN apt-get update \
&& apt-get install -y \
procps \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
COPY bcl-convert /usr/local/bin/bcl-convert
RUN chmod +x /usr/local/bin/bcl-convert

View file

@ -0,0 +1,30 @@
ILLUMINA END-USER SOFTWARE LICENSE AGREEMENT
IMPORTANT-READ CAREFULLY. THIS IS A LICENSE AGREEMENT THAT YOU ARE REQUIRED TO ACCEPT BEFORE, DOWNLOADING, INSTALLING AND USING ANY SOFTWARE MADE AVAILABLE FROM THE ILLUMINA SUPPORT CENTER (https://support.illumina.com).
CAREFULLY READ ALL THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT BEFORE PROCEEDING WITH DOWNLOADING, INSTALLING, AND/OR USING THE SOFTWARE. YOU ARE NOT PERMITTED TO DOWNLOAD, INSTALL, AND/OR USE THE SOFTWARE UNTIL YOU HAVE AGREED TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. YOU REPRESENT AND WARRANT THAT YOU ARE DULY AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT ON BEHALF OF YOUR EMPLOYER.
Software made available through the Illumina Support Center is licensed, not sold, to you. Your license to each software program made available through the Illumina Support Center is subject to your prior acceptance of either this Illumina End-User Software License Agreement (“Agreement”), or a custom end user license agreement (“Custom EULA”), if one is provided with the software. Any software that is subject to this Agreement is referred to herein as the “Software.” By accepting this Agreement, you agree the terms and conditions of this Agreement will apply to and govern any and all of your downloads, installations, and uses of each Illumina software program made available through the Illumina Support Center, except that your download, installation, and use of any software provided with a Custom EULA will be governed by the terms and conditions of the Custom EULA.
This Agreement is made and entered into by and between Illumina, Inc., a Delaware corporation, having offices at 5200 Illumina Way, San Diego, CA 92122 (“Illumina”) and you as the end-user of the Software (hereinafter, “Licensee” or “you”). All software, firmware, and associated media, printed materials, and online and electronic documentation, including any updates or upgrades thereof, made available through the Illumina Support Center (collectively, “Software”) provided to Licensee are for use solely by Licensee and the provisions herein WILL apply with respect to such Software.
License Grant. Subject to the terms and conditions of this Agreement, Illumina grants to Licensee, under the following terms and conditions, a personal, non-exclusive, revocable, non-transferable, non-sublicensable license, for its internal end-use purposes only, in the ordinary course of Licensees business to use the Software in executable object code form only, solely at the Licensees facility to, install and use the Software on a single computer accessible only by Licensee (and not on any public network or server), where the single computer is owned, leased, or otherwise substantially controlled by Licensee, for the purpose of processing and analyzing data generated from an Illumina genetic sequencing instrument owned and operated solely by Licensee (the “Product”). In the case of Software provided by Illumina in non-compiled form, Illumina grants Licensee a personal, non-exclusive, non-sublicenseable, restricted right to compile, install, and use one copy of the Software solely for processing and analyzing data generated from the Product.
License Restrictions. Except as expressly permitted in Section 1, Licensee may not make, have made, import, use, copy, reproduce, distribute, display, publish, sell, re-sell, lease, or sub-license the Software, in whole or in part, except as expressly provided for in this Agreement. Licensee may not modify, improve, translate, reverse engineer, decompile, disassemble, or create derivative works of the Software or otherwise attempt to (a) defeat, avoid, by-pass, remove, deactivate, or otherwise circumvent any software protection mechanisms in the Software including, without limitation, any such mechanism used to restrict or control the functionality of the Software, or (b) derive the source code or the underlying ideas, algorithms, structure, or organization form of the Software. Licensee will not allow, at any time, including during and after the term of the license, the Software or any portions or copies thereof in any form to become available to any third parties. Licensee may use the Software solely with genomic data that is generated using the Product; Licensee may not use the Software with any data generated from other products or instruments. Licensee may not use the Software to perform any data analysis services for any third party.
Ownership. The Software is protected by United States and international intellectual property laws. All right, title, and interest in and to the Software (including associated intellectual property rights) are and will remain vested in Illumina or Illuminas affiliated companies or licensors. Licensee acknowledges that no rights, license or interest to any Illumina trademarks are granted hereunder. Licensee acknowledges that unauthorized reproduction or distribution of the Software, or any portion of it, may result in severe civil and criminal penalties. Illumina reserves all rights in and to the Software not expressly granted to Licensee under this Agreement.
Upgrades/Updates. Illumina may, at its sole discretion, provide updates or upgrades to the Software. In that case, Licensee WILL have the same rights and obligations under such updates or upgrades as it has for the versions of the Software initially provided to Licensee hereunder. Licensee recognizes that Illumina is not obligated to provide any upgrades or updates to, or support for, the Software.
Data Integrity/Loss. Licensee is responsible for the integrity and availability, including preventing the loss of data that Licensee generates, uses, analyzes, manages, or stores in connection with or through its use of the Software, including without limitation, investigating and implementing industry appropriate policies and procedures regarding the provision of access to Licensees data, monitoring access and use of Licensees data, conducting routine backups and archiving of Licensees data, and ensuring the adequacy of anti-virus software. Accordingly, Licensee agrees that Illumina is not responsible for any inability to access, loss or corruption of data as a result of Licensees use of the Software, and Illumina has no liability to Licensee in connection with such inability to access, loss or corruption of data.
Term of License. This Agreement will be in effect from the time Licensee expressly accepts the terms and conditions of this license, or otherwise installs the Software, thereby accepting the terms and conditions contained herein, and will remain in effect until terminated. This license will otherwise terminate upon the conditions set forth in this Agreement, if revoked by Illumina, or if Licensee fails to comply with any term or condition of this Agreement including failure to pay any applicable license fee. Licensee agrees upon termination of this Agreement for any reason to immediately discontinue use of and un-install the Software and destroy all copies of the Software in its possession and/or under its control, and return or destroy, at Illuminas option, any compact disks, floppy disks or other media provided by Illumina storing the Software thereon (together with any authorized copies thereof), as well as any documentation associated therewith
Limited Warranty. Illumina warrants that, for a period of 6 months from the date of download or installation of the Software by Licensee, the Software will perform in all material respects in accordance with the accompanying documentation available on the Illumina Support Center. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN THE FOREGOING, AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED “AS IS” AND ILLUMINA EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS REGARDING THE SOFTWARE AND RESULTS GENERATED BY THE SOFTWARE, INCLUDING WITHOUT LIMITATION, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ALL OTHER EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABLE QUALITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALING OR USAGE OF TRADE. ILLUMINA DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE"S REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE ERROR FREE OR UNINTERRUPTED.
Limitation of Liability.
(a) ILLUMINAS ENTIRE LIABILITY AND LICENSEE"S EXCLUSIVE REMEDY UNDER THE LIMITED WARRANTY PROVISION OF SECTION 7 ABOVE WILL BE, AT ILLUMINAS OPTION, EITHER (i) RETURN OF THE PRICE PAID FOR THE SOFTWARE, OR (ii) REPAIR OR REPLACEMENT OF THE PORTIONS OF THE SOFTWARE THAT DO NOT COMPLY WITH ILLUMINAS LIMITED WARRANTY. THIS LIMITED WARRANTY IS VOID AND ILLUMINA WILL HAVE NO LIABILITY AT ALL IF FAILURE OF THE SOFTWARE TO COMPLY WITH ILLUMINA LIMITED WARRANTY HAS RESULTED FROM: (w) FAILURE TO USE THE SOFTWARE IN ACCORDANCE WITH ILLUMINAS THEN CURRENT USER MANUAL OR THIS AGREEMENT; (x) ACCIDENT, ABUSE, OR MISAPPLICATION; (y) PRODUCTS OR EQUIPMENT NOT SPECIFIED BY ILLUMINA AS BEING COMPATIBLE WITH THE SOFTWARE; OR (z) IF LICENSEE HAS NOT NOTIFIED ILLUMINA IN WRITING OF THE DEFECT WITHIN THE ABOVE WARRANTY PERIOD.
(b) TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL ILLUMINA BE LIABLE UNDER ANY THEORY OF CONTRACT, TORT, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY PERSONAL INJURY OR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, EVEN IF ILLUMINA HAS BEEN ADVISED OF THE POSSIBILITY THEREOF INCLUDING, WITHOUT LIMITATION, LOST PROFITS, LOST DATA, INTERRUPTION OF BUSINESS, LOST BUSINESS REVENUE, OTHER ECONOMIC LOSS, OR ANY LOSS OF RECORDED DATA ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN SECTION 7 AND 8(a) ABOVE OR AS OTHERWISE PERMITTED BY LAW, IN NO EVENT WILL ILLUMINAS TOTAL LIABILITY TO LICENSEE FOR ALL DAMAGES (OTHER THAN AS MAY BE REQUIRED BY APPLICABLE LAW IN CASES INVOLVING PERSONAL INJURY) EXCEED THE AMOUNT OF $500 USD. THE FOREGOING LIMITATIONS WILL APPLY EVEN IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE.
Survival. The limitations of liability and ownership rights of Illumina contained herein and Licensees obligations following termination of this Agreement WILL survive the termination of this Agreement for any reason.
Research Use Only. The Software is labeled with a For Research Use Only or similar labeling statement and the performance characteristics of the Software have not been established and the Software is not for use in diagnostic procedures. Licensee acknowledges and agrees that (i) the Software has not been approved, cleared, or licensed by the United States Food and Drug Administration or any other regulatory entity whether foreign or domestic for any specific intended use, whether research, commercial, diagnostic, or otherwise, and (ii) Licensee must ensure it has any regulatory approvals that are necessary for Licensees intended uses of the Software. Licensee will comply with all applicable laws and regulations when using and maintaining the Software.
General. Licensee may not sublicense, assign, share, pledge, rent or transfer any of its rights under this Agreement in relation to the Software or any portion thereof including documentation. Illumina reserves the right to change this Agreement at any time. When Illumina makes any changes, Illumina will provide the updated Agreement, or a link to it, on Illuminas website (www.illumina.com) and such updated Agreement WILL become effective immediately. Licensees continued access to or use of the Software represents Licensees agreement to any revised Agreement. If one or more provisions of this Agreement are found to be invalid or unenforceable, this Agreement WILL not be rendered inoperative but the remaining provisions WILL continue in full force and effect. This Agreement constitutes the entire agreement between the parties with respect to the subject matter of this Agreement and merges all prior communications except that a “hard-copy” form of licensing agreement relating to the Software previously agreed to in writing by Illumina and Licensee WILL supersede and govern in the event of any conflicting provisions.
Governing Law. This Agreement WILL be governed by and construed in accordance with the laws of the state of California, USA, without regard to its conflicts of laws principles, and independent of where a suit or action hereunder may be filed.
U.S. Government End Users. If Licensee is a branch agency or instrumentality of the United States Government, the following provision applies. The Software is a “commercial item” as that term is defined at 48 C.F.R. 2.101, consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202 (as applicable). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4, all United States Government end users acquire the Software with only those rights set forth herein.
Contact. Any questions regarding legal rights, duties, obligations, or restrictions associated with the software hereunder should be directed to Illumina, Inc., 5200 Illumina Way, San Diego, CA 92122, Attention: Legal Department, Phone: (858) 202-4500, Fax: (858) 202-4599, web site: www.illumina.com <http://www.illumina.com>.
Third Party Components. The Software may include third party software (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Licensed Software does not alter any rights or obligations Licensee may have under those open source or free software licenses. The licenses that govern the terms and conditions of use of the Third Party Programs included in the Licensed Software are provided in the READ ME provided with the Software. The READ ME also contains copyright statements for the various open source software components (or portions thereof) that are distributed with the Licensed Software.
END OF END-USER SOFTWARE LICENSE AGREEMENT.

View file

@ -0,0 +1,17 @@
# Updating the docker container and making a new module release
bcl-convert is a commercial tool from Illumina. The container provided for the bcl-convert nf-core module is not provided nor supported by Illumina. Updating the bcl-convert versions in the container and pushing the update to Dockerhub needs to be done manually.
1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): download the rpm of the desired bcl-convert version with `curl` or `wget`.
2. Unpack the RPM package using `rpm2cpio bcl-convert-*.rpm | cpio -i --make-directories`. Place the executable located in `<unpack_dir>/usr/bin/bcl-convert` in the same folder where the Dockerfile lies.
3. Create and test the container:
```bash
docker build . -t nfcore/bclconvert:<VERSION>
```
4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so.
```bash
docker push nfcore/bclconvert:<VERSION>
```

View file

@ -0,0 +1,81 @@
process BCLCONVERT {
tag '$samplesheet'
label 'process_high'
if (params.enable_conda) {
exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers."
}
container "nfcore/bclconvert:3.9.3"
input:
path samplesheet
path run_dir
output:
path "*.fastq.gz" ,emit: fastq
path "Reports/*.{csv,xml,bin}" ,emit: reports
path "Logs/*.{log,txt}" ,emit: logs
path "InterOp/*.bin" ,emit: interop
path "versions.yml" ,emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
bcl-convert \
$args \\
--output-directory . \\
--bcl-input-directory ${run_dir} \\
--sample-sheet ${samplesheet} \\
--bcl-num-parallel-tiles ${task.cpus}
mkdir InterOp
cp ${run_dir}/InterOp/*.bin InterOp/
mv Reports/*.bin InterOp/
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //')
END_VERSIONS
"""
stub:
"""
echo "sample1_S1_L001_R1_001" > sample1_S1_L001_R1_001.fastq.gz
echo "sample1_S1_L001_R2_001" > sample1_S1_L001_R2_001.fastq.gz
echo "sample1_S1_L002_R1_001" > sample1_S1_L002_R1_001.fastq.gz
echo "sample1_S1_L002_R2_001" > sample1_S1_L002_R2_001.fastq.gz
echo "sample2_S2_L001_R1_001" > sample2_S2_L001_R1_001.fastq.gz
echo "sample2_S2_L001_R2_001" > sample2_S2_L001_R2_001.fastq.gz
echo "sample2_S2_L002_R1_001" > sample2_S2_L002_R1_001.fastq.gz
echo "sample2_S2_L002_R2_001" > sample2_S2_L002_R2_001.fastq.gz
mkdir Reports
echo "Adapter_Metrics" > Reports/Adapter_Metrics.csv
echo "Demultiplex_Stats" > Reports/Demultiplex_Stats.csv
echo "fastq_list" > Reports/fastq_list.csv
echo "Index_Hopping_Counts" > Reports/Index_Hopping_Counts.csv
echo "IndexMetricsOut" > Reports/IndexMetricsOut.bin
echo "Quality_Metrics" > Reports/Quality_Metrics.csv
echo "RunInfo" > Reports/RunInfo.xml
echo "SampleSheet" > Reports/SampleSheet.csv
echo "Top_Unknown_Barcodes" > Reports/Top_Unknown_Barcodes.csv
mkdir Logs
echo "Errors" > Logs/Errors.log
echo "FastqComplete" > Logs/FastqComplete.txt
echo "Info" > Logs/Info.log
echo "Warnings" > Logs/Warnings.log
mkdir InterOp/
echo "InterOp" > InterOp/InterOp.bin
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //')
END_VERSIONS
"""
}

View file

@ -0,0 +1,45 @@
name: "bclconvert"
description: Demultiplex Illumina BCL files
keywords:
- demultiplex
- illumina
- fastq
tools:
- "bclconvert":
description: "Demultiplex Illumina BCL files"
homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html"
documentation: "https://support-docs.illumina.com/SW/BCL_Convert/Content/SW/FrontPages/BCL_Convert.htm"
licence: "ILLUMINA"
input:
- samplesheet:
type: file
description: "Input samplesheet"
pattern: "*.{csv}"
- run_dir:
type: directory
description: "Input run directory containing RunInfo.xml and BCL data"
output:
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- fastq:
type: file
description: Demultiplexed FASTQ files
pattern: "*.{fastq.gz}"
- reports:
type: file
description: Demultiplexing Reports
pattern: "Reports/*.{csv,xml}"
- logs:
type: file
description: Log files
pattern: "Logs/*.{log,txt}"
- interop:
type: file
description: Interop files
pattern: "Interop/*.{bin}"
authors:
- "@matthdsm"

View file

@ -2,10 +2,8 @@ process BIOBAMBAM_BAMMARKDUPLICATES2 {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::biobambam=2.0.182" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biobambam:2.0.182--h7d875b9_0':
'quay.io/biocontainers/biobambam:2.0.182--h7d875b9_0' }"
conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1'}"
input:
tuple val(meta), path(bam)

View file

@ -0,0 +1,46 @@
process BIOBAMBAM_BAMSORMADUP {
tag "$meta.id"
label "process_medium"
conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1'}"
input:
tuple val(meta), path(bams)
path(fasta)
output:
tuple val(meta), path("*.{bam,cram}") ,emit: bam
tuple val(meta), path("*.bam.bai") ,optional:true, emit: bam_index
tuple val(meta), path("*.metrics.txt") ,emit: metrics
path "versions.yml" ,emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def suffix = args.contains("outputformat=cram") ? "cram" : "bam"
def input_string = bams.join(" I=")
if (args.contains("outputformat=cram") && reference == null) error "Reference required for CRAM output."
"""
bamcat \\
I=${input_string} \\
level=0 \\
| bamsormadup \\
$args \\
M=${prefix}.metrics.txt \\
tmpfile=$prefix \\
threads=$task.cpus \\
> ${prefix}.${suffix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bamcat: \$(echo \$(bamsormadup --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' )
bamsormadup: \$(echo \$(bamsormadup --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,52 @@
name: biobambam_bamsormadup
description: Parallel sorting and duplicate marking
keywords:
- markduplicates
- sort
- bam
- cram
tools:
- biobambam:
description: |
biobambam is a set of tools for early stage alignment file processing.
homepage: https://gitlab.com/german.tischler/biobambam2
documentation: https://gitlab.com/german.tischler/biobambam2/-/blob/master/README.md
doi: 10.1186/1751-0473-9-13
licence: ["GPL v3"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bams:
type: file
description: List containing 1 or more bam files
- fasta:
type: file
description: Reference genome in FASTA format (optional)
pattern: "*.{fa,fasta}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/CRAM file with duplicate reads marked/removed
pattern: "*.{bam,cram}"
- bam_index:
type: file
description: BAM index file
pattern: "*.{bai}"
- metrics:
type: file
description: Duplicate metrics file generated by biobambam
pattern: "*.{metrics.txt}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@matthdsm"

View file

@ -0,0 +1,44 @@
process BISCUIT_ALIGN {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(reads)
path index
output:
tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1)
def samtools_cpus = task.cpus-biscuit_cpus
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit align \\
$args \\
-@ $biscuit_cpus \\
\$INDEX \\
$reads \\
| samtools sort $args2 --threads $samtools_cpus -o ${prefix}.bam -
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,52 @@
name: biscuit_align
description: Aligns single- or paired-end reads from bisulfite-converted libraries to a reference genome using Biscuit.
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- bam
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/alignment
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input fastq files of size 1 and 2 for single-end and paired-end data,
respectively.
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Output BAM file containing read alignments
pattern: "*.{bam}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,52 @@
process BISCUIT_BLASTER {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samblaster=0.1.26 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(reads)
path index
output:
tuple val(meta), path("*.bam"), emit: bam
tuple val(meta), path("*.bai"), emit: bai
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def args3 = task.ext.args3 ?: ''
def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1)
def samtools_cpus = task.cpus-biscuit_cpus
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit align \\
-@ $biscuit_cpus \\
$args \\
\$INDEX \\
$reads | \\
samblaster \\
$args2 | \\
samtools sort \\
-@ $samtools_cpus \\
$args3 \\
--write-index \\
-o ${prefix}.bam##idx##${prefix}.bam.bai
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' )
samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,78 @@
name: biscuit_blaster
description: A fast, compact one-liner to produce duplicate-marked, sorted, and indexed BAM files using Biscuit
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- bam
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/biscuitblaster/
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
- samblaster:
description: |
samblaster is a fast and flexible program for marking duplicates in read-id grouped paired-end SAM files.
It can also optionally output discordant read pairs and/or split read mappings to separate SAM files,
and/or unmapped/clipped reads to a separate FASTQ file.
By default, samblaster reads SAM input from stdin and writes SAM to stdout.
homepage: None
documentation: https://github.com/GregoryFaust/samblaster
tool_dev_url: https://github.com/GregoryFaust/samblaster
doi: "10.1093/bioinformatics/btu314"
licence: ["MIT"]
- samtools:
description: |
SAMtools is a set of utilities for interacting with and post-processing
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
These files are generated as output by short read aligners like BWA.
homepage: http://www.htslib.org/
documentation: hhttp://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input fastq files of size 1 and 2 for single-end and paired-end data,
respectively.
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Output BAM file containing read alignments
pattern: "*.{bam}"
- bai:
type: file
description: Output BAM index
pattern: "*.{bai}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,39 @@
process BISCUIT_BSCONV {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0':
'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }"
input:
tuple val(meta), path(bam), path(bai)
path(index)
output:
tuple val(meta), path("*.bam"), emit: bsconv_bam
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit bsconv \\
$args \\
\$INDEX \\
$bam \\
${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,55 @@
name: biscuit_bsconv
description: Summarize and/or filter reads based on bisulfite conversion rate
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- bam
- filter
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-bsconv
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM file contained mapped reads
- bai:
type: file
description: BAM file index
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bsconv_bam:
type: file
description: Output BAM file containing filtered read alignments
pattern: "*.{bam}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,57 @@
process BISCUIT_EPIREAD {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(bam), path(bai), path(snp_bed)
path(index)
output:
tuple val(meta), path("*.bed.gz"), emit: epiread_bed
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1)
def samtools_cpus = task.cpus-biscuit_cpus
// As of 2/25/22, epiread does not support reading a gzipped SNP BED file.
// This is a bit hacky but allows the user to supply a gzipped OR uncompressed bed file
def unzip_snp_bed = snp_bed && (snp_bed.toString() =~ /\.gz$/) ? "bgzip -d ${snp_bed}" : ""
def unzipped_snp_bed = snp_bed ? snp_bed.toString() - ~/\.gz$/: ""
// SNP BED input is optional
def options_snp_bed = snp_bed ? "-B ${unzipped_snp_bed}" : ""
if ("$options_snp_bed" == "${prefix}.bed.gz") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
$unzip_snp_bed
biscuit epiread \\
-@ $biscuit_cpus \\
$args \\
$options_snp_bed \\
\$INDEX \\
$bam | \\
LC_ALL=C sort -k1,1 -k2,2n | \\
bgzip \\
-@ $samtools_cpus \\
$args2 \\
-c > ${prefix}.bed.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,58 @@
name: biscuit_epiread
description: |
Summarizes read-level methylation (and optionally SNV) information from a
Biscuit BAM file in a standard-compliant BED format.
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- bam
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/epiread_format/
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Biscuit BAM file
- bai:
type: file
description: BAM index
- snp_bed:
type: file
description: BED file containing SNP information (optional)
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- epiread_bed:
type: file
description: Gzipped BED file with methylation (and optionally SNV) information
pattern: "*.{epiread.bed.gz}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,33 @@
process BISCUIT_INDEX {
tag "$fasta"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0':
'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }"
input:
path fasta, stageAs: "BiscuitIndex/*"
output:
path "BiscuitIndex/*.fa*", emit: index, includeInputs: true
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
biscuit \\
index \\
$args \\
$fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,38 @@
name: biscuit_index
description: Indexes a reference genome for use with Biscuit
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- index
- reference
- fasta
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/alignment
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- fasta:
type: file
description: Input genome fasta file
output:
- index:
type: dir
description: Biscuit genome index directory
pattern: "BiscuitIndex"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,43 @@
process BISCUIT_MERGECG {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(bed)
path index
output:
tuple val(meta), path("*.bed.gz"), emit: mergecg_bed
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit mergecg \\
$args \\
\$INDEX \\
$bed | \\
LC_ALL=C sort -k1,1 -k2,2n | \\
bgzip \\
$args2 \\
-c > ${prefix}.bed.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,51 @@
name: biscuit_mergecg
description: Merges methylation information for opposite-strand C's in a CpG context
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- bed
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: |
Biscuit BED file (output of biscuit vcf2bed)
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- mergecg_bed:
type: file
description: Gzipped BED file with merged methylation information
pattern: "*.bed.gz"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,45 @@
process BISCUIT_PILEUP {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(normal_bams), path(normal_bais), path(tumor_bam), path(tumor_bai)
path index
output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1)
def bgzip_cpus = task.cpus-biscuit_cpus
if ( tumor_bam != [] && normal_bams.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: Tumor BAM provided with more than one normal BAM"
if ( tumor_bam.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: more than one tumor BAM provided"
input = ( tumor_bam==[] ) ? "${normal_bams}" : "-S -T ${tumor_bam} -I ${normal_bams}"
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit pileup \\
-@ $biscuit_cpus \\
$args \\
\$INDEX \\
$input \\
| bgzip -@ $bgzip_cpus $args2 > ${prefix}.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,70 @@
name: biscuit_pileup
description: Computes cytosine methylation and callable SNV mutations, optionally in reference to a germline BAM to call somatic variants
keywords:
- bisulfite
- DNA methylation
- pileup
- variant calling
- WGBS
- scWGBS
- bam
- vcf
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/pileup.html
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- normal_bams:
type: file(s)
description: |
BAM files to be analyzed. If no tumor_bam file is provided, any number of "normal" BAMs may be provided
("normal" here is just a semantic issue, these BAMs could be from tumor or any other kind of tissue). If a
tumor BAM file is provided, exactly one normal (germline) BAM must be provided.
pattern: "*.{bam}"
- normal_bais:
type: file(s)
description: BAM index file or files corresponding to the provided normal_bams
pattern: "*.{bai}"
- tumor_bam:
type: file(s)
description: |
Optional. If a tumor BAM file is provided, pileup will run in "somatic" mode and will annotate variants with
their somatic state (present in tumor only, present in normal only, present in both, etc). Note that if a
tumor BAM file is provided, exactly one normal BAM must be provided.
pattern: "*.{bam}"
- tumor_bai:
type: file(s)
description: Optional. BAM index file corresponding to provided tumor_bam
pattern: "*.{bai}"
- index:
type: dir
description: Biscuit genome index directory (generated with 'biscuit index')
pattern: "BiscuitIndex"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: vcf file with methylation information
pattern: "*.{vcf.gz}"
authors:
- "@njspix"

View file

@ -0,0 +1,40 @@
process BISCUIT_QC {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0':
'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }"
input:
tuple val(meta), path(bam)
path(index)
output:
tuple val(meta), path("*.txt"), emit: biscuit_qc_reports
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def se = meta.single_end ? "-s" : ""
"""
INDEX=`find -L ./ -name "*.bis.amb" | sed 's/.bis.amb//'`
biscuit qc \\
$args \\
$se \\
\$INDEX \\
$bam \\
$prefix
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,51 @@
name: biscuit_qc
description: Perform basic quality control on a BAM file generated with Biscuit
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- index
- BAM
- quality control
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM file produced using Biscuit
output:
- biscuit_qc_reports:
type: file
description: |
Summary files containing the following information:
- CpG retention by position in read
- CpH retention by position in read
- Read duplication statistics
- Insert size distribution
- Distribution of mapping qualities
- Proportion of reads mapping to each strand
- Read-averaged cytosine conversion rate for CpA, CpC, CpG, and CpT
pattern: "*.txt"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -0,0 +1,39 @@
process BISCUIT_VCF2BED {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0':
'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }"
input:
tuple val(meta), path(vcf)
output:
tuple val(meta), path("*.bed.gz"), emit: bed
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
biscuit vcf2bed \\
$args \\
$vcf | \\
LC_ALL=C sort -k1,1 -k2,2n | \\
bgzip \\
$args2 \\
-c > ${prefix}.bed.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
biscuit: \$(echo \$(biscuit version 2>&1) | sed 's/^.*BISCUIT Version: //; s/Using.*\$//')
samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,48 @@
name: biscuit_vcf2bed
description: |
Summarizes methylation or SNV information from a Biscuit VCF in a
standard-compliant BED file.
keywords:
- biscuit
- DNA methylation
- WGBS
- scWGBS
- bisulfite sequencing
- aligner
- vcf
tools:
- biscuit:
description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data
homepage: https://huishenlab.github.io/biscuit/
documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html
tool_dev_url: https://github.com/huishenlab/biscuit
doi: ""
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: Biscuit vcf file (output of biscuit pileup)
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: Gzipped BED file with methylation or SNV information
pattern: "*.{bed.gz}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@njspix"

View file

@ -2,10 +2,10 @@ process BOWTIE_ALIGN {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? 'bioconda::bowtie=1.3.0 bioconda::samtools=1.11' : null)
conda (params.enable_conda ? 'bioconda::bowtie=1.3.0 bioconda::samtools=1.15.1' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:9e14e16c284d6860574cf5b624bbc44c793cb024-0' :
'quay.io/biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:9e14e16c284d6860574cf5b624bbc44c793cb024-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:676c5bcfe34af6097728fea60fb7ea83f94a4a5f-0' :
'quay.io/biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:676c5bcfe34af6097728fea60fb7ea83f94a4a5f-0' }"
input:
tuple val(meta), path(reads)

View file

@ -2,10 +2,10 @@ process BOWTIE2_ALIGN {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.14 conda-forge::pigz=2.6' : null)
conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.15.1 conda-forge::pigz=2.6' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' :
'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0' :
'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:1744f68fe955578c63054b55309e05b41c37a80d-0' }"
input:
tuple val(meta), path(reads)

View file

@ -0,0 +1,41 @@
process BRACKEN_BRACKEN {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::bracken=2.6.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bracken:2.6.2--py39hc16433a_0':
'quay.io/biocontainers/bracken:2.6.2--py39hc16433a_0' }"
input:
tuple val(meta), path(kraken_report)
path database
output:
tuple val(meta), path(bracken_report), emit: reports
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def threshold = meta.threshold ?: 10
def taxonomic_level = meta.taxonomic_level ?: 'S'
def read_length = meta.read_length ?: 150
def args = task.ext.args ?: "-l ${taxonomic_level} -t ${threshold} -r ${read_length}"
def prefix = task.ext.prefix ?: "${meta.id}"
def bracken_version = '2.6.2'
bracken_report = "${prefix}_${taxonomic_level}.tsv"
"""
bracken \\
${args} \\
-d '${database}' \\
-i '${kraken_report}' \\
-o '${bracken_report}'
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bracken: ${bracken_version}
END_VERSIONS
"""
}

View file

@ -0,0 +1,45 @@
name: bracken_bracken
description: Re-estimate taxonomic abundance of metagenomic samples analyzed by kraken.
keywords:
- sort
tools:
- bracken:
description: Bracken (Bayesian Reestimation of Abundance with KrakEN) is a highly accurate statistical method that computes the abundance of species in DNA sequences from a metagenomics sample.
homepage: https://ccb.jhu.edu/software/bracken/
documentation: https://ccb.jhu.edu/software/bracken/index.shtml?t=manual
tool_dev_url: https://github.com/jenniferlu717/Bracken
doi: "10.7717/peerj-cs.104"
licence: ["GPL v3"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- kraken_report:
type: file
description: TSV file with six columns coming from kraken2 output
pattern: "*.{tsv}"
- database:
type: file
description: Directory containing the kraken2/Bracken files for analysis
pattern: "*"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- reports:
type: file
description: TSV output report of the re-estimated abundances
pattern: "*.{tsv}"
authors:
- "@Midnighter"

View file

@ -2,10 +2,10 @@ process BWA_MEM {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }"
input:
tuple val(meta), path(reads)
@ -23,14 +23,12 @@ process BWA_MEM {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
def samtools_command = sort_bam ? 'sort' : 'view'
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`
bwa mem \\
$args \\
$read_group \\
-t $task.cpus \\
\$INDEX \\
$reads \\

View file

@ -2,10 +2,10 @@ process BWA_SAMPE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }"
input:
tuple val(meta), path(reads), path(sai)

View file

@ -2,10 +2,10 @@ process BWA_SAMSE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null)
conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' :
'quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:8110a70be2bfe7f75a2ea7f2a89cda4cc7732095-0' }"
input:
tuple val(meta), path(reads), path(sai)

View file

@ -31,4 +31,19 @@ process BWAMEM2_INDEX {
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
END_VERSIONS
"""
stub:
"""
mkdir bwamem2
touch bwamem2/${fasta}.0123
touch bwamem2/${fasta}.ann
touch bwamem2/${fasta}.pac
touch bwamem2/${fasta}.amb
touch bwamem2/${fasta}.bwt.2bit.64
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
END_VERSIONS
"""
}

View file

@ -2,10 +2,10 @@ process BWAMEM2_MEM {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1 bioconda::samtools=1.12" : null)
conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:cf603b12db30ec91daa04ba45a8ee0f35bbcd1e2-0' :
'quay.io/biocontainers/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:cf603b12db30ec91daa04ba45a8ee0f35bbcd1e2-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:38aed4501da19db366dc7c8d52d31d94e760cfaf-0' :
'quay.io/biocontainers/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:38aed4501da19db366dc7c8d52d31d94e760cfaf-0' }"
input:
tuple val(meta), path(reads)
@ -23,7 +23,6 @@ process BWAMEM2_MEM {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
def samtools_command = sort_bam ? 'sort' : 'view'
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`
@ -31,7 +30,6 @@ process BWAMEM2_MEM {
bwa-mem2 \\
mem \\
$args \\
$read_group \\
-t $task.cpus \\
\$INDEX \\
$reads \\
@ -43,4 +41,15 @@ process BWAMEM2_MEM {
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}

View file

@ -1,4 +1,5 @@
process CAT_CAT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "conda-forge::pigz=2.3.4" : null)
@ -7,11 +8,10 @@ process CAT_CAT {
'quay.io/biocontainers/pigz:2.3.4' }"
input:
path files_in
val file_out
tuple val(meta), path(files_in)
output:
path "${file_out}*" , emit: file_out
tuple val(meta), path("${prefix}"), emit: file_out
path "versions.yml" , emit: versions
when:
@ -29,16 +29,30 @@ process CAT_CAT {
// | gzipped | ungzipped | zcat | |
// | ungzipped | gzipped | cat | pigz |
def in_zip = file_list[0].endsWith('.gz')
def out_zip = file_out.endsWith('.gz')
def command1 = (in_zip && !out_zip) ? 'zcat' : 'cat'
def command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : ''
// Use input file ending as default
prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}"
out_zip = prefix.endsWith('.gz')
in_zip = file_list[0].endsWith('.gz')
command1 = (in_zip && !out_zip) ? 'zcat' : 'cat'
command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : ''
"""
$command1 \\
$args \\
${file_list.join(' ')} \\
$command2 \\
> $file_out
> ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""
stub:
def file_list = files_in.collect { it.toString() }
prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}"
"""
touch $prefix
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -12,13 +12,15 @@ tools:
tool_dev_url: None
licence: ["GPL-3.0-or-later"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- files_in:
type: file
description: List of compressed / uncompressed files
pattern: "*"
- file_out:
type: value
description: Full name of output file with or without .gz extension
output:
- versions:
@ -32,3 +34,4 @@ output:
authors:
- "@erikrikarddaniel"
- "@FriederikeHanssen"

View file

@ -4,8 +4,8 @@ process CAT_FASTQ {
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' :
'biocontainers/biocontainers:v1.2.0_cv1' }"
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
input:
tuple val(meta), path(reads, stageAs: "input*/*")

View file

@ -2,8 +2,7 @@
Cell Ranger is a commercial tool from 10X Genomics. The container provided for the cellranger nf-core module is not provided nor supported by 10x Genomics. Updating the Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually.
1. Navigate to the appropriate download page.
- [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies.
1. Navigate to the appropriate download page. - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies.
2. Edit the Dockerfile. Update the Cell Ranger versions in this line:

View file

@ -2,9 +2,7 @@
Bcl2fastq2 and Cell Ranger are commercial tools from Illumina and 10X Genomics, respectively. The container provided for the cellranger nf-core module is not provided nor supported by either Illumina or 10x Genomics. Updating the bcl2fastq2 or Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually.
1. Navigate to the appropriate download pages.
- [bcl2fastq2](https://emea.support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software.html): download the linux rpm installer of the desired bcl2fastq2 version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies.
- [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies.
1. Navigate to the appropriate download pages. - [bcl2fastq2](https://emea.support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software.html): download the linux rpm installer of the desired bcl2fastq2 version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies.
2. Edit the Dockerfile. Update the bcl2fastq2 and Cell Ranger versions in this line:

View file

@ -0,0 +1,61 @@
process CENTRIFUGE_CENTRIFUGE {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6' :
'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }"
input:
tuple val(meta), path(reads)
path db
val save_unaligned
val save_aligned
val sam_format
output:
tuple val(meta), path('*report.txt') , emit: report
tuple val(meta), path('*results.txt') , emit: results
tuple val(meta), path('*.sam') , optional: true, emit: sam
tuple val(meta), path('*.mapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_mapped
tuple val(meta), path('*.unmapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_unmapped
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
def unaligned = ''
def aligned = ''
if (meta.single_end) {
unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-gz ${prefix}.mapped.fastq.gz" : ''
} else {
unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-conc-gz ${prefix}.mapped.fastq.gz" : ''
}
def sam_output = sam_format ? "--out-fmt 'sam'" : ''
"""
## we add "-no-name ._" to ensure silly Mac OSX metafiles files aren't included
db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'`
centrifuge \\
-x \$db_name \\
-p $task.cpus \\
$paired \\
--report-file ${prefix}.report.txt \\
-S ${prefix}.results.txt \\
$unaligned \\
$aligned \\
$sam_output \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
END_VERSIONS
"""
}

View file

@ -0,0 +1,66 @@
name: centrifuge_centrifuge
description: Classifies metagenomic sequence data
keywords:
- classify
- metagenomics
- fastq
- db
tools:
- centrifuge:
description: Centrifuge is a classifier for metagenomic sequences.
homepage: https://ccb.jhu.edu/software/centrifuge/
documentation: https://ccb.jhu.edu/software/centrifuge/manual.shtml
doi: 10.1101/gr.210641.116
licence: ["GPL v3"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
- db:
type: directory
description: Path to directory containing centrifuge database files
- save_unaligned:
type: value
description: If true unmapped fastq files are saved
- save_aligned:
type: value
description: If true mapped fastq files are saved
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- report:
type: file
description: |
File containing a classification summary
pattern: "*.{report.txt}"
- results:
type: file
description: |
File containing classification results
pattern: "*.{results.txt}"
- fastq_unmapped:
type: file
description: Unmapped fastq files
pattern: "*.unmapped.fastq.gz"
- fastq_mapped:
type: file
description: Mapped fastq files
pattern: "*.mapped.fastq.gz"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@sofstam"
- "@jfy133"
- "@sateeshperi"

View file

@ -0,0 +1,33 @@
process CENTRIFUGE_KREPORT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6':
'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }"
input:
tuple val(meta), path(results)
path db
output:
tuple val(meta), path('*.txt') , emit: kreport
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'`
centrifuge-kreport -x \$db_name ${results} > ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
END_VERSIONS
"""
}

View file

@ -0,0 +1,41 @@
name: "centrifuge_kreport"
description: Creates Kraken-style reports from centrifuge out files
keywords:
- metagenomics
tools:
- centrifuge:
description: Centrifuge is a classifier for metagenomic sequences.
homepage: https://ccb.jhu.edu/software/centrifuge/
documentation: https://ccb.jhu.edu/software/centrifuge/manual.shtml
doi: 10.1101/gr.210641.116
licence: ["GPL v3"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- results:
type: file
description: File containing the centrifuge classification results
pattern: "*.{txt}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- kreport:
type: file
description: |
File containing kraken-style report from centrifuge
out files.
pattern: "*.{txt}"
authors:
- "@sofstam"
- "@jfy133"

View file

@ -2,10 +2,10 @@ process CHROMAP_CHROMAP {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::chromap=0.1.5 bioconda::samtools=1.14" : null)
conda (params.enable_conda ? "bioconda::chromap=0.2.1 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' :
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:963e4fe6a85c548a4018585660aed79780a175d3-0' :
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:963e4fe6a85c548a4018585660aed79780a175d3-0' }"
input:
tuple val(meta), path(reads)

View file

@ -1,12 +1,11 @@
process CHROMAP_INDEX {
tag '$fasta'
tag "$fasta"
label 'process_medium'
conda (params.enable_conda ? "bioconda::chromap=0.1.5" : null)
conda (params.enable_conda ? "bioconda::chromap=0.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/chromap:0.1.5--h9a82719_0' :
'quay.io/biocontainers/chromap:0.1.5--h9a82719_0' }"
'https://depot.galaxyproject.org/singularity/chromap:0.2.1--hd03093a_0' :
'quay.io/biocontainers/chromap:0.2.1--hd03093a_0' }"
input:
path fasta

View file

@ -0,0 +1,44 @@
process CNVPYTOR_CALLCNVS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2':
'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }"
input:
tuple val(meta), path(pytor)
output:
tuple val(meta), path("*.tsv"), emit: cnvs
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: '1000'
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cnvpytor \\
-root $pytor \\
-call $args > ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
}

View file

@ -0,0 +1,39 @@
name: cnvpytor_callcnvs
description: command line tool for calling CNVs in whole genome sequencing data
- CNV calling
tools:
- cnvpytor:
description: calling CNVs using read depth
homepage: https://github.com/abyzovlab/CNVpytor
documentation: https://github.com/abyzovlab/CNVpytor
tool_dev_url: https://github.com/abyzovlab/CNVpytor
doi: "10.1101/2021.01.27.428472v1"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test']
- pytor:
type: file
description: cnvpytor root file
pattern: "*.{pytor}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- cnvs:
type: file
description: file containing identified copy numer variations
pattern: "*.{tsv}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@sima-r"

View file

@ -0,0 +1,42 @@
process CNVPYTOR_HISTOGRAM {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2':
'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }"
input:
tuple val(meta), path(pytor)
output:
tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: '1000'
"""
cnvpytor \\
-root $pytor \\
-his $args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
"""
touch ${pytor.baseName}.pytor
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
}

View file

@ -0,0 +1,42 @@
name: cnvpytor_histogram
description: calculates read depth histograms
keywords:
- cnv calling
- histogram
tools:
- cnvpytor:
description: calling CNVs using read depth
homepage: https://github.com/abyzovlab/CNVpytor
documentation: https://github.com/abyzovlab/CNVpytor
tool_dev_url: https://github.com/abyzovlab/CNVpytor
doi: "10.1101/2021.01.27.428472v1"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- pytor:
type: file
description: pytor file containing read depth data
pattern: "*.{pytor}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- pytor:
type: file
description: pytor file containing read depth histograms binned based on given bin size(s)
pattern: "*.{pytor}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@sima-r"

View file

@ -0,0 +1,49 @@
process CNVPYTOR_IMPORTREADDEPTH {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2':
'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }"
input:
tuple val(meta), path(input_file), path(index)
path fasta
path fai
output:
tuple val(meta), path("*.pytor") , emit: pytor
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reference = fasta ? "-T ${fasta}" : ''
"""
cnvpytor \\
-root ${prefix}.pytor \\
-rd $input_file \\
$args \\
$reference
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.pytor
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
}

View file

@ -0,0 +1,54 @@
name: cnvpytor_importreaddepth
description: command line tool for CNV/CNA analysis. This step imports the read depth data into a root pytor file.
keywords:
- read depth
- cnv calling
tools:
- cnvpytor -rd:
description: calling CNVs using read depth
homepage: https://github.com/abyzovlab/CNVpytor
documentation: https://github.com/abyzovlab/CNVpytor
tool_dev_url: https://github.com/abyzovlab/CNVpytor
doi: "10.1101/2021.01.27.428472v1"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- input_file:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram}"
- index:
type: file
description: bam file index
pattern: "*.{bai,crai}"
- fasta:
type: file
description: specifies reference genome file (only for cram file without reference genome)
pattern: "*.{fasta,fasta.gz,fa,fa.gz}"
- fai:
type: file
description: Index of reference fasta file
pattern: "*.fai"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- pytor:
type: file
description: read depth root file in which read depth data binned to 100 base pair bins will be stored.
pattern: "*.{pytor}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@sima-r"

View file

@ -0,0 +1,42 @@
process CNVPYTOR_PARTITION {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2':
'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }"
input:
tuple val(meta), path(pytor)
output:
tuple val(meta), path("${pytor.baseName}.pytor"), emit: pytor
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
cnvpytor \\
-root $pytor \\
-partition $args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
"""
touch ${pytor.baseName}.pytor
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
}

View file

@ -0,0 +1,42 @@
name: cnvpytor_partition
description: partitioning read depth histograms
keywords:
- cnv calling
- partition histograms
tools:
- cnvpytor:
description: calling CNVs using read depth
homepage: https://github.com/abyzovlab/CNVpytor
documentation: https://github.com/abyzovlab/CNVpytor
tool_dev_url: https://github.com/abyzovlab/CNVpytor
doi: "10.1101/2021.01.27.428472v1"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- pytor:
type: file
description: pytor file containing read depth data
pattern: "*.{pytor}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- partitions:
type: file
description: pytor file containing partitions of read depth histograms using mean-shift method
pattern: "*.{pytor}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@sima-r"

View file

@ -0,0 +1,44 @@
process CONTROLFREEC_ASSESSSIGNIFICANCE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::control-freec=11.6" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }"
input:
tuple val(meta), path(cnvs), path(ratio)
output:
tuple val(meta), path("*.p.value.txt"), emit: p_value_txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cat \$(which assess_significance.R) | R --slave --args ${cnvs} ${ratio}
mv *.p.value.txt ${prefix}.p.value.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" )
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.p.value.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" )
END_VERSIONS
"""
}

View file

@ -0,0 +1,50 @@
name: controlfreec_assesssignificance
description: Add both Wilcoxon test and Kolmogorov-Smirnov test p-values to each CNV output of FREEC
keywords:
- cna
- cnv
- somatic
- single
- tumor-only
tools:
- controlfreec/assesssignificance:
description: Copy number and genotype annotation from whole genome and whole exome sequencing data.
homepage: http://boevalab.inf.ethz.ch/FREEC
documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html
tool_dev_url: https://github.com/BoevaLab/FREEC/
doi: "10.1093/bioinformatics/btq635"
licence: ["GPL >=2"]
input:
# Only when we have meta
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- cnvs:
type: file
description: _CNVs file generated by FREEC
pattern: "*._CNVs"
- ratio:
type: file
description: ratio file generated by FREEC
pattern: "*.ratio.txt"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- p_value_txt:
type: file
description: CNV file containing p_values for each call
pattern: "*.p.value.txt"
authors:
- "@FriederikeHanssen"

View file

@ -0,0 +1,176 @@
process CONTROLFREEC_FREEC {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::control-freec=11.6" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }"
input:
tuple val(meta), path(mpileup_normal), path(mpileup_tumor), path(cpn_normal), path(cpn_tumor), path(minipileup_normal), path(minipileup_tumor)
path fasta
path fai
path snp_position
path known_snps
path known_snps_tbi
path chr_directory
path mappability
path target_bed
path gccontent_profile
output:
tuple val(meta), path("*_ratio.BedGraph") , emit: bedgraph, optional: true
tuple val(meta), path("*_control.cpn") , emit: control_cpn, optional: true
tuple val(meta), path("*_sample.cpn") , emit: sample_cpn
tuple val(meta), path("GC_profile.*.cpn") , emit: gcprofile_cpn, optional:true
tuple val(meta), path("*_BAF.txt") , emit: BAF
tuple val(meta), path("*_CNVs") , emit: CNV
tuple val(meta), path("*_info.txt") , emit: info
tuple val(meta), path("*_ratio.txt") , emit: ratio
tuple val(meta), path("config.txt") , emit: config
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
//"General" configurations
def bedgraphoutput = task.ext.args?["general"]?["bedgraphoutput"] ? "BedGraphOutput = ${task.ext.args["general"]["bedgraphoutput"]}" : ""
def chr_files = chr_directory ? "chrFiles =\${PWD}/${chr_directory}" : ""
def chr_length = fai ? "chrLenFile = \${PWD}/${fai}" : ""
def breakpointthreshold = task.ext.args?["general"]?["breakpointthreshold"] ? "breakPointThreshold = ${task.ext.args["general"]["breakpointthreshold"]}" : ""
def breakpointtype = task.ext.args?["general"]?["breakpointtype"] ? "breakPointType = ${task.ext.args["general"]["breakpointtype"]}" : ""
def coefficientofvariation = task.ext.args?["general"]?["coefficientofvariation"] ? "coefficientOfVariation = ${task.ext.args["general"]["coefficientofvariation"]}" : ""
def contamination = task.ext.args?["general"]?["contamination"] ? "contamination = ${task.ext.args["general"]["contamination"]}" : ""
def contaminationadjustment = task.ext.args?["general"]?["contaminationadjustment"] ? "contaminationAdjustment = ${task.ext.args["general"]["contaminationadjustment"]}" : ""
def degree = task.ext.args?["general"]?["degree"] ? "degree = ${task.ext.args["general"]["degree"]}" : ""
def forcegccontentnormalization = task.ext.args?["general"]?["forcegccontentnormalization"] ? "forceGCcontentNormalization = ${task.ext.args["general"]["forcegccontentnormalization"]}" : ""
def gccontentprofile = gccontent_profile ? "GCcontentProfile = ${gccontent_profile}" : ""
def mappability = mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : ""
def intercept = task.ext.args?["general"]?["intercept"] ? "intercept = ${task.ext.args["general"]["intercept"]}" : ""
def mincnalength = task.ext.args?["general"]?["mincnalength"] ? "minCNAlength = ${task.ext.args["general"]["mincnalength"]}" : ""
def minmappabilityperwindow = task.ext.args?["general"]?["minmappabilityperwindow"] ? "minMappabilityPerWindow = ${task.ext.args["general"]["minmappabilityperwindow"]}" : ""
def minexpectedgc = task.ext.args?["general"]?["minexpectedgc"] ? "minExpectedGC = ${task.ext.args["general"]["minexpectedgc"]}" : ""
def maxexpectedgc = task.ext.args?["general"]?["maxexpectedgc"] ? "maxExpectedGC = ${task.ext.args["general"]["maxexpectedgc"]}" : ""
def minimalsubclonepresence = task.ext.args?["general"]?["minimalsubclonepresence"] ? "minimalSubclonePresence = ${task.ext.args["general"]["minimalsubclonepresence"]}" : ""
def noisydata = task.ext.args?["general"]?["noisydata"] ? "noisyData = ${task.ext.args["general"]["noisydata"]}" : ""
def output = task.ext.prefix ? "outputDir = \${PWD}/${task.ext.prefix}" : ""
def ploidy = task.ext.args?["general"]?["ploidy"] ? "ploidy = ${task.ext.args["general"]["ploidy"]}" : ""
def printNA = task.ext.args?["general"]?["printNA"] ? "printNA = ${task.ext.args["general"]["printNA"]}" : ""
def readcountthreshold = task.ext.args?["general"]?["readcountthreshold"] ? "readCountThreshold = ${task.ext.args["general"]["readcountthreshold"]}" : ""
def sex = task.ext.args?["general"]?["sex"] ? "sex = ${task.ext.args["general"]["sex"]}" : ""
def step = task.ext.args?["general"]?["step"] ? "step = ${task.ext.args["general"]["step"]}" : ""
def telocentromeric = task.ext.args?["general"]?["telocentromeric"] ? "telocentromeric = ${task.ext.args["general"]["telocentromeric"]} " : ""
def uniquematch = task.ext.args?["general"]?["uniquematch"] ? "uniqueMatch = ${task.ext.args["general"]["uniquematch"]}" : ""
def window = task.ext.args?["general"]?["window"] ? "window = ${task.ext.args["general"]["window"]}" : ""
//"Control" configurations
def matefile_normal = mpileup_normal ? "mateFile = \${PWD}/${mpileup_normal}" : ""
def matecopynumberfile_normal = cpn_normal ? "mateCopyNumberFile = \${PWD}/${cpn_normal}" : ""
def minipileup_normal = minipileup_normal ? "miniPileup = \${PWD}/${minipileup_normal}" : ""
def inputformat_normal = task.ext.args?["control"]?["inputformat"] ? "inputFormat = ${task.ext.args["control"]["inputformat"]}" : ""
def mateorientation_normal = task.ext.args?["control"]?["mateorientation"] ? "mateOrientation = ${task.ext.args["control"]["mateorientation"]}" : ""
//"Sample" configuration
def matefile_tumor = mpileup_tumor ? "mateFile = \${PWD}/${mpileup_tumor}" : ""
def matecopynumberfile_tumor = cpn_tumor ? "mateCopyNumberFile = \${PWD}/${cpn_tumor}" : ""
def minipileup_tumor = minipileup_tumor ? "miniPileup = \${PWD}/${minipileup_tumor}" : ""
def inputformat_tumor = task.ext.args?["sample"]?["inputformat"] ? "inputFormat = ${task.ext.args["sample"]["inputformat"]}" : ""
def mateorientation_tumor = task.ext.args?["sample"]?["mateorientation"] ? "mateOrientation = ${task.ext.args["sample"]["mateorientation"]}" : ""
//"BAF" configuration
def makepileup = snp_position ? "makePileup = \${PWD}/${snp_position}" : ""
def fastafile = fasta ? "fastaFile = \${PWD}/${fasta}" : ""
def minimalcoverageperposition = task.ext.args?["BAF"]?["minimalcoverageperposition"] ? "minimalCoveragePerPosition = ${task.ext.args["BAF"]["minimalcoverageperposition"]}" : ""
def minimalqualityperposition = task.ext.args?["BAF"]?["minimalqualityperposition"] ? "minimalQualityPerPosition = ${task.ext.args["BAF"]["minimalqualityperposition"]}" : ""
def shiftinquality = task.ext.args?["BAF"]?["shiftinquality"] ? "shiftInQuality = ${task.ext.args["BAF"]["shiftinquality"]}" : ""
def snpfile = known_snps ? "SNPfile = \$PWD/${known_snps}" : ""
//"Target" configuration
def target_bed = target_bed ? "captureRegions = ${target_bed}" : ""
"""
touch config.txt
echo "[general]" >> config.txt
echo ${bedgraphoutput} >> config.txt
echo ${breakpointthreshold} >> config.txt
echo ${breakpointtype} >> config.txt
echo ${chr_files} >> config.txt
echo ${chr_length} >> config.txt
echo ${coefficientofvariation} >> config.txt
echo ${contamination} >> config.txt
echo ${contaminationadjustment} >> config.txt
echo ${degree} >> config.txt
echo ${forcegccontentnormalization} >> config.txt
echo ${gccontentprofile} >> config.txt
echo ${mappability} >> config.txt
echo ${intercept} >> config.txt
echo ${mincnalength} >> config.txt
echo ${minmappabilityperwindow} >> config.txt
echo ${minexpectedgc} >> config.txt
echo ${maxexpectedgc} >> config.txt
echo ${minimalsubclonepresence} >> config.txt
echo "maxThreads = ${task.cpus}" >> config.txt
echo ${noisydata} >> config.txt
echo ${output} >> config.txt
echo ${ploidy} >> config.txt
echo ${printNA} >> config.txt
echo ${readcountthreshold} >> config.txt
echo ${sex} >> config.txt
echo ${step} >> config.txt
echo ${telocentromeric} >> config.txt
echo ${uniquematch} >> config.txt
echo ${window} >> config.txt
echo "[control]" >> config.txt
echo ${matefile_normal} >> config.txt
echo ${matecopynumberfile_normal} >> config.txt
echo ${minipileup_normal} >> config.txt
echo ${inputformat_normal} >> config.txt
echo ${mateorientation_normal} >> config.txt
echo "[sample]" >> config.txt
echo ${matefile_tumor} >> config.txt
echo ${matecopynumberfile_tumor} >> config.txt
echo ${minipileup_tumor} >> config.txt
echo ${inputformat_tumor} >> config.txt
echo ${mateorientation_tumor} >> config.txt
echo "[BAF]" >> config.txt
echo ${makepileup} >> config.txt
echo ${fastafile} >> config.txt
echo ${minimalcoverageperposition} >> config.txt
echo ${minimalqualityperposition} >> config.txt
echo ${shiftinquality} >> config.txt
echo ${snpfile} >> config.txt
echo "[target]" >> config.txt
echo ${target_bed} >> config.txt
freec -conf config.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" )
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_ratio.BedGraph
touch ${prefix}_sample.cpn
touch GC_profile.${prefix}.cpn
touch ${prefix}_BAF.txt
touch ${prefix}_CNVs
touch ${prefix}_info.txt
touch ${prefix}_ratio.txt
touch config.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" )
END_VERSIONS
"""
}

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