Merge branch 'master' into haplocheck

This commit is contained in:
Taniguti 2022-06-07 08:16:22 -03:00 committed by GitHub
commit a2e2d50494
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
207 changed files with 4361 additions and 586 deletions

View file

@ -0,0 +1,68 @@
process ANTISMASH_ANTISMASHLITE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' :
'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }"
containerOptions {
workflow.containerEngine == 'singularity' ?
"-B $antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
workflow.containerEngine == 'docker' ?
"-v \$PWD/$antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
''
}
input:
tuple val(meta), path(sequence_input)
path(databases)
path(antismash_dir) // Optional input: AntiSMASH installation folder. It is not needed for using this module with conda, but required for docker/singularity (see meta.yml).
path(gff)
output:
tuple val(meta), path("${prefix}/clusterblast/*_c*.txt") , optional: true, emit: clusterblast_file
tuple val(meta), path("${prefix}/{css,images,js}") , emit: html_accessory_files
tuple val(meta), path("${prefix}/knownclusterblast/region*/ctg*.html") , optional: true, emit: knownclusterblast_html
tuple val(meta), path("${prefix}/knownclusterblast/*_c*.txt") , optional: true, emit: knownclusterblast_txt
tuple val(meta), path("${prefix}/svg/clusterblast*.svg") , optional: true, emit: svg_files_clusterblast
tuple val(meta), path("${prefix}/svg/knownclusterblast*.svg") , optional: true, emit: svg_files_knownclusterblast
tuple val(meta), path("${prefix}/*.gbk") , emit: gbk_input
tuple val(meta), path("${prefix}/*.json") , emit: json_results
tuple val(meta), path("${prefix}/*.log") , emit: log
tuple val(meta), path("${prefix}/*.zip") , emit: zip
tuple val(meta), path("${prefix}/*region*.gbk") , emit: gbk_results
tuple val(meta), path("${prefix}/clusterblastoutput.txt") , optional: true, emit: clusterblastoutput
tuple val(meta), path("${prefix}/index.html") , emit: html
tuple val(meta), path("${prefix}/knownclusterblastoutput.txt") , optional: true, emit: knownclusterblastoutput
tuple val(meta), path("${prefix}/regions.js") , emit: json_sideloading
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
gff_flag = "--genefinding-gff3 ${gff}"
"""
## We specifically do not include annotations (--genefinding-tool none) as
## this should be run as a separate module for versioning purposes
antismash \\
$args \\
$gff_flag \\
-c $task.cpus \\
--output-dir $prefix \\
--genefinding-tool none \\
--logfile $prefix/${prefix}.log \\
--databases $databases \\
$sequence_input
cat <<-END_VERSIONS > versions.yml
"${task.process}":
antismash-lite: \$(antismash --version | sed 's/antiSMASH //')
END_VERSIONS
"""
}

View file

@ -0,0 +1,128 @@
name: antismash_antismashlite
description: |
antiSMASH allows the rapid genome-wide identification, annotation
and analysis of secondary metabolite biosynthesis gene clusters.
keywords:
- secondary metabolites
- BGC
- biosynthetic gene cluster
- genome mining
- NRPS
- RiPP
- antibiotics
- prokaryotes
- bacteria
- eukaryotes
- fungi
- antismash
tools:
- antismashlite:
description: "antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell"
homepage: "https://docs.antismash.secondarymetabolites.org"
documentation: "https://docs.antismash.secondarymetabolites.org"
tool_dev_url: "https://github.com/antismash/antismash"
doi: "10.1093/nar/gkab335"
licence: "['AGPL v3']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- sequence_input:
type: file
description: nucleotide sequence file (annotated)
pattern: "*.{gbk, gb, gbff, genbank, embl, fasta, fna}"
- databases:
type: directory
description: downloaded AntiSMASH databases e.g. data/databases
pattern: "*/"
- antismash_dir:
type: directory
description: |
A local copy of an AntiSMASH installation folder. This is required when running with
docker and singularity (not required for conda), due to attempted 'modifications' of
files during database checks in the installation directory, something that cannot
be done in immutable docker/singularity containers. Therefore, a local installation
directory needs to be mounted (including all modified files from the downloading step)
to the container as a workaround.
pattern: "*/"
- gff:
type: file
pattern: "*.gff"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- clusterblast_file:
type: file
description: Output of ClusterBlast algorithm
pattern: "clusterblast/*_c*.txt"
- html_accessory_files:
type: directory
description: Accessory files for the HTML output
pattern: "{css/,images/,js/}"
- knownclusterblast_html:
type: file
description: Tables with MIBiG hits in HTML format
pattern: "knownclusterblast/region*/ctg*.html"
- knownclusterblast_txt:
type: file
description: Tables with MIBiG hits
pattern: "knownclusterblast/*_c*.txt"
- svg_files_clusterblast:
type: file
description: SVG images showing the % identity of the aligned hits against their queries
pattern: "svg/clusterblast*.svg"
- svg_files_knownclusterblast:
type: file
description: SVG images showing the % identity of the aligned hits against their queries
pattern: "svg/knownclusterblast*.svg"
- gbk_input:
type: file
description: Nucleotide sequence and annotations in GenBank format; converted from input file
pattern: "*.gbk"
- json_results:
type: file
description: Nucleotide sequence and annotations in JSON format; converted from GenBank file (gbk_input)
pattern: "*.json"
- log:
type: file
description: Contains all the logging output that antiSMASH produced during its run
pattern: "*.log"
- zip:
type: file
description: Contains a compressed version of the output folder in zip format
pattern: "*.zip"
- gbk_results:
type: file
description: Nucleotide sequence and annotations in GenBank format; one file per antiSMASH hit
pattern: "*region*.gbk"
- clusterblastoutput:
type: file
description: Raw BLAST output of known clusters previously predicted by antiSMASH using the built-in ClusterBlast algorithm
pattern: "clusterblastoutput.txt"
- html:
type: file
description: Graphical web view of results in HTML format
patterN: "index.html"
- knownclusterblastoutput:
type: file
description: Raw BLAST output of known clusters of the MIBiG database
pattern: "knownclusterblastoutput.txt"
- json_sideloading:
type: file
description: Sideloaded annotations of protoclusters and/or subregions (see antiSMASH documentation "Annotation sideloading")
pattern: "regions.js"
authors:
- "@jasmezz"

View file

@ -42,7 +42,6 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
## TODO nf-core: Delete / customise this example output
- out:
type: file
description: The data in the asked format (bed, fasta, fastq, json, pileup, sam, yaml)

View file

@ -8,7 +8,7 @@ process BCFTOOLS_CONCAT {
'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }"
input:
tuple val(meta), path(vcfs)
tuple val(meta), path(vcfs), path(tbi)
output:
tuple val(meta), path("*.gz"), emit: vcf

View file

@ -25,6 +25,11 @@ input:
description: |
List containing 2 or more vcf files
e.g. [ 'file1.vcf', 'file2.vcf' ]
- tbi:
type: files
description: |
List containing 2 or more index files (optional)
e.g. [ 'file1.tbi', 'file2.tbi' ]
output:
- meta:
type: map

View file

@ -0,0 +1,61 @@
process BCFTOOLS_ROH {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::bcftools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0':
'quay.io/biocontainers/bcftools:1.15.1--h0ea216a_0' }"
input:
tuple val(meta), path(vcf), path(tbi)
path af_file
path genetic_map
path regions_file
path samples_file
path targets_file
output:
tuple val(meta), path("*.roh"), emit: roh
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def af_read = af_file ? "--AF-file ${af_file}" : ''
def gen_map = genetic_map ? "--genetic-map ${genetic_map}" : ''
def reg_file = regions_file ? "--regions-file ${regions_file}" : ''
def samp_file = samples_file ? "--samples-file ${samples_file}" : ''
def targ_file = targets_file ? "--targets-file ${targets_file}" : ''
"""
bcftools \\
roh \\
$args \\
$af_read \\
$gen_map \\
$reg_file \\
$samp_file \\
$targ_file \\
-o ${prefix}.roh \\
$vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.roh
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,55 @@
name: "bcftools_roh"
description: A program for detecting runs of homo/autozygosity. Only bi-allelic sites are considered.
keywords:
- roh
tools:
- "roh":
description: "A program for detecting runs of homo/autozygosity. Only bi-allelic sites are considered."
homepage: https://www.htslib.org/
documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: VCF file
pattern: "*.{vcf,.vcf.gz}"
- af_file:
type: file
description: "Read allele frequencies from a tab-delimited file containing the columns: CHROM\tPOS\tREF,ALT\tAF."
- genetic_map:
type: file
description: "Genetic map in the format required also by IMPUTE2."
- regions_file:
type: file
description: "Regions can be specified either on command line or in a VCF, BED, or tab-delimited file (the default)."
- samples_file:
type: file
description: "File of sample names to include or exclude if prefixed with '^'."
- targets_file:
type: file
description: "Targets can be specified either on command line or in a VCF, BED, or tab-delimited file (the default)."
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"
- roh:
type: file
description: Contains site-specific and/or per-region runs of homo/autozygosity calls.
pattern: "*.{roh}"
authors:
- "@ramprasadn"

View file

@ -0,0 +1,38 @@
process BEDTOOLS_SPLIT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--h468198e_3':
'quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2' }"
input:
tuple val(meta), path(bed)
val(number_of_files)
output:
tuple val(meta), path("*.bed"), emit: beds
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
bedtools \\
split \\
$args \\
-i $bed \\
-p $prefix \\
-n $number_of_files
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
END_VERSIONS
"""
}

View file

@ -0,0 +1,41 @@
name: "bedtools_split"
description: Split BED files into several smaller BED files
keywords:
- sort
tools:
- "bedtools":
description: "A powerful toolset for genome arithmetic"
documentation: "https://bedtools.readthedocs.io/en/latest/content/tools/sort.html"
licence: "['MIT', 'GPL v2']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: BED file
pattern: "*.bed"
- bed:
type: value
description: The number of files to split the BED into
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"
- beds:
type: file
description: list of split BED files
pattern: "*.bed"
authors:
- "@nvnieuwk"

View file

@ -0,0 +1,38 @@
process BIOBAMBAM_BAMMERGE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1':
'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1' }"
input:
tuple val(meta), path(bam)
output:
tuple val(meta), path("${prefix}.bam") ,emit: bam
tuple val(meta), path("*.bai") ,optional:true, emit: bam_index
tuple val(meta), path("*.md5") ,optional:true, emit: checksum
path "versions.yml" ,emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def input_string = bam.join(" I=")
"""
bammerge \\
I=${input_string} \\
$args \\
> ${prefix}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bammerge: \$( bammerge --version |& sed '1!d; s/.*version //; s/.\$//' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,46 @@
name: biobambam_bammerge
description: Merge a list of sorted bam files
keywords:
- merge
- bam
tools:
- biobambam:
description: |
biobambam is a set of tools for early stage alignment file processing.
homepage: https://gitlab.com/german.tischler/biobambam2
documentation: https://gitlab.com/german.tischler/biobambam2/-/blob/master/README.md
doi: 10.1186/1751-0473-9-13
licence: ["GPL v3"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: List containing 1 or more bam files
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Merged BAM file
pattern: "*.bam"
- bam_index:
type: file
description: BAM index file
pattern: "*"
- checksum:
type: file
description: Checksum file
pattern: "*"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@matthdsm"

View file

@ -11,6 +11,7 @@ process BOWTIE2_ALIGN {
tuple val(meta), path(reads)
path index
val save_unaligned
val sort_bam
output:
tuple val(meta), path("*.bam") , emit: bam
@ -36,8 +37,7 @@ process BOWTIE2_ALIGN {
reads_args = "-1 ${reads[0]} -2 ${reads[1]}"
}
def samtools_command = "samtools view -@ $task.cpus --bam --with-header ${args2} > ${prefix}.bam"
def samtools_command = sort_bam ? 'sort' : 'view'
"""
INDEX=`find -L ./ -name "*.rev.1.bt2" | sed "s/.rev.1.bt2//"`
@ -51,7 +51,7 @@ process BOWTIE2_ALIGN {
$unaligned \\
$args \\
2> ${prefix}.bowtie2.log \\
| $samtools_command
| samtools $samtools_command $args2 --threads $task.cpus -o ${prefix}.bam -
if [ -f ${prefix}.unmapped.fastq.1.gz ]; then
mv ${prefix}.unmapped.fastq.1.gz ${prefix}.unmapped_1.fastq.gz

View file

@ -29,6 +29,15 @@ input:
type: file
description: Bowtie2 genome index files
pattern: "*.ebwt"
- save_unaligned:
type: boolean
description: |
Save reads that do not map to the reference (true) or discard them (false)
(default: false)
- sort_bam:
type: boolean
description: use samtools sort (true) or samtools view (false)
pattern: "true or false"
output:
- bam:
type: file

View file

@ -0,0 +1,36 @@
process CNVKIT_ANTITARGET {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::cnvkit=0.9.9" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvkit:0.9.9--pyhdfd78af_0':
'quay.io/biocontainers/cnvkit:0.9.9--pyhdfd78af_0' }"
input:
tuple val(meta), path(targets)
output:
tuple val(meta), path("*.bed"), emit: bed
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cnvkit.py \\
antitarget \\
$targets \\
--output ${prefix}.antitarget.bed \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}

View file

@ -0,0 +1,44 @@
name: cnvkit_antitarget
description:
keywords:
- cvnkit
- antitarget
tools:
- cnvkit:
description: |
CNVkit is a Python library and command-line software toolkit to infer and visualize copy number from high-throughput DNA sequencing data.
It is designed for use with hybrid capture, including both whole-exome and custom target panels, and short-read sequencing platforms such as Illumina and Ion Torrent.
homepage: https://cnvkit.readthedocs.io/en/stable/index.html
documentation: https://cnvkit.readthedocs.io/en/stable/index.html
tool_dev_url: "https://github.com/etal/cnvkit"
doi: 10.1371/journal.pcbi.1004873
licence: ["Apache-2.0"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- targets:
type: file
description: File containing genomic regions
pattern: "*.{bed}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: File containing off-target regions
pattern: "*.{bed}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@SusiJo"

View file

@ -2,14 +2,15 @@ process CNVKIT_BATCH {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? 'bioconda::cnvkit=0.9.9' : null)
conda (params.enable_conda ? 'bioconda::cnvkit=0.9.9 bioconda::samtools=1.15.1' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvkit:0.9.9--pyhdfd78af_0' :
'quay.io/biocontainers/cnvkit:0.9.9--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-780d630a9bb6a0ff2e7b6f730906fd703e40e98f:304d1c5ab610f216e77c61420ebe85f1e7c5968a-0' :
'quay.io/biocontainers/mulled-v2-780d630a9bb6a0ff2e7b6f730906fd703e40e98f:304d1c5ab610f216e77c61420ebe85f1e7c5968a-0' }"
input:
tuple val(meta), path(tumor), path(normal)
path fasta
path fasta_fai
path targets
path reference
@ -18,6 +19,8 @@ process CNVKIT_BATCH {
tuple val(meta), path("*.cnn"), emit: cnn, optional: true
tuple val(meta), path("*.cnr"), emit: cnr, optional: true
tuple val(meta), path("*.cns"), emit: cns, optional: true
tuple val(meta), path("*.pdf"), emit: pdf, optional: true
tuple val(meta), path("*.png"), emit: png, optional: true
path "versions.yml" , emit: versions
when:
@ -25,31 +28,168 @@ process CNVKIT_BATCH {
script:
def args = task.ext.args ?: ''
def normal_args = normal ? "--normal $normal" : ""
def fasta_args = fasta ? "--fasta $fasta" : ""
def tumor_exists = tumor ? true : false
def normal_exists = normal ? true : false
// execute samtools only when cram files are input, cnvkit runs natively on bam but is prohibitively slow
def tumor_cram = tumor_exists && tumor.Extension == "cram" ? true : false
def normal_cram = normal_exists && normal.Extension == "cram" ? true : false
def tumor_bam = tumor_exists && tumor.Extension == "bam" ? true : false
def normal_bam = normal_exists && normal.Extension == "bam" ? true : false
def tumor_out = tumor_cram ? tumor.BaseName + ".bam" : "${tumor}"
// tumor_only mode does not need fasta & target
// instead it requires a pre-computed reference.cnn which is built from fasta & target
def (normal_out, normal_args, fasta_args) = ["", "", ""]
def fai_reference = fasta_fai ? "--fai-reference ${fasta_fai}" : ""
if (normal_exists){
def normal_prefix = normal.BaseName
normal_out = normal_cram ? "${normal_prefix}" + ".bam" : "${normal}"
fasta_args = fasta ? "--fasta $fasta" : ""
// germline mode
// normal samples must be input without a flag
// requires flag --normal to be empty []
if(!tumor_exists){
tumor_out = "${normal_prefix}" + ".bam"
normal_args = "--normal "
}
// somatic mode
else {
normal_args = normal_prefix ? "--normal $normal_out" : ""
}
}
def target_args = targets ? "--targets $targets" : ""
def reference_args = reference ? "--reference $reference" : ""
def target_args = ""
if (args.contains("--method wgs") || args.contains("-m wgs")) {
target_args = targets ? "--targets $targets" : ""
}
else {
target_args = "--targets $targets"
}
"""
cnvkit.py \\
batch \\
$tumor \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
// somatic_mode cram_input
if (tumor_cram && normal_cram){
"""
samtools view -T $fasta $fai_reference $tumor -@ $task.cpus -o $tumor_out
samtools view -T $fasta $fai_reference $normal -@ $task.cpus -o $normal_out
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
// somatic_mode bam_input
else if (tumor_bam && normal_bam){
"""
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
// tumor_only_mode cram_input
else if(tumor_cram && !normal_exists){
"""
samtools view -T $fasta $fai_reference $tumor -@ $task.cpus -o $tumor_out
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
// tumor_only bam_input
else if(tumor_bam && !normal_exists){
"""
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
// germline mode cram_input
// normal_args must be --normal []
else if (normal_cram && !tumor_exists){
"""
samtools view -T $fasta $fai_reference $normal -@ $task.cpus -o $tumor_out
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
// germline mode bam_input
else if (normal_bam && !tumor_exists){
"""
cnvkit.py \\
batch \\
$tumor_out \\
$normal_args \\
$fasta_args \\
$reference_args \\
$target_args \\
--processes $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}

View file

@ -11,27 +11,6 @@ tools:
homepage: https://cnvkit.readthedocs.io/en/stable/index.html
documentation: https://cnvkit.readthedocs.io/en/stable/index.html
licence: ["Apache-2.0"]
params:
- outdir:
type: string
description: |
The pipeline's output directory. By default, the module will
output files into `$params.outdir/<SOFTWARE>`
- publish_dir_mode:
type: string
description: |
Value for the Nextflow `publishDir` mode parameter.
Available: symlink, rellink, link, copy, copyNoFollow, move.
- enable_conda:
type: boolean
description: |
Run the module with Conda using the software specified
via the `conda` directive
- singularity_pull_docker_container:
type: boolean
description: |
Instead of directly downloading Singularity images for use with Singularity,
force the workflow to pull and convert Docker containers instead.
input:
- meta:
type: map
@ -49,7 +28,11 @@ input:
- fasta:
type: file
description: |
Input reference genome fasta file
Input reference genome fasta file (only needed for cram_input and/or when normal_samples are provided)
- fasta_fai:
type: file
description: |
Input reference genome fasta index (optional, but recommended for cram_input)
- targetfile:
type: file
description: |
@ -80,6 +63,14 @@ output:
type: file
description: File containing copy number segment information
pattern: "*.{cns}"
- pdf:
type: file
description: File with plot of copy numbers or segments on chromosomes
pattern: "*.{pdf}"
- png:
type: file
description: File with plot of bin-level log2 coverages and segmentation calls
pattern: "*.{png}"
- versions:
type: file
description: File containing software versions
@ -91,3 +82,4 @@ authors:
- "@drpatelh"
- "@fbdtemme"
- "@lassefolkersen"
- "@SusiJo"

View file

@ -0,0 +1,40 @@
process CNVKIT_REFERENCE {
tag "$fasta"
label 'process_low'
conda (params.enable_conda ? "bioconda::cnvkit=0.9.9" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvkit:0.9.9--pyhdfd78af_0':
'quay.io/biocontainers/cnvkit:0.9.9--pyhdfd78af_0' }"
input:
path fasta
path targets
path antitargets
output:
path "*.cnn" , emit: cnn
path "versions.yml", emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: targets.BaseName
"""
cnvkit.py \\
reference \\
--fasta $fasta \\
--targets $targets \\
--antitargets $antitargets \\
--output ${prefix}.reference.cnn \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}

View file

@ -0,0 +1,47 @@
name: cnvkit_reference
description:
keywords:
- cnvkit
- reference
tools:
- cnvkit:
description: |
CNVkit is a Python library and command-line software toolkit to infer and visualize copy number from high-throughput DNA sequencing data.
It is designed for use with hybrid capture, including both whole-exome and custom target panels, and short-read sequencing platforms such as Illumina and Ion Torrent.
homepage: https://cnvkit.readthedocs.io/en/stable/index.html
documentation: https://cnvkit.readthedocs.io/en/stable/index.html
tool_dev_url: https://github.com/etal/cnvkit
doi: 10.1371/journal.pcbi.1004873
licence: ["Apache-2.0"]
input:
- fasta:
type: file
description: File containing reference genome
pattern: "*.{fasta}"
- targets:
type: file
description: File containing genomic regions
pattern: "*.{bed}"
- antitargets:
type: file
description: File containing off-target genomic regions
pattern: "*.{bed}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reference:
type: file
description: File containing a copy-number reference (required for CNV calling in tumor_only mode)
pattern: "*.{cnn}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@SusiJo"

View file

@ -2,13 +2,15 @@ process DEEPTOOLS_BAMCOVERAGE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::deeptools=3.5.1" : null)
conda (params.enable_conda ? "bioconda::deeptools=3.5.1 bioconda::samtools=1.15.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0':
'quay.io/biocontainers/deeptools:3.5.1--py_0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-eb9e7907c7a753917c1e4d7a64384c047429618a:2c687053c0252667cca265c9f4118f2c205a604c-0':
'quay.io/biocontainers/mulled-v2-eb9e7907c7a753917c1e4d7a64384c047429618a:2c687053c0252667cca265c9f4118f2c205a604c-0' }"
input:
tuple val(meta), path(input), path(input_index)
path(fasta)
path(fasta_fai)
output:
tuple val(meta), path("*.bigWig") , emit: bigwig, optional: true
@ -22,16 +24,44 @@ process DEEPTOOLS_BAMCOVERAGE {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}.bigWig"
"""
bamCoverage \\
--bam $input \\
$args \\
--numberOfProcessors ${task.cpus} \\
--outFileName ${prefix}
// cram_input is currently not working with deeptools
// therefore it's required to convert cram to bam first
def is_cram = input.Extension == "cram" ? true : false
def input_out = is_cram ? input.BaseName + ".bam" : "${input}"
def fai_reference = fasta_fai ? "--fai-reference ${fasta_fai}" : ""
if (is_cram){
"""
samtools view -T $fasta $input $fai_reference -@ $task.cpus -o $input_out
samtools index -b $input_out -@ $task.cpus
bamCoverage \\
--bam $input_out \\
$args \\
--numberOfProcessors ${task.cpus} \\
--outFileName ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
deeptools: \$(bamCoverage --version | sed -e "s/bamCoverage //g")
END_VERSIONS
"""
}
else {
"""
bamCoverage \\
--bam $input_out \\
$args \\
--numberOfProcessors ${task.cpus} \\
--outFileName ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
deeptools: \$(bamCoverage --version | sed -e "s/bamCoverage //g")
END_VERSIONS
"""
}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
deeptools: \$(bamCoverage --version | sed -e "s/bamCoverage //g")
END_VERSIONS
"""
}

View file

@ -25,6 +25,14 @@ input:
type: file
description: BAM/CRAM index file
pattern: "*.{bai,crai}"
- fasta:
type: file
description: Reference file the CRAM file was created with (required with CRAM input)
pattern: "*.{fasta,fa}"
- fasta_fai:
type: file
description: Index of the reference file (optional, but recommended)
pattern: "*.{fai}"
output:
- meta:
@ -47,3 +55,4 @@ output:
authors:
- "@FriederikeHanssen"
- "@SusiJo"

View file

@ -11,8 +11,8 @@ RUN conda env create -f /environment.yml && conda clean -a
# Setup default ARG variables
ARG GENOME=GRCh38
ARG SPECIES=homo_sapiens
ARG VEP_VERSION=104
ARG VEP_TAG=104.3
ARG VEP_VERSION=105
ARG VEP_TAG=105.0
# Add conda installation dir to PATH (instead of doing 'conda activate')
ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH

View file

@ -20,9 +20,9 @@ build_push() {
docker push nfcore/vep:${VEP_TAG}.${GENOME}
}
build_push "GRCh37" "homo_sapiens" "104" "104.3"
build_push "GRCh38" "homo_sapiens" "104" "104.3"
build_push "GRCm38" "mus_musculus" "102" "104.3"
build_push "GRCm39" "mus_musculus" "104" "104.3"
build_push "CanFam3.1" "canis_lupus_familiaris" "104" "104.3"
build_push "WBcel235" "caenorhabditis_elegans" "104" "104.3"
build_push "GRCh37" "homo_sapiens" "105" "105.0"
build_push "GRCh38" "homo_sapiens" "105" "105.0"
build_push "GRCm38" "mus_musculus" "102" "105.0"
build_push "GRCm39" "mus_musculus" "105" "105.0"
build_push "CanFam3.1" "canis_lupus_familiaris" "104" "105.0"
build_push "WBcel235" "caenorhabditis_elegans" "105" "105.0"

View file

@ -1,10 +1,10 @@
# You can use this file to create a conda environment for this module:
# conda env create -f environment.yml
name: nf-core-vep-104.3
name: nf-core-vep-105.0
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::ensembl-vep=104.3
- bioconda::ensembl-vep=105.0

View file

@ -11,7 +11,7 @@ process FILTLONG {
tuple val(meta), path(shortreads), path(longreads)
output:
tuple val(meta), path("${meta.id}_lr_filtlong.fastq.gz"), emit: reads
tuple val(meta), path("*.fastq.gz"), emit: reads
path "versions.yml" , emit: versions
when:
@ -20,13 +20,14 @@ process FILTLONG {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def short_reads = meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}"
def short_reads = !shortreads ? "" : meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}"
if ("$longreads" == "${prefix}.fastq.gz") error "Longread FASTQ input and output names are the same, set prefix in module configuration to disambiguate!"
"""
filtlong \\
$short_reads \\
$args \\
$longreads \\
| gzip -n > ${prefix}_lr_filtlong.fastq.gz
| gzip -n > ${prefix}.fastq.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -1,6 +1,6 @@
def VERSION = '2.1' // Version information not provided by tool on CLI
process GAMMA {
process GAMMA_GAMMA {
tag "$meta.id"
label 'process_low'
@ -26,13 +26,24 @@ process GAMMA {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
GAMMA.py \\
if [[ ${fasta} == *.gz ]]
then
FNAME=\$(basename ${fasta} .gz)
gunzip -f ${fasta}
GAMMA.py \\
$args \\
"\${FNAME}" \\
$db \\
$prefix
else
GAMMA.py \\
$args \\
$fasta \\
$db \\
$prefix
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gamma: $VERSION

View file

@ -1,4 +1,4 @@
name: "gamma"
name: "gamma_gamma"
description: Gene Allele Mutation Microbial Assessment
keywords:
- gamma
@ -61,3 +61,4 @@ output:
authors:
- "@sateeshperi"
- "@rastanton"
- "@jvhagey"

View file

@ -0,0 +1,63 @@
process GATK_UNIFIEDGENOTYPER {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk=3.5" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk:3.5--hdfd78af_11':
'quay.io/biocontainers/gatk:3.5--hdfd78af_11' }"
input:
tuple val(meta), path(input), path(index)
path fasta
path fai
path dict
path intervals
path contamination
path dbsnp
path comp
output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def contamination_file = contamination ? "-contaminationFile ${contamination}" : ""
def dbsnp_file = dbsnp ? "--dbsnp ${dbsnp}" : ""
def comp_file = comp ? "--comp ${comp}" : ""
def intervals_file = intervals ? "--intervals ${intervals}" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[GATK RealignerTargetCreator] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
} else {
avail_mem = task.memory.giga
}
"""
gatk3 \\
-Xmx${avail_mem}g \\
-nt ${task.cpus} \\
-T UnifiedGenotyper \\
-I ${input} \\
-R ${fasta} \\
${contamination_file} \\
${dbsnp_file} \\
${comp_file} \\
${intervals_file} \\
-o ${prefix}.vcf \\
$args
gzip -n *.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk: \$(echo \$(gatk3 --version))
END_VERSIONS
"""
}

View file

@ -0,0 +1,73 @@
name: "gatk_unifiedgenotyper"
keywords:
- bam
- vcf
- variant calling
tools:
- "gatk":
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
homepage: "https://gatk.broadinstitute.org/hc/en-us"
documentation: "https://github.com/broadinstitute/gatk-docs"
licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'BSD', 'https://www.broadinstitute.org/gatk/about/#licensing']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- input:
type: file
description: Sorted and indexed BAM/CRAM/SAM file
pattern: "*.bam"
- index:
type: file
description: BAM index file
pattern: "*.bai"
- fasta:
type: file
description: Reference file used to generate BAM file
pattern: ".{fasta,fa,fna}"
- fai:
type: file
description: Index of reference file used to generate BAM file
pattern: ".fai"
- dict:
type: file
description: GATK dict file for reference
pattern: ".dict"
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
pattern: "*.intervals"
- contamination:
type: file
description: Tab-separated file containing fraction of contamination in sequencing data (per sample) to aggressively remove
pattern: "*"
- dbsnps:
type: file
description: VCF file containing known sites (optional)
pattern: "*"
- comp:
type: file
description: Comparison VCF file (optional)
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"
- vcf:
type: file
description: VCF file containing called variants
pattern: "*.vcf.gz"
authors:
- "@ilight1542"
- "@jfy133"

View file

@ -2,10 +2,10 @@ process GATK4_APPLYBQSR {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_APPLYBQSR_SPARK {
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.6.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.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_APPLYVQSR {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(vcf_tbi), path(recal), path(recal_index), path(tranches)

View file

@ -2,10 +2,10 @@ process GATK4_BASERECALIBRATOR {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_BASERECALIBRATOR_SPARK {
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.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' :
'broadinstitute/gatk:4.2.3.0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_BEDTOINTERVALLIST {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(bed)

View file

@ -2,10 +2,10 @@ process GATK4_CALCULATECONTAMINATION {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(pileup), path(matched)

View file

@ -0,0 +1,51 @@
process GATK4_CALIBRATEDRAGSTRMODEL {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(bam_index), path(intervals)
path fasta
path fasta_fai
path dict
path strtablefile
output:
tuple val(meta), path("*.txt") , emit: dragstr_model
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def intervals_command = intervals ? "--intervals $intervals" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[GATK CalibrateDragstrModel] 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" CalibrateDragstrModel \\
--input $bam \\
--output ${prefix}.txt \\
--reference $fasta \\
--str-table-path $strtablefile \\
--threads $task.cpus \\
$intervals_command \\
--tmp-dir . \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,74 @@
name: gatk4_calibratedragstrmodel
description: estimates the parameters for the DRAGstr model
keywords:
- gatk4
- bam
- cram
- sam
- calibratedragstrmodel
tools:
- gatk4:
description:
Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
with a primary focus on variant discovery and genotyping. Its powerful processing engine
and high-performance computing features make it capable of taking on projects of any size.
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360057441571-CalibrateDragstrModel-BETA-
tool_dev_url: https://github.com/broadinstitute/gatk
doi: 10.1158/1538-7445.AM2017-3590
licence: ["Apache-2.0"]
input:
# Only when we have meta
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- bam_index:
type: file
description: index of the BAM/CRAM/SAM file
pattern: "*.{bai,crai,sai}"
- intervals:
type: file
description: BED file or interval list containing regions (optional)
pattern: "*.{bed,interval_list}"
- fasta:
type: file
description: The reference FASTA file
pattern: "*.{fasta,fa}"
- fasta_fai:
type: file
description: The index of the reference FASTA file
pattern: "*.fai"
- dict:
type: file
description: The sequence dictionary of the reference FASTA file
pattern: "*.dict"
- strtablefile:
type: file
description: The StrTableFile zip folder of the reference FASTA file
pattern: "*.zip"
output:
#Only when we have meta
- 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"
- dragstr_model:
type: file
description: The DragSTR model
pattern: "*.txt"
authors:
- "@nvnieuwk"

View file

@ -0,0 +1,58 @@
process GATK4_CNNSCOREVARIANTS {
tag "$meta.id"
label 'process_low'
//Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811
if (params.enable_conda) {
exit 1, "Conda environments cannot be used for GATK4/CNNScoreVariants at the moment. Please use docker or singularity containers."
}
container 'broadinstitute/gatk:4.2.6.1' //Biocontainers is missing a package
input:
tuple val(meta), path(vcf), path(tbi), path(aligned_input), path(intervals)
path fasta
path fai
path dict
path architecture
path weights
output:
tuple val(meta), path("*cnn.vcf.gz") , emit: vcf
tuple val(meta), path("*cnn.vcf.gz.tbi"), emit: tbi
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def aligned_input = aligned_input ? "--input $aligned_input" : ""
def interval_command = intervals ? "--intervals $intervals" : ""
def architecture = architecture ? "--architecture $architecture" : ""
def weights = weights ? "--weights $weights" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[GATK CnnScoreVariants] 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" CNNScoreVariants \\
--variant $vcf \\
--output ${prefix}.cnn.vcf.gz \\
--reference $fasta \\
$interval_command \\
$aligned_input \\
$architecture \\
$weights \\
--tmp-dir . \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,80 @@
name: "gatk4_cnnscorevariants"
description: Apply a Convolutional Neural Net to filter annotated variants
keywords:
- gatk4_cnnscorevariants
- gatk4
- variants
tools:
- gatk4:
description: |
Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
with a primary focus on variant discovery and genotyping. Its powerful processing engine
and high-performance computing features make it capable of taking on projects of any size.
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
doi: 10.1158/1538-7445.AM2017-3590
licence: ["Apache-2.0"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: VCF file
pattern: "*.vcf.gz"
- tbi:
type: file
description: VCF index file
pattern: "*.vcf.gz.tbi"
- aligned_input:
type: file
description: BAM/CRAM file from alignment (optional)
pattern: "*.{bam,cram}"
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta:
type: file
description: The reference fasta file
pattern: "*.fasta"
- fai:
type: file
description: Index of reference fasta file
pattern: "*.fasta.fai"
- dict:
type: file
description: GATK sequence dictionary
pattern: "*.dict"
- architecture:
type: file
description: Neural Net architecture configuration json file (optional)
pattern: "*.json"
- weights:
type: file
description: Keras model HD5 file with neural net weights. (optional)
pattern: "*.hd5"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: Annotated VCF file
pattern: "*.vcf"
- tbi:
type: file
description: VCF index file
pattern: "*.vcf.gz.tbi"
authors:
- "@FriederikeHanssen"

View file

@ -2,10 +2,10 @@ process GATK4_COMBINEGVCFS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(vcf_idx)

View file

@ -0,0 +1,53 @@
process GATK4_COMPOSESTRTABLEFILE {
tag "$fasta"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
path(fasta)
path(fasta_fai)
path(dict)
output:
path "*.zip" , emit: str_table
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def avail_mem = 6
if (!task.memory) {
log.info '[GATK ComposeSTRTableFile] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.'
} else {
avail_mem = task.memory.giga
}
"""
gatk --java-options "-Xmx${avail_mem}g" ComposeSTRTableFile \\
--reference $fasta \\
--output ${fasta.baseName}.zip \\
--tmp-dir . \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
stub:
"""
touch test.zip
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,43 @@
name: "gatk4_composestrtablefile"
description: This tool looks for low-complexity STR sequences along the reference that are later used to estimate the Dragstr model during single sample auto calibration CalibrateDragstrModel.
keywords:
- gatk4
- composestrtablefile
tools:
- gatk4:
description:
Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
with a primary focus on variant discovery and genotyping. Its powerful processing engine
and high-performance computing features make it capable of taking on projects of any size.
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us/articles/4405451249819-ComposeSTRTableFile
tool_dev_url: https://github.com/broadinstitute/gatk
doi: 10.1158/1538-7445.AM2017-3590
licence: ["Apache-2.0"]
input:
- fasta:
type: file
description: FASTA reference file
pattern: "*.{fasta,fa}"
- fasta_fai:
type: file
description: index of the FASTA reference file
pattern: "*.fai"
- dict:
type: file
description: Sequence dictionary of the FASTA reference file
pattern: "*.dict"
output:
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- str_table:
type: file
description: A zipped folder containing the STR table files
pattern: "*.zip"
authors:
- "@nvnieuwk"

View file

@ -2,10 +2,10 @@ process GATK4_CREATESEQUENCEDICTIONARY {
tag "$fasta"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
path fasta

View file

@ -2,10 +2,10 @@ process GATK4_CREATESOMATICPANELOFNORMALS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(genomicsdb)

View file

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

View file

@ -2,10 +2,10 @@ process GATK4_FASTQTOSAM {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(reads)

View file

@ -2,10 +2,10 @@ process GATK4_FILTERMUTECTCALLS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(vcf_tbi), path(stats), path(orientationbias), path(segmentation), path(table), val(estimate)

View file

@ -0,0 +1,51 @@
process GATK4_FILTERVARIANTTRANCHES {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(tbi), path(intervals)
path resources
path resources_index
path fasta
path fai
path dict
output:
tuple val(meta), path("*.vcf.gz") , emit: vcf
tuple val(meta), path("*.vcf.gz.tbi"), emit: tbi
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def resources = resources.collect{"--resource $it"}.join(' ')
def avail_mem = 3
if (!task.memory) {
log.info '[GATK FilterVariantTranches] 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" FilterVariantTranches \\
--variant $vcf \\
$resources \\
--output ${prefix}.filtered.vcf.gz \\
--tmp-dir . \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,68 @@
name: "gatk4_filtervarianttranches"
description: Apply tranche filtering
keywords:
- gatk4
- filtervarianttranches
tools:
- "gatk4":
description: Genome Analysis Toolkit (GATK4)
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us
tool_dev_url: https://github.com/broadinstitute/gatk
doi: "10.1158/1538-7445.AM2017-3590"
licence: ["BSD-3-clause"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: a VCF file containing variants, must have info key:CNN_2D
pattern: "*.vcf.gz"
- tbi:
type: file
description: tbi file matching with -vcf
pattern: "*.vcf.gz.tbi"
- resources:
type: list
description: resource A VCF containing known SNP and or INDEL sites. Can be supplied as many times as necessary
pattern: "*.vcf.gz"
- resources_index:
type: list
description: Index of resource VCF containing known SNP and or INDEL sites. Can be supplied as many times as necessary
pattern: "*.vcf.gz"
- fasta:
type: file
description: The reference fasta file
pattern: "*.fasta"
- fai:
type: file
description: Index of reference fasta file
pattern: "fasta.fai"
- dict:
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: VCF file
pattern: "*.vcf.gz"
- tbi:
type: file
description: VCF index file
pattern: "*.vcf.gz.tbi"
authors:
- "@FriederikeHanssen"

View file

@ -2,10 +2,10 @@ process GATK4_GATHERBQSRREPORTS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(table)

View file

@ -2,10 +2,10 @@ process GATK4_GATHERPILEUPSUMMARIES {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:

View file

@ -2,10 +2,10 @@ process GATK4_GENOMICSDBIMPORT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(tbi), path(interval_file), val(interval_value), path(wspace)

View file

@ -2,10 +2,10 @@ process GATK4_GENOTYPEGVCFS {
tag "$meta.id"
label 'process_high'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(gvcf), path(gvcf_index), path(intervals), path(intervals_index)

View file

@ -2,10 +2,10 @@ process GATK4_GETPILEUPSUMMARIES {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(index), path(intervals)
@ -40,7 +40,7 @@ process GATK4_GETPILEUPSUMMARIES {
--variant $variants \\
--output ${prefix}.pileups.table \\
$reference_command \\
$sites_command \\
$interval_command \\
--tmp-dir . \\
$args

View file

@ -2,13 +2,13 @@ process GATK4_HAPLOTYPECALLER {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(intervals)
tuple val(meta), path(input), path(input_index), path(intervals), path(dragstr_model)
path fasta
path fai
path dict
@ -28,6 +28,7 @@ process GATK4_HAPLOTYPECALLER {
def prefix = task.ext.prefix ?: "${meta.id}"
def dbsnp_command = dbsnp ? "--dbsnp $dbsnp" : ""
def interval_command = intervals ? "--intervals $intervals" : ""
def dragstr_command = dragstr_model ? "--dragstr-params-path $dragstr_model" : ""
def avail_mem = 3
if (!task.memory) {
@ -42,6 +43,7 @@ process GATK4_HAPLOTYPECALLER {
--reference $fasta \\
$dbsnp_command \\
$interval_command \\
$dragstr_command \\
--tmp-dir . \\
$args

View file

@ -32,6 +32,10 @@ input:
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- dragstr_model:
type: file
description: Text file containing the DragSTR model of the used BAM/CRAM file (optional)
pattern: "*.txt"
- fasta:
type: file
description: The reference fasta file

View file

@ -2,10 +2,10 @@ process GATK4_INDEXFEATUREFILE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(feature_file)

View file

@ -2,10 +2,10 @@ process GATK4_INTERVALLISTTOBED {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_INTERVALLISTTOOLS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_LEARNREADORIENTATIONMODEL {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(f1r2)

View file

@ -1,11 +1,11 @@
process GATK4_MARKDUPLICATES {
tag "$meta.id"
label 'process_low'
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam)

View file

@ -2,10 +2,10 @@ process GATK4_MERGEBAMALIGNMENT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(aligned), path(unmapped)

View file

@ -2,10 +2,10 @@ process GATK4_MERGEMUTECTSTATS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(stats)

View file

@ -2,10 +2,10 @@ process GATK4_MERGEVCFS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf)
@ -13,6 +13,7 @@ process GATK4_MERGEVCFS {
output:
tuple val(meta), path('*.vcf.gz'), emit: vcf
tuple val(meta), path("*.tbi") , emit: tbi
path "versions.yml" , emit: versions
when:

View file

@ -35,6 +35,11 @@ output:
type: file
description: merged vcf file
pattern: "*.vcf.gz"
- tbi:
type: file
description: index files for the merged vcf files
pattern: "*.tbi"
- versions:
type: file
description: File containing software versions

View file

@ -2,10 +2,10 @@ process GATK4_MUTECT2 {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(input), path(input_index), path(intervals)

View file

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

View file

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

View file

@ -2,10 +2,10 @@ process GATK4_SELECTVARIANTS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(vcf_idx)

View file

@ -2,10 +2,10 @@ process GATK4_SPLITNCIGARREADS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(bai), path(intervals)

View file

@ -2,10 +2,10 @@ process GATK4_VARIANTFILTRATION {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(tbi)

View file

@ -2,10 +2,10 @@ process GATK4_VARIANTRECALIBRATOR {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
tuple val(meta), path(vcf), path(tbi)

45
modules/hmtnote/main.nf Normal file
View file

@ -0,0 +1,45 @@
process HMTNOTE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::hmtnote=0.7.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/hmtnote:0.7.2--pyhdfd78af_0':
'quay.io/biocontainers/hmtnote:0.7.2--pyhdfd78af_0' }"
input:
tuple val(meta), path(vcf)
output:
tuple val(meta), path("*_annotated.vcf"), emit: vcf
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
hmtnote \\
annotate \\
$vcf \\
${prefix}_annotated.vcf \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_annotated.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
"""
}

39
modules/hmtnote/meta.yml Normal file
View file

@ -0,0 +1,39 @@
name: hmtnote
description: Human mitochondrial variants annotation using HmtVar.
keywords:
- hmtnote mitochondria annotation
tools:
- hmtnote:
description: Human mitochondrial variants annotation using HmtVar.
homepage: https://github.com/robertopreste/HmtNote
documentation: https://hmtnote.readthedocs.io/en/latest/usage.html
tool_dev_url: None
doi: "https://doi.org/10.1101/600619"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
- vcf:
type: file
description: vcf file
pattern: "*.vcf"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: annotated vcf
pattern: "*_annotated.vcf"
authors:
- "@sysbiocoder"

42
modules/kat/hist/main.nf Normal file
View file

@ -0,0 +1,42 @@
process KAT_HIST {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::kat=2.4.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/kat:2.4.2--py38hfc5f9d8_2':
'quay.io/biocontainers/kat:2.4.2--py38hfc5f9d8_2' }"
input:
tuple val(meta), path(reads)
output:
tuple val(meta), path("*.hist") , emit: hist
tuple val(meta), path("*.hist.dist_analysis.json"), emit: json
tuple val(meta), path("*.png") , emit: png , optional: true
tuple val(meta), path("*.ps") , emit: ps , optional: true
tuple val(meta), path("*.pdf") , emit: pdf , optional: true
tuple val(meta), path("*-hash.jf*") , emit: jellyfish_hash, optional: true
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
kat hist \\
--threads $task.cpus \\
--output_prefix ${prefix}.hist \\
$args \\
$reads
ls -l
cat <<-END_VERSIONS > versions.yml
"${task.process}":
kat: \$( kat hist --version | sed 's/kat //' )
END_VERSIONS
"""
}

64
modules/kat/hist/meta.yml Normal file
View file

@ -0,0 +1,64 @@
name: "kat_hist"
description: Creates a histogram of the number of distinct k-mers having a given frequency.
keywords:
- k-mer
- histogram
- count
tools:
- "kat":
description: "KAT is a suite of tools that analyse jellyfish hashes or sequence files (fasta or fastq) using kmer counts"
homepage: https://www.earlham.ac.uk/kat-tools
documentation: https://kat.readthedocs.io/en/latest/index.html
tool_dev_url: https://github.com/TGAC/KAT
doi: http://bioinformatics.oxfordjournals.org/content/early/2016/10/20/bioinformatics.btw663.abstract
licence: "['GPL v3']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- hist:
type: file
description: KAT histogram of k-mer counts
pattern: "*.hist"
- json:
type: file
description: KAT histogram summary of distance analysis
pattern: "*.hist.dist_analysis.json"
- png:
type: file
description: KAT plot of k-mer histogram in PNG format
pattern: "*.png"
- ps:
type: file
description: KAT plot of k-mer histogram in PS format
pattern: "*.ps"
- pdf:
type: file
description: KAT plot of k-mer histogram in PDF format
pattern: "*.pdf"
- jellyfish_hash:
type: file
description: Jellyfish hash file
pattern: "*-hist.jf*"
authors:
- "@mahesh-panchal"

View file

@ -0,0 +1,38 @@
process MASH_SCREEN {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::mash=2.3" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1':
'quay.io/biocontainers/mash:2.3--he348c14_1' }"
input:
tuple val(meta), path(query)
path sequences_sketch
output:
tuple val(meta), path("*.screen"), emit: screen
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mash \\
screen \\
$args \\
-p $task.cpus \\
$sequences_sketch \\
$query \\
> ${prefix}.screen
cat <<-END_VERSIONS > versions.yml
"${task.process}":
mash: \$( mash --version )
END_VERSIONS
"""
}

View file

@ -0,0 +1,48 @@
name: "mash_screen"
description: Screens query sequences against large sequence databases
keywords:
- screen
- containment
- contamination
- taxonomic assignment
tools:
- "mash":
description: Fast sequence distance estimator that uses MinHash
homepage: https://github.com/marbl/Mash
documentation: https://mash.readthedocs.io/en/latest/sketches.html
tool_dev_url: https://github.com/marbl/Mash
doi: "10.1186/s13059-016-0997-x"
licence: ["https://github.com/marbl/Mash/blob/master/LICENSE.txt"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- query:
type: file
description: Query sequences
pattern: "*.fastq.gz"
- sequence_sketch:
type: file
description: Sequence files to match against
pattern: "*.msh"
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"
- screen:
type: file
description: List of sequences from fastx_db similar to query sequences
pattern: "*.screen"
authors:
- "@mahesh-panchal"

View file

@ -0,0 +1,37 @@
process MAXQUANT_LFQ {
tag "$meta.id"
label 'process_long'
conda (params.enable_conda ? "bioconda::maxquant=2.0.3.0=py310hdfd78af_1" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/maxquant:2.0.3.0--py310hdfd78af_1"
} else {
container "quay.io/biocontainers/maxquant:2.0.3.0--py310hdfd78af_1"
}
input:
tuple val(meta), path(fasta), path(paramfile)
path raw
output:
tuple val(meta), path("*.txt"), emit: maxquant_txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
maxquant: \$(maxquant --version 2>&1 > /dev/null | cut -f2 -d\" \")
END_VERSIONS
sed \"s_<numThreads>.*_<numThreads>$task.cpus</numThreads>_\" ${paramfile} > mqpar_changed.xml
sed -i \"s|PLACEHOLDER|\$PWD/|g\" mqpar_changed.xml
mkdir temp
maxquant mqpar_changed.xml
mv combined/txt/*.txt .
"""
}

View file

@ -0,0 +1,52 @@
name: maxquant_lfq
description: Run standard proteomics data analysis with MaxQuant, mostly dedicated to label-free. Paths to fasta and raw files needs to be marked by "PLACEHOLDER"
keywords:
- sort
tools:
- maxquant:
description: MaxQuant is a quantitative proteomics software package designed for analyzing large mass-spectrometric data sets. License restricted.
homepage: None
documentation: None
tool_dev_url: None
doi: ""
licence: ["http://www.coxdocs.org/lib/exe/fetch.php?media=license_agreement.pdf"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- raw:
type: file
description: raw files with mass spectra
pattern: "*.{raw,RAW,Raw}"
- fasta:
type: file
description: fasta file with protein sequences
pattern: "*.{fasta}"
- parfile:
type: file
description: MaxQuant parameter file (XML)
pattern: "*.{xml}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software version
pattern: "versions.yml"
- maxquant_txt:
type: file
description: tables with peptides and protein information
pattern: "*.{txt}"
authors:
- "@veitveit"

View file

@ -10,18 +10,22 @@ process MOSDEPTH {
input:
tuple val(meta), path(bam), path(bai)
path bed
val window_size
path fasta
output:
tuple val(meta), path('*.global.dist.txt') , emit: global_txt
tuple val(meta), path('*.region.dist.txt') , emit: regions_txt , optional:true
tuple val(meta), path('*.summary.txt') , emit: summary_txt
tuple val(meta), path('*.per-base.d4') , emit: d4 , optional:true
tuple val(meta), path('*.per-base.bed.gz') , emit: per_base_bed, optional:true
tuple val(meta), path('*.per-base.bed.gz.csi'), emit: per_base_csi, optional:true
tuple val(meta), path('*.regions.bed.gz') , emit: regions_bed , optional:true
tuple val(meta), path('*.regions.bed.gz.csi') , emit: regions_csi , optional:true
path "versions.yml" , emit: versions
tuple val(meta), path('*.global.dist.txt') , emit: global_txt
tuple val(meta), path('*.summary.txt') , emit: summary_txt
tuple val(meta), path('*.region.dist.txt') , optional:true, emit: regions_txt
tuple val(meta), path('*.per-base.d4') , optional:true, emit: per_base_d4
tuple val(meta), path('*.per-base.bed.gz') , optional:true, emit: per_base_bed
tuple val(meta), path('*.per-base.bed.gz.csi') , optional:true, emit: per_base_csi
tuple val(meta), path('*.regions.bed.gz') , optional:true, emit: regions_bed
tuple val(meta), path('*.regions.bed.gz.csi') , optional:true, emit: regions_csi
tuple val(meta), path('*.quantized.bed.gz') , optional:true, emit: quantized_bed
tuple val(meta), path('*.quantized.bed.gz.csi') , optional:true, emit: quantized_csi
tuple val(meta), path('*.thresholds.bed.gz') , optional:true, emit: thresholds_bed
tuple val(meta), path('*.thresholds.bed.gz.csi'), optional:true, emit: thresholds_csi
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@ -29,19 +33,24 @@ process MOSDEPTH {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
if (window_size) {
interval = "--by ${window_size}"
} else if ( bed ) {
interval = "--by ${bed}"
} else {
interval = ""
def reference = fasta ? "--fasta ${fasta}" : ""
def interval = bed ? "--by ${bed}" : ""
if (bed && args.contains("--by")) {
exit 1, "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition"
}
if (!bed && args.contains("--thresholds")) {
exit 1, "'--thresholds' can only be specified in conjunction with '--by'"
}
"""
mosdepth \\
--threads $task.cpus \\
$interval \\
$reference \\
$args \\
$prefix \\
$bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//')
@ -59,6 +68,10 @@ process MOSDEPTH {
touch ${prefix}.per-base.bed.gz.csi
touch ${prefix}.regions.bed.gz
touch ${prefix}.regions.bed.gz.csi
touch ${prefix}.quantized.bed.gz
touch ${prefix}.quantized.bed.gz.csi
touch ${prefix}.thresholds.bed.gz
touch ${prefix}.thresholds.bed.gz.csi
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -30,10 +30,10 @@ input:
type: file
description: BED file with intersected intervals
pattern: "*.{bed}"
- window_size:
type: integer
description: Window size
pattern: "[0-9]+"
- fasta:
type: file
description: Reference genome FASTA file
pattern: "*.{fa,fasta}"
output:
- meta:
type: map
@ -60,6 +60,10 @@ output:
type: file
description: Index file for BED file with per-base coverage
pattern: "*.{per-base.bed.gz.csi}"
- per_base_d4:
type: file
description: D4 file with per-base coverage
pattern: "*.{per-base.d4}"
- regions_bed:
type: file
description: BED file with per-region coverage
@ -68,6 +72,22 @@ output:
type: file
description: Index file for BED file with per-region coverage
pattern: "*.{regions.bed.gz.csi}"
- quantized_bed:
type: file
description: BED file with binned coverage
pattern: "*.{quantized.bed.gz}"
- quantized_csi:
type: file
description: Index file for BED file with binned coverage
pattern: "*.{quantized.bed.gz.csi}"
- thresholds_bed:
type: file
description: BED file with the number of bases in each region that are covered at or above each threshold
pattern: "*.{thresholds.bed.gz}"
- thresholds_csi:
type: file
description: Index file for BED file with threshold coverage
pattern: "*.{thresholds.bed.gz.csi}"
- versions:
type: file
description: File containing software versions
@ -76,3 +96,4 @@ authors:
- "@joseespinosa"
- "@drpatelh"
- "@ramprasadn"
- "@matthdsm"

View file

@ -0,0 +1,54 @@
process MOTUS_PROFILE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::motus=3.0.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0':
'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }"
input:
tuple val(meta), path(reads)
path db
output:
tuple val(meta), path("*.out"), emit: out
tuple val(meta), path("*.bam"), optional: true, emit: bam
tuple val(meta), path("*.mgc"), optional: true, emit: mgc
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def inputs = reads[0].getExtension() == 'bam' ?
"-i ${reads}" :
reads[0].getExtension() == 'mgc' ? "-m $reads" :
meta.single_end ?
"-s $reads" : "-f ${reads[0]} -r ${reads[1]}"
def refdb = db ? "-db ${db}" : ""
"""
motus profile \\
$args \\
$inputs \\
$refdb \\
-t $task.cpus \\
-n $prefix \\
-o ${prefix}.out
## mOTUs version number is not available from command line.
## mOTUs save the version number in index database folder.
## mOTUs will check the database version is same version as exec version.
if [ "$db" == "" ]; then
VERSION=\$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//')
else
VERSION=\$(grep motus $db/db_mOTU_versions | sed 's/motus\\t//g')
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
mOTUs: \$VERSION
END_VERSIONS
"""
}

View file

@ -0,0 +1,61 @@
name: "motus_profile"
description: Taxonomic meta-omics profiling using universal marker genes
keywords:
- classify
- metagenomics
- fastq
- taxonomic profiling
tools:
- "motus":
description: "Marker gene-based OTU (mOTU) profiling"
homepage: "https://motu-tool.org/"
documentation: "https://github.com/motu-tool/mOTUs/wiki"
tool_dev_url: "https://github.com/motu-tool/mOTUs"
doi: "10.1038/s41467-019-08844-4"
licence: "['GPL v3']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input fastq/fasta files of size 1 and 2 for single-end and paired-end data,
respectively.
Or the intermediate bam file mapped by bwa to the mOTUs database or
the output bam file from motus profile.
Or the intermediate mgc read counts table.
pattern: "*.{fastq,fq,fasta,fa,fastq.gz,fq.gz,fasta.gz,fa.gz,.bam,.mgc}"
- db:
type: directory
description: |
mOTUs database downloaded by `motus downloadDB`
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"
- out:
type: file
description: Results with taxonomic classification of each read
pattern: "*.out"
- bam:
type: file
description: Optional intermediate sorted BAM file from BWA
pattern: "*.{bam}"
- mgc:
type: file
description: Optional intermediate mgc read count table file saved with `-M`.
pattern: "*.{mgc}"
authors:
- "@jianhong"

View file

@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)

View file

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

View file

@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -24,7 +24,7 @@ process PICARD_COLLECTHSMETRICS {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reference = fasta ? "-R $fasta" : ""
def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3
if (!task.memory) {

View file

@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -22,6 +22,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -35,7 +36,7 @@ process PICARD_COLLECTMULTIPLEMETRICS {
$args \\
--INPUT $bam \\
--OUTPUT ${prefix}.CollectMultipleMetrics \\
--REFERENCE_SEQUENCE $fasta
$reference
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process PICARD_COLLECTWGSMETRICS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
@ -34,7 +34,7 @@ process PICARD_COLLECTWGSMETRICS {
$args \\
--INPUT $bam \\
--OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\
--REFERENCE_SEQUENCE $fasta
--REFERENCE_SEQUENCE ${fasta}
cat <<-END_VERSIONS > versions.yml

View file

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

View file

@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(input1)

View file

@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(readlist)

View file

@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)

View file

@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(input_vcf)

View file

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

View file

@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bams)

View file

@ -2,10 +2,10 @@ process PICARD_SORTSAM {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(bam)

View file

@ -2,10 +2,10 @@ process PICARD_SORTVCF {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.27.1" : null)
conda (params.enable_conda ? "bioconda::picard=2.27.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:2.27.2--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.2--hdfd78af_0' }"
input:
tuple val(meta), path(vcf)

View file

@ -0,0 +1,55 @@
process SNIPPY_RUN {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::snippy=4.6.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/snippy:4.6.0--hdfd78af_2' :
'quay.io/biocontainers/snippy:4.6.0--hdfd78af_2' }"
input:
tuple val(meta), path(reads)
path reference
output:
tuple val(meta), path("${prefix}/${prefix}.tab") , emit: tab
tuple val(meta), path("${prefix}/${prefix}.csv") , emit: csv
tuple val(meta), path("${prefix}/${prefix}.html") , emit: html
tuple val(meta), path("${prefix}/${prefix}.vcf") , emit: vcf
tuple val(meta), path("${prefix}/${prefix}.bed") , emit: bed
tuple val(meta), path("${prefix}/${prefix}.gff") , emit: gff
tuple val(meta), path("${prefix}/${prefix}.bam") , emit: bam
tuple val(meta), path("${prefix}/${prefix}.bam.bai") , emit: bai
tuple val(meta), path("${prefix}/${prefix}.log") , emit: log
tuple val(meta), path("${prefix}/${prefix}.aligned.fa") , emit: aligned_fa
tuple val(meta), path("${prefix}/${prefix}.consensus.fa") , emit: consensus_fa
tuple val(meta), path("${prefix}/${prefix}.consensus.subs.fa"), emit: consensus_subs_fa
tuple val(meta), path("${prefix}/${prefix}.raw.vcf") , emit: raw_vcf
tuple val(meta), path("${prefix}/${prefix}.filt.vcf") , emit: filt_vcf
tuple val(meta), path("${prefix}/${prefix}.vcf.gz") , emit: vcf_gz
tuple val(meta), path("${prefix}/${prefix}.vcf.gz.csi") , emit: vcf_csi
tuple val(meta), path("${prefix}/${prefix}.txt") , emit: txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def read_inputs = meta.single_end ? "--se ${reads[0]}" : "--R1 ${reads[0]} --R2 ${reads[1]}"
"""
snippy \\
$args \\
--cpus $task.cpus \\
--outdir $prefix \\
--reference $reference \\
--prefix $prefix \\
$read_inputs
cat <<-END_VERSIONS > versions.yml
"${task.process}":
snippy: \$(echo \$(snippy --version 2>&1) | sed 's/snippy //')
END_VERSIONS
"""
}

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