mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge remote-tracking branch 'nf-core/master'
This commit is contained in:
commit
b83db65f33
247 changed files with 3284 additions and 816 deletions
82
.github/check_duplicate_md5s.py
vendored
Normal file
82
.github/check_duplicate_md5s.py
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from rich import print
|
||||
from rich.table import Table
|
||||
import click
|
||||
import glob
|
||||
import os
|
||||
import yaml
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option(
|
||||
"--min_dups",
|
||||
default=5,
|
||||
show_default=True,
|
||||
help="Minimum number of duplicates to report",
|
||||
)
|
||||
@click.option(
|
||||
"--search_dir",
|
||||
default=f"{os.path.dirname(__file__)}/../tests/**/test.yml",
|
||||
show_default=True,
|
||||
help="Glob directory pattern used to find test YAML files",
|
||||
)
|
||||
def find_duplicate_md5s(min_dups, search_dir):
|
||||
"""
|
||||
Find duplicate file MD5 sums in test YAML files.
|
||||
"""
|
||||
md5_filenames = {}
|
||||
md5_output_fn_counts = {}
|
||||
module_counts = {}
|
||||
|
||||
# Loop through all files in tests/ called test.yml
|
||||
for test_yml in glob.glob(search_dir, recursive=True):
|
||||
# Open file and parse YAML
|
||||
with open(test_yml, "r") as fh:
|
||||
test_config = yaml.safe_load(fh)
|
||||
# Loop through tests and check for duplicate md5s
|
||||
for test in test_config:
|
||||
for test_file in test.get("files", []):
|
||||
if "md5sum" in test_file:
|
||||
md5 = test_file["md5sum"]
|
||||
md5_filenames[md5] = md5_filenames.get(md5, []) + [
|
||||
os.path.basename(test_file.get("path"))
|
||||
]
|
||||
md5_output_fn_counts[md5] = md5_output_fn_counts.get(md5, 0) + 1
|
||||
# Log the module that this md5 was in
|
||||
modname = os.path.basename(os.path.dirname(test_yml))
|
||||
# If tool/subtool show the whole thing
|
||||
# Ugly code but trying to stat os-agnostic
|
||||
if os.path.basename(
|
||||
os.path.dirname(os.path.dirname(test_yml))
|
||||
) not in ["modules", "config", "subworkflows"]:
|
||||
modname = "{}/{}".format(
|
||||
os.path.basename(
|
||||
os.path.dirname(os.path.dirname(test_yml))
|
||||
),
|
||||
os.path.basename(os.path.dirname(test_yml)),
|
||||
)
|
||||
module_counts[md5] = module_counts.get(md5, []) + [modname]
|
||||
|
||||
# Set up rich table
|
||||
table = Table(title="Duplicate MD5s", row_styles=["dim", ""])
|
||||
table.add_column("MD5", style="cyan", no_wrap=True)
|
||||
table.add_column("Count", style="magenta", justify="right")
|
||||
table.add_column("Num modules", style="blue", justify="right")
|
||||
table.add_column("Filenames", style="green")
|
||||
|
||||
# Add rows - sort md5_output_fn_counts by value
|
||||
for md5 in sorted(md5_output_fn_counts, key=md5_output_fn_counts.get):
|
||||
if md5_output_fn_counts[md5] >= min_dups:
|
||||
table.add_row(
|
||||
md5,
|
||||
str(md5_output_fn_counts[md5]),
|
||||
str(len(set(module_counts[md5]))),
|
||||
", ".join(set(md5_filenames[md5])),
|
||||
)
|
||||
|
||||
print(table)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
find_duplicate_md5s()
|
15
.github/workflows/pytest-workflow.yml
vendored
15
.github/workflows/pytest-workflow.yml
vendored
|
@ -48,11 +48,6 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: python -m pip install --upgrade pip pytest-workflow
|
||||
|
||||
|
@ -93,6 +88,16 @@ jobs:
|
|||
# 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
|
||||
|
||||
- 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
|
||||
|
||||
- name: Upload logs on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
10
.gitpod.yml
Normal file
10
.gitpod.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
|
||||
tasks:
|
||||
- name: Install Nextflow
|
||||
init: |
|
||||
curl -s https://get.nextflow.io | bash
|
||||
sudo mv nextflow /usr/local/bin
|
||||
|
||||
- name: Install pytest-workflow
|
||||
init: |
|
||||
pip install pytest-workflow
|
|
@ -43,7 +43,10 @@ process ARTIC_MINION {
|
|||
summary = ""
|
||||
model = file(medaka_model).exists() ? "--medaka-model ./$medaka_model" : "--medaka-model $medaka_model"
|
||||
}
|
||||
def hd5_plugin_path = task.ext.hd5_plugin_path ? "export HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "export HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin"
|
||||
"""
|
||||
$hd5_plugin_path
|
||||
|
||||
artic \\
|
||||
minion \\
|
||||
$args \\
|
||||
|
|
|
@ -5,7 +5,7 @@ process ATAQV_ATAQV {
|
|||
conda (params.enable_conda ? "bioconda::ataqv=1.2.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/ataqv:1.2.1--py39ha23c084_2' :
|
||||
'quay.io/biocontainers/ataqv:1.2.1--py36hfdecbe1_2' }"
|
||||
'quay.io/biocontainers/ataqv:1.2.1--py39ha23c084_2' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai), path(peak_file)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_CONCAT {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0' :
|
||||
'quay.io/biocontainers/bcftools:1.11--h7c999a4_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcfs)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_CONSENSUS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi), path(fasta)
|
||||
|
@ -18,9 +18,12 @@ process BCFTOOLS_CONSENSUS {
|
|||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
cat $fasta | bcftools consensus $vcf $args > ${prefix}.fa
|
||||
header=\$(head -n 1 ${prefix}.fa | sed 's/>//g')
|
||||
sed -i 's/\${header}/${meta.id}/g' ${prefix}.fa
|
||||
cat $fasta \\
|
||||
| bcftools \\
|
||||
consensus \\
|
||||
$vcf \\
|
||||
$args \\
|
||||
> ${prefix}.fa
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_FILTER {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_INDEX {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
@ -13,7 +13,7 @@ process BCFTOOLS_INDEX {
|
|||
output:
|
||||
tuple val(meta), path("*.csi"), optional:true, emit: csi
|
||||
tuple val(meta), path("*.tbi"), optional:true, emit: tbi
|
||||
path "versions.yml" , emit: version
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_ISEC {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcfs), path(tbis)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_MERGE {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcfs), path(tbis)
|
||||
|
|
|
@ -2,19 +2,21 @@ process BCFTOOLS_MPILEUP {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path fasta
|
||||
path fasta
|
||||
val save_mpileup
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.gz") , emit: vcf
|
||||
tuple val(meta), path("*.tbi") , emit: tbi
|
||||
tuple val(meta), path("*stats.txt"), emit: stats
|
||||
tuple val(meta), path("*.mpileup") , emit: mpileup, optional: true
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
|
@ -22,13 +24,16 @@ process BCFTOOLS_MPILEUP {
|
|||
def args2 = task.ext.args2 ?: ''
|
||||
def args3 = task.ext.args3 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : ""
|
||||
"""
|
||||
echo "${meta.id}" > sample_name.list
|
||||
|
||||
bcftools mpileup \\
|
||||
bcftools \\
|
||||
mpileup \\
|
||||
--fasta-ref $fasta \\
|
||||
$args \\
|
||||
$bam \\
|
||||
$mpileup \\
|
||||
| bcftools call --output-type v $args2 \\
|
||||
| bcftools reheader --samples sample_name.list \\
|
||||
| bcftools view --output-file ${prefix}.vcf.gz --output-type z $args3
|
||||
|
|
|
@ -26,6 +26,10 @@ input:
|
|||
type: file
|
||||
description: FASTA reference file
|
||||
pattern: "*.{fasta,fa}"
|
||||
- save_mpileup:
|
||||
type: boolean
|
||||
description: Save mpileup file generated by bcftools mpileup
|
||||
patter: "*.mpileup"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_NORM {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.13" : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_QUERY {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.13" : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(index)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_REHEADER {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.13" : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
|
32
modules/bcftools/sort/main.nf
Normal file
32
modules/bcftools/sort/main.nf
Normal file
|
@ -0,0 +1,32 @@
|
|||
process BCFTOOLS_SORT {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.14" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0':
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.gz"), emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
bcftools \\
|
||||
sort \\
|
||||
--output ${prefix}.vcf.gz \\
|
||||
$args \\
|
||||
$vcf
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
43
modules/bcftools/sort/meta.yml
Normal file
43
modules/bcftools/sort/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: bcftools_sort
|
||||
description: Sorts VCF files
|
||||
keywords:
|
||||
- sorting
|
||||
- VCF
|
||||
- variant calling
|
||||
tools:
|
||||
- sort:
|
||||
description: Sort VCF files by coordinates.
|
||||
homepage: http://samtools.github.io/bcftools/bcftools.html
|
||||
documentation: http://www.htslib.org/doc/bcftools.html
|
||||
tool_dev_url: https://github.com/samtools/bcftools
|
||||
doi: "10.1093/bioinformatics/btp352"
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: The VCF/BCF file to be sorted
|
||||
pattern: "*.{vcf.gz,vcf,bcf}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- vcf:
|
||||
type: file
|
||||
description: Sorted VCF file
|
||||
pattern: "*.{vcf.gz}"
|
||||
|
||||
authors:
|
||||
- "@Gwennid"
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_STATS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
|
|
@ -2,10 +2,10 @@ process BCFTOOLS_VIEW {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bcftools=1.13" : null)
|
||||
conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' :
|
||||
'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' :
|
||||
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(index)
|
||||
|
|
|
@ -2,27 +2,28 @@ process BOWTIE2_ALIGN {
|
|||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::bowtie2=2.4.2 bioconda::samtools=1.11 conda-forge::pigz=2.3.4' : null)
|
||||
conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.14 conda-forge::pigz=2.6' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:577a697be67b5ae9b16f637fd723b8263a3898b3-0' :
|
||||
'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:577a697be67b5ae9b16f637fd723b8263a3898b3-0' }"
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' :
|
||||
'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
val save_unaligned
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*.bam'), emit: bam
|
||||
tuple val(meta), path('*.log'), emit: log
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq
|
||||
tuple val(meta), path('*.bam') , emit: bam
|
||||
tuple val(meta), path('*.log') , emit: log
|
||||
tuple val(meta), path('*fastq.gz'), emit: fastq, optional:true
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
if (meta.single_end) {
|
||||
def unaligned = params.save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
|
||||
def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
|
||||
"""
|
||||
INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'`
|
||||
bowtie2 \\
|
||||
|
@ -42,7 +43,7 @@ process BOWTIE2_ALIGN {
|
|||
END_VERSIONS
|
||||
"""
|
||||
} else {
|
||||
def unaligned = params.save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
|
||||
def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
|
||||
"""
|
||||
INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'`
|
||||
bowtie2 \\
|
||||
|
|
|
@ -5,7 +5,7 @@ process BOWTIE2_BUILD {
|
|||
conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bowtie2:2.4.4--py39hbb4e92a_0' :
|
||||
'quay.io/biocontainers/bowtie2:2.4.4--py36hd4290be_0' }"
|
||||
'quay.io/biocontainers/bowtie2:2.4.4--py39hbb4e92a_0' }"
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
|
|
@ -18,30 +18,28 @@ process CAT_CAT {
|
|||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def file_list = files_in.collect { it.toString() }
|
||||
if (file_list.size > 1) {
|
||||
|
||||
// | input | output | command1 | command2 |
|
||||
// |-----------|------------|----------|----------|
|
||||
// | gzipped | gzipped | cat | |
|
||||
// | ungzipped | ungzipped | cat | |
|
||||
// | gzipped | ungzipped | zcat | |
|
||||
// | ungzipped | gzipped | cat | pigz |
|
||||
// | input | output | command1 | command2 |
|
||||
// |-----------|------------|----------|----------|
|
||||
// | gzipped | gzipped | cat | |
|
||||
// | ungzipped | ungzipped | 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" : ''
|
||||
"""
|
||||
$command1 \\
|
||||
$args \\
|
||||
${file_list.join(' ')} \\
|
||||
$command2 \\
|
||||
> $file_out
|
||||
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" : ''
|
||||
"""
|
||||
$command1 \\
|
||||
$args \\
|
||||
${file_list.join(' ')} \\
|
||||
$command2 \\
|
||||
> $file_out
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
1
modules/cellranger/.gitignore
vendored
1
modules/cellranger/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
cellranger-*.tar.gz
|
||||
bcl2fastq2-*.zip
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
# Dockerfile to create container with Cell Ranger v6.1.2
|
||||
# Push to nfcore/cellranger:<VER>
|
||||
|
||||
FROM continuumio/miniconda3:4.8.2
|
||||
LABEL authors="Gisela Gabernet <gisela.gabernet@gmail.com>" \
|
||||
description="Docker image containing Cell Ranger"
|
||||
# Disclaimer: this container is not provided nor supported by 10x Genomics.
|
||||
# Disclaimer: this container is not provided nor supported by Illumina or 10x Genomics.
|
||||
|
||||
# Install procps and clean apt cache
|
||||
RUN apt-get update --allow-releaseinfo-change \
|
||||
&& apt-get install -y procps \
|
||||
&& apt-get install -y \
|
||||
cpio \
|
||||
procps \
|
||||
rpm2cpio \
|
||||
unzip \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy pre-downloaded cellranger file
|
||||
ENV CELLRANGER_VER 6.0.2
|
||||
ENV CELLRANGER_VER=6.1.2
|
||||
COPY cellranger-$CELLRANGER_VER.tar.gz /opt/cellranger-$CELLRANGER_VER.tar.gz
|
||||
|
||||
# Install cellranger
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
# Updating the docker container and making a new module release
|
||||
|
||||
Cell Ranger is a commercial tool by 10X Genomics. The container provided for the cellranger nf-core module is not provided nor supported by 10x Genomics. Updating the Cell Ranger version in the container and pushing the update to Dockerhub needs to be done manually.
|
||||
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 [Cell Ranger download page](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest) and 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 version in this line:
|
||||
2. Edit the Dockerfile. Update the Cell Ranger versions in this line:
|
||||
|
||||
```bash
|
||||
ENV CELLRANGER_VER <VERSION>
|
||||
ENV CELLRANGER_VER=<VERSION>
|
||||
```
|
||||
|
||||
3. Create the container:
|
||||
3. Create and test the container:
|
||||
|
||||
```bash
|
||||
docker build . -t nfcore/cellranger:<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/cellranger:<VERSION>
|
||||
```
|
||||
|
|
|
@ -5,7 +5,7 @@ process CELLRANGER_COUNT {
|
|||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers."
|
||||
}
|
||||
container "nfcore/cellranger:6.0.2"
|
||||
container "nfcore/cellranger:6.1.2"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
|
40
modules/cellranger/mkfastq/Dockerfile
Normal file
40
modules/cellranger/mkfastq/Dockerfile
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Dockerfile to create container with Cell Ranger v6.1.2 and bcl2fastq v2.20.0
|
||||
# Push to nfcore/cellrangermkfastq:<VER>
|
||||
|
||||
FROM continuumio/miniconda3:4.8.2
|
||||
LABEL authors="Regina Reynolds, Gisela Gabernet <gisela.gabernet@gmail.com>" \
|
||||
description="Docker image containing bcl2fastq2 and Cell Ranger"
|
||||
# Disclaimer: this container is not provided nor supported by Illumina or 10x Genomics.
|
||||
|
||||
# Install procps and clean apt cache
|
||||
RUN apt-get update --allow-releaseinfo-change \
|
||||
&& apt-get install -y \
|
||||
cpio \
|
||||
procps \
|
||||
rpm2cpio \
|
||||
unzip \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy pre-downloaded bcl2fastq2 and cellranger file
|
||||
ENV BCL2FASTQ2_VER=v2-20-0-linux-x86-64 \
|
||||
CELLRANGER_VER=6.1.2
|
||||
COPY bcl2fastq2-$BCL2FASTQ2_VER.zip /tmp/bcl2fastq2-$BCL2FASTQ2_VER.zip
|
||||
COPY cellranger-$CELLRANGER_VER.tar.gz /opt/cellranger-$CELLRANGER_VER.tar.gz
|
||||
|
||||
# Install bcl2fastq2
|
||||
RUN \
|
||||
cd /tmp && \
|
||||
unzip bcl2fastq2-$BCL2FASTQ2_VER.zip && \
|
||||
mv *.rpm bcl2fastq2-$BCL2FASTQ2_VER.rpm && \
|
||||
rpm2cpio ./bcl2fastq2-$BCL2FASTQ2_VER.rpm | cpio -idmv && \
|
||||
export PATH=/tmp/usr/local/bin/:$PATH && \
|
||||
ln -s /tmp/usr/local/bin/bcl2fastq /usr/bin/bcl2fastq && \
|
||||
rm -rf bcl2fastq2-$BCL2FASTQ2_VER.*
|
||||
|
||||
# Install cellranger
|
||||
RUN \
|
||||
cd /opt && \
|
||||
tar -xzvf cellranger-$CELLRANGER_VER.tar.gz && \
|
||||
export PATH=/opt/cellranger-$CELLRANGER_VER:$PATH && \
|
||||
ln -s /opt/cellranger-$CELLRANGER_VER/cellranger /usr/bin/cellranger && \
|
||||
rm -rf /opt/cellranger-$CELLRANGER_VER.tar.gz
|
26
modules/cellranger/mkfastq/README.md
Normal file
26
modules/cellranger/mkfastq/README.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Updating the docker container and making a new module release
|
||||
|
||||
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.
|
||||
|
||||
2. Edit the Dockerfile. Update the bcl2fastq2 and Cell Ranger versions in this line:
|
||||
|
||||
```bash
|
||||
ENV BCL2FASTQ2_VER=<VERSION> \
|
||||
CELLRANGER_VER=<VERSION>
|
||||
```
|
||||
|
||||
3. Create and test the container:
|
||||
|
||||
```bash
|
||||
docker build . -t nfcore/cellrangermkfastq:<CELLRANGER_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/cellrangermkfastq:<CELLRANGER_VERSION>
|
||||
```
|
|
@ -5,7 +5,7 @@ process CELLRANGER_MKFASTQ {
|
|||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers."
|
||||
}
|
||||
container "litd/docker-cellranger:v6.1.1" // FIXME Add bcl2fastq to nf-core docker image
|
||||
container "nfcore/cellrangermkfastq:6.1.2"
|
||||
|
||||
input:
|
||||
path bcl
|
||||
|
@ -13,14 +13,14 @@ process CELLRANGER_MKFASTQ {
|
|||
|
||||
output:
|
||||
path "versions.yml", emit: versions
|
||||
path "*.fastq.gz" , emit: fastq
|
||||
path "${bcl.getSimpleName()}/outs/fastq_path/*.fastq.gz" , emit: fastq
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
"""
|
||||
cellranger mkfastq --id=${bcl.getSimpleName()} \
|
||||
--run=$bcl \
|
||||
--csv=$csv
|
||||
--csv=$csv \
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
@ -28,4 +28,15 @@ process CELLRANGER_MKFASTQ {
|
|||
cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
|
||||
stub:
|
||||
"""
|
||||
mkdir -p "${bcl.getSimpleName()}/outs/fastq_path/"
|
||||
touch ${bcl.getSimpleName()}/outs/fastq_path/fake_file.fastq.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ process CELLRANGER_MKGTF {
|
|||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers."
|
||||
}
|
||||
container "nfcore/cellranger:6.0.2"
|
||||
container "nfcore/cellranger:6.1.2"
|
||||
|
||||
input:
|
||||
path gtf
|
||||
|
|
|
@ -5,7 +5,7 @@ process CELLRANGER_MKREF {
|
|||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers."
|
||||
}
|
||||
container "nfcore/cellranger:6.0.2"
|
||||
container "nfcore/cellranger:6.1.2"
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
def VERSION = '0.1' // Version information not provided by tool on CLI
|
||||
|
||||
process CHROMAP_CHROMAP {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::chromap=0.1 bioconda::samtools=1.13" : null)
|
||||
conda (params.enable_conda ? "bioconda::chromap=0.1.5 bioconda::samtools=1.14" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' :
|
||||
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' }"
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' :
|
||||
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
@ -45,7 +43,7 @@ process CHROMAP_CHROMAP {
|
|||
args_list << "--pairs-natural-chr-order $pairs_chr_order"
|
||||
}
|
||||
def final_args = args_list.join(' ')
|
||||
def compression_cmds = "gzip ${prefix}.${file_extension}"
|
||||
def compression_cmds = "gzip -n ${prefix}.${file_extension}"
|
||||
if (args.contains("--SAM")) {
|
||||
compression_cmds = """
|
||||
samtools view $args2 -@ $task.cpus -bh \\
|
||||
|
@ -67,7 +65,8 @@ process CHROMAP_CHROMAP {
|
|||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
chromap: $VERSION
|
||||
chromap: \$(echo \$(chromap --version 2>&1))
|
||||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
} else {
|
||||
|
@ -85,7 +84,8 @@ process CHROMAP_CHROMAP {
|
|||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
chromap: $VERSION
|
||||
chromap: \$(echo \$(chromap --version 2>&1))
|
||||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
def VERSION = '0.1' // Version information not provided by tool on CLI
|
||||
|
||||
process CHROMAP_INDEX {
|
||||
tag '$fasta'
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::chromap=0.1 bioconda::samtools=1.13" : null)
|
||||
conda (params.enable_conda ? "bioconda::chromap=0.1.5" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' :
|
||||
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' }"
|
||||
'https://depot.galaxyproject.org/singularity/chromap:0.1.5--h9a82719_0' :
|
||||
'quay.io/biocontainers/chromap:0.1.5--h9a82719_0' }"
|
||||
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
@ -29,8 +28,7 @@ process CHROMAP_INDEX {
|
|||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
chromap: $VERSION
|
||||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||
chromap: \$(echo \$(chromap --version 2>&1))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ process CUTADAPT {
|
|||
conda (params.enable_conda ? 'bioconda::cutadapt=3.4' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/cutadapt:3.4--py39h38f01e4_1' :
|
||||
'quay.io/biocontainers/cutadapt:3.4--py37h73a75cf_1' }"
|
||||
'quay.io/biocontainers/cutadapt:3.4--py39h38f01e4_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
|
30
modules/deeparg/downloaddata/main.nf
Normal file
30
modules/deeparg/downloaddata/main.nf
Normal file
|
@ -0,0 +1,30 @@
|
|||
def VERSION='1.0.2'
|
||||
|
||||
process DEEPARG_DOWNLOADDATA {
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/deeparg:1.0.2--pyhdfd78af_1' :
|
||||
'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }"
|
||||
|
||||
input:
|
||||
|
||||
output:
|
||||
path "db/" , emit: db
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
"""
|
||||
deeparg \\
|
||||
download_data \\
|
||||
$args \\
|
||||
-o db/
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
deeparg: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
33
modules/deeparg/downloaddata/meta.yml
Normal file
33
modules/deeparg/downloaddata/meta.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: deeparg_downloaddata
|
||||
description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes
|
||||
keywords:
|
||||
- download
|
||||
- database
|
||||
- deeparg
|
||||
- antimicrobial resistance genes
|
||||
- deep learning
|
||||
- prediction
|
||||
tools:
|
||||
- deeparg:
|
||||
description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes
|
||||
homepage: https://bench.cs.vt.edu/deeparg
|
||||
documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/
|
||||
tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/
|
||||
doi: "10.1186/s40168-018-0401-z"
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- none: There is no input. This module downloads a pre-built database for use with deepARG.
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- db:
|
||||
type: directory
|
||||
description: Directory containing database required for deepARG.
|
||||
pattern: "db/"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
40
modules/deeparg/predict/main.nf
Normal file
40
modules/deeparg/predict/main.nf
Normal file
|
@ -0,0 +1,40 @@
|
|||
def VERSION="1.0.2"
|
||||
|
||||
process DEEPARG_PREDICT {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity//deeparg:1.0.2--pyhdfd78af_1' :
|
||||
'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta), val(model)
|
||||
path(db)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.align.daa") , emit: daa
|
||||
tuple val(meta), path("*.align.daa.tsv") , emit: daa_tsv
|
||||
tuple val(meta), path("*.mapping.ARG") , emit: arg
|
||||
tuple val(meta), path("*.mapping.potential.ARG"), emit: potential_arg
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
deeparg \\
|
||||
predict \\
|
||||
$args \\
|
||||
-i $fasta \\
|
||||
-o ${prefix} \\
|
||||
-d $db \\
|
||||
--model $model
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
deeparg: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
68
modules/deeparg/predict/meta.yml
Normal file
68
modules/deeparg/predict/meta.yml
Normal file
|
@ -0,0 +1,68 @@
|
|||
name: deeparg_predict
|
||||
description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes
|
||||
keywords:
|
||||
- deeparg
|
||||
- antimicrobial resistance
|
||||
- antimicrobial resistance genes
|
||||
- arg
|
||||
- deep learning
|
||||
- prediction
|
||||
- contigs
|
||||
- metagenomes
|
||||
tools:
|
||||
- deeparg:
|
||||
description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes
|
||||
homepage: https://bench.cs.vt.edu/deeparg
|
||||
documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/
|
||||
tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/
|
||||
doi: "10.1186/s40168-018-0401-z"
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test' ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: FASTA file containing gene-like sequences
|
||||
pattern: "*.{fasta,fa,fna}"
|
||||
- model:
|
||||
type: string
|
||||
description: Which model to use, depending on input data. Either 'LS' or 'SS' for long or short sequences respectively
|
||||
pattern: "LS|LS"
|
||||
- db:
|
||||
type: directory
|
||||
description: Path to a directory containing the deepARG pre-built models
|
||||
pattern: "*/"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- daa:
|
||||
type: file
|
||||
description: Sequences of ARG-like sequences from DIAMOND alignment
|
||||
pattern: "*.align.daa"
|
||||
- daa_tsv:
|
||||
type: file
|
||||
description: Alignments scores against ARG-like sequences from DIAMOND alignment
|
||||
pattern: "*.align.daa.tsv"
|
||||
- arg:
|
||||
type: file
|
||||
description: Table containing sequences with an ARG-like probability of more than specified thresholds
|
||||
pattern: "*.mapping.ARG"
|
||||
- potential_arg:
|
||||
type: file
|
||||
description: Table containing sequences with an ARG-like probability of less than specified thresholds, and requires manual inspection
|
||||
pattern: "*.mapping.potential.ARG"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
44
modules/deepvariant/main.nf
Normal file
44
modules/deepvariant/main.nf
Normal file
|
@ -0,0 +1,44 @@
|
|||
process DEEPVARIANT {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
|
||||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the DeepVariant tool. Please use docker or singularity containers."
|
||||
}
|
||||
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'google/deepvariant:1.3.0' :
|
||||
'google/deepvariant:1.3.0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(input), path(index), path(intervals)
|
||||
path(fasta)
|
||||
path(fai)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz") , emit: vcf
|
||||
tuple val(meta), path("*g.vcf.gz"), emit: gvcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def regions = intervals ? "--regions ${intervals}" : ""
|
||||
|
||||
"""
|
||||
/opt/deepvariant/bin/run_deepvariant \\
|
||||
--ref=${fasta} \\
|
||||
--reads=${input} \\
|
||||
--output_vcf=${prefix}.vcf.gz \\
|
||||
--output_gvcf=${prefix}.g.vcf.gz \\
|
||||
${args} \\
|
||||
${regions} \\
|
||||
--num_shards=${task.cpus}
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
62
modules/deepvariant/meta.yml
Normal file
62
modules/deepvariant/meta.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
name: deepvariant
|
||||
description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data
|
||||
keywords:
|
||||
- variant calling
|
||||
- machine learning
|
||||
tools:
|
||||
- deepvariant:
|
||||
description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data
|
||||
homepage: https://github.com/google/deepvariant
|
||||
documentation: https://github.com/google/deepvariant
|
||||
tool_dev_url: https://github.com/google/deepvariant
|
||||
doi: "https://doi.org/10.1038/nbt.4235"
|
||||
licence: ['BSD-3-clause']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- input:
|
||||
type: file
|
||||
description: BAM/CRAM file
|
||||
pattern: "*.bam/cram"
|
||||
- index:
|
||||
type: file
|
||||
description: Index of BAM/CRAM file
|
||||
pattern: "*.bai/crai"
|
||||
- interval:
|
||||
type: file
|
||||
description: Interval file for targeted regions
|
||||
pattern: "*.bed"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
- 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', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: Compressed VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
- gvcf:
|
||||
type: file
|
||||
description: Compressed GVCF file
|
||||
pattern: "*.g.vcf.gz"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
|
||||
authors:
|
||||
- "@abhi18av"
|
|
@ -2,16 +2,16 @@ process DSHBIO_EXPORTSEGMENTS {
|
|||
tag "${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(gfa)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.fa"), emit: fasta
|
||||
tuple val(meta), path("*.fa.gz"), emit: fasta
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
|
@ -22,7 +22,7 @@ process DSHBIO_EXPORTSEGMENTS {
|
|||
export-segments \\
|
||||
$args \\
|
||||
-i $gfa \\
|
||||
-o ${prefix}.fa
|
||||
-o ${prefix}.fa.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -21,8 +21,8 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- gfa:
|
||||
type: file
|
||||
description: Assembly segments in GFA 1.0 format
|
||||
pattern: "*.{gfa}"
|
||||
description: Assembly segments in uncompressed or compressed GFA 1.0 format
|
||||
pattern: "*.{gfa|gfa.bgz|gfa.gz|gfa.zst}"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
@ -31,8 +31,8 @@ output:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: Assembly segment sequences in FASTA format
|
||||
pattern: "*.{fa}"
|
||||
description: Assembly segment sequences in gzipped FASTA format
|
||||
pattern: "*.{fa.gz}"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
|
|
|
@ -2,10 +2,10 @@ process DSHBIO_FILTERBED {
|
|||
tag "${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bed)
|
||||
|
|
|
@ -2,10 +2,10 @@ process DSHBIO_FILTERGFF3 {
|
|||
tag "${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(gff3)
|
||||
|
|
|
@ -2,10 +2,10 @@ process DSHBIO_SPLITBED {
|
|||
tag "${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bed)
|
||||
|
|
|
@ -2,10 +2,10 @@ process DSHBIO_SPLITGFF3 {
|
|||
tag "${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null)
|
||||
conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' :
|
||||
'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(gff3)
|
||||
|
|
|
@ -2,10 +2,10 @@ process FASTP {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::fastp=0.20.1' : null)
|
||||
conda (params.enable_conda ? 'bioconda::fastp=0.23.2' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/fastp:0.20.1--h8b12597_0' :
|
||||
'quay.io/biocontainers/fastp:0.20.1--h8b12597_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/fastp:0.23.2--h79da9fb_0' :
|
||||
'quay.io/biocontainers/fastp:0.23.2--h79da9fb_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
|
|
@ -13,7 +13,7 @@ process FGBIO_FASTQTOBAM {
|
|||
|
||||
output:
|
||||
tuple val(meta), path("*_umi_converted.bam"), emit: umibam
|
||||
path "versions.yml" , emit: version
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
|
|
@ -2,26 +2,28 @@ process GATK4_APPLYBQSR {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(input), path(input_index), path(bqsr_table)
|
||||
tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
path intervals
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("*.bam"), emit: bam, optional: true
|
||||
tuple val(meta), path("*.cram"), emit: cram, optional: true
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def interval = intervals ? "-L ${intervals}" : ""
|
||||
def file_type = input.getExtension()
|
||||
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK ApplyBQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
|
@ -35,7 +37,7 @@ process GATK4_APPLYBQSR {
|
|||
--bqsr-recal-file $bqsr_table \\
|
||||
$interval \\
|
||||
--tmp-dir . \\
|
||||
-O ${prefix}.bam \\
|
||||
-O ${prefix}.${file_type} \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -31,6 +31,9 @@ input:
|
|||
- bqsr_table:
|
||||
type: file
|
||||
description: Recalibration table from gatk4_baserecalibrator
|
||||
- intervals:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
|
@ -43,9 +46,7 @@ input:
|
|||
type: file
|
||||
description: GATK sequence dictionary
|
||||
pattern: "*.dict"
|
||||
- intervalsBed:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
|
55
modules/gatk4/applyvqsr/main.nf
Normal file
55
modules/gatk4/applyvqsr/main.nf
Normal file
|
@ -0,0 +1,55 @@
|
|||
process GATK4_APPLYVQSR {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi), path(recal), path(recalidx), path(tranches)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
val allelespecific
|
||||
val truthsensitivity
|
||||
val mode
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz") , emit: vcf
|
||||
tuple val(meta), path("*.tbi") , emit: tbi
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
refCommand = fasta ? "-R ${fasta} " : ''
|
||||
alleleSpecificCommand = allelespecific ? '-AS' : ''
|
||||
truthSensitivityCommand = truthsensitivity ? "--truth-sensitivity-filter-level ${truthsensitivity}" : ''
|
||||
modeCommand = mode ? "--mode ${mode} " : 'SNP'
|
||||
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK ApplyVQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
} else {
|
||||
avail_mem = task.memory.giga
|
||||
}
|
||||
"""
|
||||
gatk --java-options "-Xmx${avail_mem}g" ApplyVQSR \\
|
||||
${refCommand} \\
|
||||
-V ${vcf} \\
|
||||
-O ${prefix}.vcf.gz \\
|
||||
${alleleSpecificCommand} \\
|
||||
${truthSensitivityCommand} \\
|
||||
--tranches-file $tranches \\
|
||||
--recal-file $recal \\
|
||||
${modeCommand} \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
88
modules/gatk4/applyvqsr/meta.yml
Normal file
88
modules/gatk4/applyvqsr/meta.yml
Normal file
|
@ -0,0 +1,88 @@
|
|||
name: gatk4_applyvqsr
|
||||
description: |
|
||||
Apply a score cutoff to filter variants based on a recalibration table.
|
||||
AplyVQSR performs the second pass in a two-stage process called Variant Quality Score Recalibration (VQSR).
|
||||
Specifically, it applies filtering to the input variants based on the recalibration table produced
|
||||
in the first step by VariantRecalibrator and a target sensitivity value.
|
||||
keywords:
|
||||
- gatk4
|
||||
- applyvqsr
|
||||
- VQSR
|
||||
tools:
|
||||
- gatk4:
|
||||
description: |
|
||||
Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
|
||||
with a primary focus on variant discovery and genotyping. Its powerful processing engine
|
||||
and high-performance computing features make it capable of taking on projects of any size.
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||
doi: 10.1158/1538-7445.AM2017-3590
|
||||
licence: ['Apache-2.0']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test']
|
||||
- vcf:
|
||||
type: file
|
||||
description: VCF file to be recalibrated, this should be the same file as used for the first stage VariantRecalibrator.
|
||||
pattern: "*.vcf"
|
||||
- tbi:
|
||||
type: file
|
||||
description: Tbi index for the input vcf file.
|
||||
pattern: "*.vcf.tbi"
|
||||
- recal:
|
||||
type: file
|
||||
description: Recalibration file produced when the input vcf was run through VariantRecalibrator in stage 1.
|
||||
pattern: "*.recal"
|
||||
- recalidx:
|
||||
type: file
|
||||
description: Index file for the recalibration file.
|
||||
pattern: ".recal.idx"
|
||||
- tranches:
|
||||
type: boolean
|
||||
description: Tranches file produced when the input vcf was run through VariantRecalibrator in stage 1.
|
||||
pattern: ".tranches"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
- fai:
|
||||
type: file
|
||||
description: Index of reference fasta file
|
||||
pattern: "*.fasta.fai"
|
||||
- dict:
|
||||
type: file
|
||||
description: GATK sequence dictionary
|
||||
pattern: "*.dict"
|
||||
- allelespecific:
|
||||
type: boolean
|
||||
description: Whether or not to run ApplyVQSR in allele specific mode, this should be kept the same as the stage 1 VariantRecalibrator run.
|
||||
pattern: "{true,false}"
|
||||
- truthsensitivity:
|
||||
type: double
|
||||
description: Value to be used as the truth sensitivity cutoff score.
|
||||
pattern: "99.0"
|
||||
- mode:
|
||||
type: String
|
||||
description: Specifies which recalibration mode to employ, should be the same as the stage 1 VariantRecalibrator run. (SNP is default, BOTH is intended for testing only)
|
||||
pattern: "{SNP,INDEL,BOTH}"
|
||||
|
||||
output:
|
||||
- vcf:
|
||||
type: file
|
||||
description: compressed vcf file containing the recalibrated variants.
|
||||
pattern: "*.vcf.gz"
|
||||
- tbi:
|
||||
type: file
|
||||
description: Index of recalibrated vcf file.
|
||||
pattern: "*vcf.gz.tbi"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions.
|
||||
pattern: "versions.yml"
|
||||
|
||||
authors:
|
||||
- "@GCJMackenzie"
|
|
@ -2,17 +2,16 @@ process GATK4_BASERECALIBRATOR {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(input), path(input_index)
|
||||
tuple val(meta), path(input), path(input_index), path(intervals)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
path intervalsBed
|
||||
path knownSites
|
||||
path knownSites_tbi
|
||||
|
||||
|
@ -23,14 +22,16 @@ process GATK4_BASERECALIBRATOR {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def intervalsCommand = intervalsBed ? "-L ${intervalsBed}" : ""
|
||||
def intervalsCommand = intervals ? "-L ${intervals}" : ""
|
||||
def sitesCommand = knownSites.collect{"--known-sites ${it}"}.join(' ')
|
||||
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK BaseRecalibrator] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
} else {
|
||||
avail_mem = task.memory.giga
|
||||
}
|
||||
|
||||
"""
|
||||
gatk --java-options "-Xmx${avail_mem}g" BaseRecalibrator \
|
||||
-R $fasta \
|
||||
|
|
|
@ -28,6 +28,9 @@ input:
|
|||
type: file
|
||||
description: BAI/CRAI file from alignment
|
||||
pattern: "*.{bai,crai}"
|
||||
- intervals:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
|
@ -40,9 +43,6 @@ input:
|
|||
type: file
|
||||
description: GATK sequence dictionary
|
||||
pattern: "*.dict"
|
||||
- intervalsBed:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
- knownSites:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_BEDTOINTERVALLIST {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bed)
|
||||
|
|
|
@ -2,19 +2,19 @@ process GATK4_CALCULATECONTAMINATION {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(pileup), path(matched)
|
||||
val segmentout
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*.contamination.table') , emit: contamination
|
||||
tuple val(meta), path('*.segmentation.table') , optional:true, emit: segmentation
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path('*.contamination.table'), emit: contamination
|
||||
tuple val(meta), path('*.segmentation.table') , emit: segmentation, optional:true
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_CREATESEQUENCEDICTIONARY {
|
|||
tag "$fasta"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_CREATESOMATICPANELOFNORMALS {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(genomicsdb)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(cram)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_FASTQTOSAM {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_FILTERMUTECTCALLS {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi), path(stats), path(orientationbias), path(segmentation), path(contaminationfile), val(contaminationest)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_GATHERBQSRREPORTS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_1':
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_1' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(recal_table)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_GENOMICSDBIMPORT {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi), path(intervalfile), val(intervalval), path(wspace)
|
||||
|
|
|
@ -2,29 +2,29 @@ process GATK4_GENOTYPEGVCFS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.0.0--0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.0.0--0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(gvcf), path(gvcf_index)
|
||||
tuple val(meta), path(gvcf), path(gvcf_index), path(intervals)
|
||||
path fasta
|
||||
path fasta_index
|
||||
path fasta_dict
|
||||
path dbsnp
|
||||
path dbsnp_index
|
||||
path intervals_bed
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
tuple val(meta), path("*.tbi") , emit: tbi
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def dbsnp_options = dbsnp ? "-D ${dbsnp}" : ""
|
||||
def interval_options = intervals_bed ? "-L ${intervals_bed}" : ""
|
||||
def interval_options = intervals ? "-L ${intervals}" : ""
|
||||
def gvcf_options = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf"
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
|
|
|
@ -25,6 +25,9 @@ input:
|
|||
description: |
|
||||
Tuple of gVCF(.gz) file (first) and its index (second) or the path to a GenomicsDB (and empty)
|
||||
pattern: ["*.{vcf,vcf.gz}", "*.{idx,tbi}"]
|
||||
- intervals:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
- fasta:
|
||||
type: file
|
||||
description: Reference fasta file
|
||||
|
@ -45,10 +48,6 @@ input:
|
|||
type: tuple of files
|
||||
description: dbSNP VCF index file
|
||||
pattern: "*.tbi"
|
||||
- intervals_bed:
|
||||
type: file
|
||||
description: An intevals BED file
|
||||
pattern: "*.bed"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
@ -60,6 +59,10 @@ output:
|
|||
type: file
|
||||
description: Genotyped VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
- tbi:
|
||||
type: file
|
||||
description: Tbi index for VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_GETPILEUPSUMMARIES {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
|
|
|
@ -2,19 +2,18 @@ process GATK4_HAPLOTYPECALLER {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(input), path(input_index)
|
||||
tuple val(meta), path(input), path(input_index), path(intervals)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
path dbsnp
|
||||
path dbsnp_tbi
|
||||
path interval
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
|
@ -24,7 +23,7 @@ process GATK4_HAPLOTYPECALLER {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def interval_option = interval ? "-L ${interval}" : ""
|
||||
def interval_option = intervals ? "-L ${intervals}" : ""
|
||||
def dbsnp_option = dbsnp ? "-D ${dbsnp}" : ""
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
|
|
|
@ -29,6 +29,9 @@ input:
|
|||
type: file
|
||||
description: BAI/CRAI file from alignment
|
||||
pattern: "*.{bai,crai}"
|
||||
- intervals:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
|
@ -47,9 +50,6 @@ input:
|
|||
- dbsnp_tbi:
|
||||
type: file
|
||||
description: VCF index of dbsnp (optional)
|
||||
- interval:
|
||||
type: file
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_INDEXFEATUREFILE {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.0.0--0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.0.0--0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(feature_file)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_INTERVALLISTTOOLS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(interval_list)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_LEARNREADORIENTATIONMODEL {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(f1r2)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_MARKDUPLICATES {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bams)
|
||||
|
|
|
@ -2,14 +2,13 @@ process GATK4_MERGEBAMALIGNMENT {
|
|||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(aligned)
|
||||
path unmapped
|
||||
tuple val(meta), path(aligned), path(unmapped)
|
||||
path fasta
|
||||
path dict
|
||||
|
||||
|
@ -28,10 +27,10 @@ process GATK4_MERGEBAMALIGNMENT {
|
|||
}
|
||||
"""
|
||||
gatk --java-options "-Xmx${avail_mem}g" MergeBamAlignment \\
|
||||
ALIGNED=$aligned \\
|
||||
UNMAPPED=$unmapped \\
|
||||
R=$fasta \\
|
||||
O=${prefix}.bam \\
|
||||
-ALIGNED $aligned \\
|
||||
-UNMAPPED $unmapped \\
|
||||
-R $fasta \\
|
||||
-O ${prefix}.bam \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_MERGEVCFS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcfs)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_MUTECT2 {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta) , path(input) , path(input_index) , val(which_norm)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_REVERTSAM {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_SAMTOFASTQ {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_SPLITNCIGARREADS {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
|
|
@ -2,10 +2,10 @@ process GATK4_VARIANTFILTRATION {
|
|||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(vcf_tbi)
|
||||
|
|
62
modules/gatk4/variantrecalibrator/main.nf
Normal file
62
modules/gatk4/variantrecalibrator/main.nf
Normal file
|
@ -0,0 +1,62 @@
|
|||
process GATK4_VARIANTRECALIBRATOR {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' :
|
||||
'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf) , path(tbi)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
val allelespecific
|
||||
tuple path(resvcfs), path(restbis), val(reslabels)
|
||||
val annotation
|
||||
val mode
|
||||
val create_rscript
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.recal") , emit: recal
|
||||
tuple val(meta), path("*.idx") , emit: idx
|
||||
tuple val(meta), path("*.tranches"), emit: tranches
|
||||
tuple val(meta), path("*plots.R") , emit: plots, optional:true
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
refCommand = fasta ? "-R ${fasta} " : ''
|
||||
alleleSpecificCommand = allelespecific ? '-AS' : ''
|
||||
resourceCommand = '--resource:' + reslabels.join( ' --resource:')
|
||||
annotationCommand = '-an ' + annotation.join( ' -an ')
|
||||
modeCommand = mode ? "--mode ${mode} " : 'SNP'
|
||||
rscriptCommand = create_rscript ? "--rscript-file ${prefix}.plots.R" : ''
|
||||
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK VariantRecalibrator] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
} else {
|
||||
avail_mem = task.memory.giga
|
||||
}
|
||||
"""
|
||||
gatk --java-options "-Xmx${avail_mem}g" VariantRecalibrator \\
|
||||
${refCommand} \\
|
||||
-V ${vcf} \\
|
||||
${alleleSpecificCommand} \\
|
||||
${resourceCommand} \\
|
||||
${annotationCommand} \\
|
||||
${modeCommand} \\
|
||||
-O ${prefix}.recal \\
|
||||
--tranches-file ${prefix}.tranches \\
|
||||
${rscriptCommand}\\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
98
modules/gatk4/variantrecalibrator/meta.yml
Normal file
98
modules/gatk4/variantrecalibrator/meta.yml
Normal file
|
@ -0,0 +1,98 @@
|
|||
name: gatk4_variantrecalibrator
|
||||
description: |
|
||||
Build a recalibration model to score variant quality for filtering purposes.
|
||||
It is highly recommended to follow GATK best practices when using this module,
|
||||
the gaussian mixture model requires a large number of samples to be used for the
|
||||
tool to produce optimal results. For example, 30 samples for exome data. For more details see
|
||||
https://gatk.broadinstitute.org/hc/en-us/articles/4402736812443-Which-training-sets-arguments-should-I-use-for-running-VQSR-
|
||||
keywords:
|
||||
- VariantRecalibrator
|
||||
- gatk4
|
||||
- recalibration_model
|
||||
tools:
|
||||
- gatk4:
|
||||
description: |
|
||||
Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
|
||||
with a primary focus on variant discovery and genotyping. Its powerful processing engine
|
||||
and high-performance computing features make it capable of taking on projects of any size.
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||
doi: 10.1158/1538-7445.AM2017-3590
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test' ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: input vcf file containing the variants to be recalibrated
|
||||
pattern: "*.vcf.gz"
|
||||
- tbi:
|
||||
type: file
|
||||
description: tbi file matching with -vcf
|
||||
pattern: "*.vcf.gz.tbi"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
- fai:
|
||||
type: file
|
||||
description: Index of reference fasta file
|
||||
pattern: "fasta.fai"
|
||||
- dict:
|
||||
type: file
|
||||
description: GATK sequence dictionary
|
||||
pattern: "*.dict"
|
||||
- allelespecific:
|
||||
type: boolean
|
||||
description: specify whether to use allele specific annotations
|
||||
pattern: "{true,false}"
|
||||
- resvcfs:
|
||||
type: list
|
||||
description: resource files to be used as truth, training and known sites resources, this imports the files into the module, file names are specified again in the resource_labels to be called via the command.
|
||||
pattern: '*/hapmap_3.3.hg38_chr21.vcf.gz'
|
||||
- restbis:
|
||||
type: list
|
||||
description: tbis for the corresponding vcfs files to be used as truth, training and known resources.
|
||||
pattern: '*/hapmap_3.3.hg38_chr21.vcf.gz.tbi'
|
||||
- reslabels:
|
||||
type: list
|
||||
description: labels for the resource files to be used as truth, training and known sites resources, label should include an identifier,which kind of resource(s) it is, prior value and name of the file.
|
||||
pattern: "hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38_chr21.vcf.gz"
|
||||
- annotation:
|
||||
type: list
|
||||
description: specify which annotations should be used for calculations.
|
||||
pattern: "['QD', 'MQ', 'FS', 'SOR']"
|
||||
- mode:
|
||||
type: string
|
||||
description: specifies which recalibration mode to employ (SNP is default, BOTH is intended for testing only)
|
||||
pattern: "{SNP,INDEL,BOTH}"
|
||||
- rscript:
|
||||
type: boolean
|
||||
description: specify whether to generate rscript.plot output file
|
||||
pattern: "{true,false}"
|
||||
output:
|
||||
- recal:
|
||||
type: file
|
||||
description: Output recal file used by ApplyVQSR
|
||||
pattern: "*.recal"
|
||||
- idx:
|
||||
type: file
|
||||
description: Index file for the recal output file
|
||||
pattern: "*.idx"
|
||||
- tranches:
|
||||
type: file
|
||||
description: Output tranches file used by ApplyVQSR
|
||||
pattern: "*.tranches"
|
||||
- plots:
|
||||
type: file
|
||||
description: Optional output rscript file to aid in visualization of the input data and learned model.
|
||||
pattern: "*plots.R"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "*.versions.yml"
|
||||
authors:
|
||||
- "@GCJMackenzie"
|
|
@ -2,6 +2,7 @@ def VERSION = '1.5.0' // Version information not provided by tool on CLI
|
|||
|
||||
process GTDBTK_CLASSIFYWF {
|
||||
tag "${meta.assembler}-${meta.id}"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gtdbtk=1.5.0" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
|
|
|
@ -5,8 +5,8 @@ process HMMCOPY_GCCOUNTER {
|
|||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5' :
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5' }"
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7' :
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }"
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
|
38
modules/hmmcopy/generatemap/main.nf
Normal file
38
modules/hmmcopy/generatemap/main.nf
Normal file
|
@ -0,0 +1,38 @@
|
|||
def VERSION = '0.1.1'
|
||||
|
||||
process HMMCOPY_GENERATEMAP {
|
||||
tag '$bam'
|
||||
label 'process_long'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7':
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }"
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
||||
output:
|
||||
path "*.map.bw" , emit: bigwig
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
||||
"""
|
||||
# build required indexes
|
||||
generateMap.pl -b \\
|
||||
$args \\
|
||||
$fasta
|
||||
|
||||
# run
|
||||
generateMap.pl \\
|
||||
$args \\
|
||||
$fasta
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
hmmcopy: \$(echo $VERSION)
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
32
modules/hmmcopy/generatemap/meta.yml
Normal file
32
modules/hmmcopy/generatemap/meta.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: hmmcopy_generatemap
|
||||
description: Perl script (generateMap.pl) generates the mappability of a genome given a certain size of reads, for input to hmmcopy mapcounter. Takes a very long time on large genomes, is not parallelised at all.
|
||||
keywords:
|
||||
- hmmcopy
|
||||
- mapcounter
|
||||
- mappability
|
||||
tools:
|
||||
- hmmcopy:
|
||||
description: C++ based programs for analyzing BAM files and preparing read counts -- used with bioconductor-hmmcopy
|
||||
homepage: https://github.com/shahcompbio/hmmcopy_utils
|
||||
documentation: https://github.com/shahcompbio/hmmcopy_utils
|
||||
tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils
|
||||
doi: ""
|
||||
licence: ['GPL v3']
|
||||
|
||||
input:
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input genome fasta file
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- bigwig:
|
||||
type: file
|
||||
description: bigwig file containing the mappability of the genome
|
||||
pattern: "*.{map.bw}"
|
||||
|
||||
authors:
|
||||
- "@sppearce"
|
31
modules/hmmcopy/mapcounter/main.nf
Normal file
31
modules/hmmcopy/mapcounter/main.nf
Normal file
|
@ -0,0 +1,31 @@
|
|||
def VERSION = '0.1.1' // Version information not provided by tool on CLI
|
||||
|
||||
process HMMCOPY_MAPCOUNTER {
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7':
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }"
|
||||
|
||||
input:
|
||||
path bigwig
|
||||
|
||||
output:
|
||||
path "*.map.wig" , emit: wig
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
||||
"""
|
||||
mapCounter \\
|
||||
$args \\
|
||||
$bigwig > ${bigwig.baseName}.map.wig
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
hmmcopy: \$(echo $VERSION)
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
34
modules/hmmcopy/mapcounter/meta.yml
Normal file
34
modules/hmmcopy/mapcounter/meta.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: hmmcopy_mapcounter
|
||||
description: mapCounter function from HMMcopy utilities, used to generate mappability in non-overlapping windows from a bigwig file
|
||||
keywords:
|
||||
- hmmcopy
|
||||
- mapcounter
|
||||
- cnv
|
||||
tools:
|
||||
- hmmcopy:
|
||||
description: C++ based programs for analyzing BAM files and preparing read counts -- used with bioconductor-hmmcopy
|
||||
homepage: https://github.com/shahcompbio/hmmcopy_utils
|
||||
documentation: https://github.com/shahcompbio/hmmcopy_utils
|
||||
tool_dev_url: https://github.com/shahcompbio/hmmcopy_utils
|
||||
doi: ""
|
||||
licence: ['GPL v3']
|
||||
|
||||
input:
|
||||
- bigwig:
|
||||
type: file
|
||||
description: BigWig file with the mappability score of the genome, for instance made with generateMap function.
|
||||
pattern: "*.wig"
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
|
||||
- wig:
|
||||
type: file
|
||||
description: wig file containing mappability of each window of the genome
|
||||
pattern: "*.map.wig"
|
||||
|
||||
authors:
|
||||
- "@sppearce"
|
|
@ -6,8 +6,8 @@ process HMMCOPY_READCOUNTER {
|
|||
|
||||
conda (params.enable_conda ? "bioconda::hmmcopy=0.1.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_5' :
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_5' }"
|
||||
'https://depot.galaxyproject.org/singularity/hmmcopy:0.1.1--h2e03b76_7' :
|
||||
'quay.io/biocontainers/hmmcopy:0.1.1--h2e03b76_7' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
|
|
|
@ -5,7 +5,7 @@ process IDR {
|
|||
conda (params.enable_conda ? "bioconda::idr=2.0.4.2" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/idr:2.0.4.2--py39hcbe4a3b_5' :
|
||||
'quay.io/biocontainers/idr:2.0.4.2--py38h9af456f_5' }"
|
||||
'quay.io/biocontainers/idr:2.0.4.2--py39hcbe4a3b_5' }"
|
||||
|
||||
input:
|
||||
path peaks
|
||||
|
|
|
@ -9,7 +9,8 @@ process IVAR_CONSENSUS {
|
|||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
path fasta
|
||||
path fasta
|
||||
val save_mpileup
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.fa") , emit: fasta
|
||||
|
@ -21,14 +22,16 @@ process IVAR_CONSENSUS {
|
|||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||
def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : ""
|
||||
"""
|
||||
samtools mpileup \\
|
||||
samtools \\
|
||||
mpileup \\
|
||||
--reference $fasta \\
|
||||
$args2 \\
|
||||
$bam | \\
|
||||
$save_mpileup \\
|
||||
ivar consensus \\
|
||||
$bam \\
|
||||
$mpileup \\
|
||||
| ivar \\
|
||||
consensus \\
|
||||
$args \\
|
||||
-p $prefix
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@ input:
|
|||
type: file
|
||||
description: The reference sequence used for mapping and generating the BAM file
|
||||
pattern: "*.fa"
|
||||
- save_mpileup:
|
||||
type: boolean
|
||||
description: Save mpileup file generated by ivar consensus
|
||||
patter: "*.mpileup"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
|
@ -11,6 +11,7 @@ process IVAR_VARIANTS {
|
|||
tuple val(meta), path(bam)
|
||||
path fasta
|
||||
path gff
|
||||
val save_mpileup
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.tsv") , emit: tsv
|
||||
|
@ -21,15 +22,17 @@ process IVAR_VARIANTS {
|
|||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||
def features = params.gff ? "-g $gff" : ""
|
||||
def features = gff ? "-g $gff" : ""
|
||||
def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : ""
|
||||
"""
|
||||
samtools mpileup \\
|
||||
samtools \\
|
||||
mpileup \\
|
||||
$args2 \\
|
||||
--reference $fasta \\
|
||||
$bam | \\
|
||||
$save_mpileup \\
|
||||
ivar variants \\
|
||||
$bam \\
|
||||
$mpileup \\
|
||||
| ivar \\
|
||||
variants \\
|
||||
$args \\
|
||||
$features \\
|
||||
-r $fasta \\
|
||||
|
|
|
@ -29,6 +29,10 @@ input:
|
|||
type: file
|
||||
description: A GFF file in the GFF3 format can be supplied to specify coordinates of open reading frames (ORFs). In absence of GFF file, amino acid translation will not be done.
|
||||
patter: "*.gff"
|
||||
- save_mpileup:
|
||||
type: boolean
|
||||
description: Save mpileup file generated by ivar variants
|
||||
patter: "*.mpileup"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
|
@ -9,7 +9,7 @@ process JUPYTERNOTEBOOK {
|
|||
//ipykernel, jupytext, papermill and nbconvert Python packages.
|
||||
conda (params.enable_conda ? "ipykernel=6.0.3 jupytext=1.11.4 nbconvert=6.1.0 papermill=2.3.3 matplotlib=3.4.2" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963%3A879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' :
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963:879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' :
|
||||
'quay.io/biocontainers/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963:879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' }"
|
||||
|
||||
input:
|
||||
|
|
|
@ -21,7 +21,7 @@ process KLEBORATE {
|
|||
kleborate \\
|
||||
$args \\
|
||||
--outfile ${prefix}.results.txt \\
|
||||
--assemblies *.fasta
|
||||
--assemblies $fastas
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -2,10 +2,10 @@ process KRAKEN2_KRAKEN2 {
|
|||
tag "$meta.id"
|
||||
label 'process_high'
|
||||
|
||||
conda (params.enable_conda ? 'bioconda::kraken2=2.1.1 conda-forge::pigz=2.6' : null)
|
||||
conda (params.enable_conda ? 'bioconda::kraken2=2.1.2 conda-forge::pigz=2.6' : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' :
|
||||
'quay.io/biocontainers/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' }"
|
||||
'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:87fc08d11968d081f3e8a37131c1f1f6715b6542-0' :
|
||||
'quay.io/biocontainers/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:87fc08d11968d081f3e8a37131c1f1f6715b6542-0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
|
|
@ -8,8 +8,6 @@ process KRONA_KRONADB {
|
|||
'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' :
|
||||
'quay.io/biocontainers/krona:2.7.1--pl526_5' }"
|
||||
|
||||
input:
|
||||
|
||||
output:
|
||||
path 'taxonomy/taxonomy.tab', emit: db
|
||||
path "versions.yml" , emit: versions
|
||||
|
|
|
@ -17,7 +17,7 @@ process LAST_POSTMASK {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
if( "$maf" == "${prefix}.maf.gz" ) error "Input and output names are the same, use the suffix option to disambiguate"
|
||||
if( "$maf" == "${prefix}.maf.gz" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
|
||||
"""
|
||||
last-postmask $args $maf | gzip --no-name > ${prefix}.maf.gz
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ process LIMA {
|
|||
path primers
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.clips") , emit: clips
|
||||
tuple val(meta), path("*.counts") , emit: counts
|
||||
tuple val(meta), path("*.guess") , emit: guess
|
||||
tuple val(meta), path("*.report") , emit: report
|
||||
tuple val(meta), path("*.summary"), emit: summary
|
||||
path "versions.yml" , emit: versions
|
||||
|
@ -27,10 +25,18 @@ process LIMA {
|
|||
tuple val(meta), path("*.fastq.gz") , optional: true, emit: fastqgz
|
||||
tuple val(meta), path("*.xml") , optional: true, emit: xml
|
||||
tuple val(meta), path("*.json") , optional: true, emit: json
|
||||
tuple val(meta), path("*.clips") , optional: true, emit: clips
|
||||
tuple val(meta), path("*.guess") , optional: true, emit: guess
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
if( "$ccs" == "${prefix}.bam" ) error "Input and output names are the same, set prefix in module configuration"
|
||||
if( "$ccs" == "${prefix}.fasta" ) error "Input and output names are the same, set prefix in module configuration"
|
||||
if( "$ccs" == "${prefix}.fasta.gz" ) error "Input and output names are the same, set prefix in module configuration"
|
||||
if( "$ccs" == "${prefix}.fastq" ) error "Input and output names are the same, set prefix in module configuration"
|
||||
if( "$ccs" == "${prefix}.fastq.gz" ) error "Input and output names are the same, set prefix in module configuration"
|
||||
|
||||
"""
|
||||
OUT_EXT=""
|
||||
|
||||
|
@ -46,7 +52,6 @@ process LIMA {
|
|||
OUT_EXT="fastq.gz"
|
||||
fi
|
||||
|
||||
echo \$OUT_EXT
|
||||
lima \\
|
||||
$ccs \\
|
||||
$primers \\
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue