Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added delly/filter, changed delly/call - this time with up-to-date fork #5384

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions modules/nf-core/delly/call/main.nf
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
process DELLY_CALL {
tag "$meta.id"
label 'process_medium'
label 'process_single'
SPPearce marked this conversation as resolved.
Show resolved Hide resolved

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/delly:1.2.6--hb7e2ac5_1' :
'biocontainers/delly:1.2.6--hb7e2ac5_1' }"

input:
tuple val(meta), path(input), path(input_index), path(vcf), path(vcf_index), path(exclude_bed)
tuple val(meta), path(input_1), path(input_1_idx), path(input_ctrl), path(input_ctrl_idx), path(vcf), path(vcf_index), path(exclude_bed)
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)

output:
tuple val(meta), path("*.{bcf,vcf.gz}") , emit: bcf
tuple val(meta), path("*.{csi,tbi}") , emit: csi
path "versions.yml" , emit: versions
tuple val(meta), path("*.{bcf,vcf.gz}"), emit: bcf
tuple val(meta), path("*.{csi,tbi}") , emit: csi
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def args3 = task.ext.args3 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def suffix = task.ext.suffix ?: "bcf"

def input = input_ctrl ? "${input_1} ${input_ctrl}" : "${input_1}"
def exclude = exclude_bed ? "--exclude ${exclude_bed}" : ""

def bcf_output = suffix == "bcf" ? "--outfile ${prefix}.bcf" : ""
def vcf_output = suffix == "vcf" ? "| bgzip ${args2} --threads ${task.cpus} --stdout > ${prefix}.vcf.gz && tabix ${prefix}.vcf.gz" : ""
def vcf_output = suffix == "vcf" ? "| bgzip ${args2} --threads ${task.cpus} --stdout > ${prefix}.vcf.gz && tabix ${args3} ${prefix}.vcf.gz" : ""

def genotype = vcf ? "--vcffile ${vcf}" : ""

Expand Down
31 changes: 29 additions & 2 deletions modules/nf-core/delly/call/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,45 @@ tools:
documentation: https://github.com/dellytools/delly/blob/master/README.md
doi: "10.1093/bioinformatics/bts378"
licence: ["BSD-3-Clause"]
args_id: "$args"
- bgzip:
description: Bgzip compresses or decompresses files in a similar manner to, and compatible with, gzip.
homepage: https://www.htslib.org/doc/tabix.html
documentation: http://www.htslib.org/doc/bgzip.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
args_id: "$args2"
- tabix:
description: Generic indexer for TAB-delimited genome position files.
homepage: https://www.htslib.org/doc/tabix.html
documentation: https://www.htslib.org/doc/tabix.1.html
doi: 10.1093/bioinformatics/btq671
licence: ["MIT"]
args_id: "$args3"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- input:
- input_1:
type: file
description: BAM/CRAM file from alignment must be sorted, indexed, and duplicate marked
pattern: "*.{bam,cram}"
- input_index:
- input_1_idx:
type: file
description: Index of the BAM/CRAM file
pattern: "*.{bai,crai}"
- input_ctrl:
type: file
description: |
Optional BAM/CRAM file of matched control sample for somatic variant calling.
Must be sorted, indexed, and duplicate marked.
pattern: "*.{bam,cram}"
- input_ctrl_idx:
type: file
description: Optional index of the control BAM/CRAM file
pattern: "*.{bai,crai}"
- vcf:
type: file
description: A BCF/VCF file to genotype with Delly. If this is supplied, the variant calling will be skipped
Expand Down Expand Up @@ -77,6 +102,8 @@ output:
authors:
- "@projectoriented"
- "@nvnieuwk"
- "@alexnater"
maintainers:
- "@projectoriented"
- "@nvnieuwk"
- "@alexnater"
Loading
Loading