New module: Whamg (#1994)

* added whamg

* linting

* linting
master
nvnieuwk 2 years ago committed by GitHub
parent 49825425bb
commit a509eda8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,41 @@
process WHAMG {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::wham=1.8.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/wham:1.8.0.1.2017.05.03--h8b12597_1':
'quay.io/biocontainers/wham:1.8.0.1.2017.05.03--h8b12597_1' }"
input:
tuple val(meta), path(bam), path(bai)
path(fasta)
output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
path("*.txt") , emit: graph, 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}"
"""
whamg \\
-x $task.cpus \\
-f $bam \\
-a $fasta \\
$args \\
> ${prefix}.vcf
gzip ${prefix}.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
whamg: \$(echo \$(whamg 2>&1 | grep Version | sed 's/^Version: v//; s/-.*\$//' ))
END_VERSIONS
"""
}

@ -0,0 +1,49 @@
name: "whamg"
description: The wham suite consists of two programs, wham and whamg. wham, the original tool, is a very sensitive method with a high false discovery rate. The second program, whamg, is more accurate and better suited for general structural variant (SV) discovery.
keywords:
- whamg
- wham
- vcf
- bam
- variant calling
tools:
- "whamg":
description: "Structural variant detection and association testing"
homepage: "https://github.com/zeeev/wham"
documentation: "https://github.com/zeeev/wham"
tool_dev_url: "https://github.com/zeeev/wham"
doi: "https://doi.org/10.1371/journal.pcbi.1004572"
licence: "['MIT']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/SAM file
pattern: "*.{bam,sam}"
- bai:
type: file
description: BAM index file
pattern: "*.bai"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: Compressed VCF file
pattern: "*.vcf.gz"
authors:
- "@nvnieuwk"

@ -2332,6 +2332,10 @@ vsearch/usearchglobal:
- modules/vsearch/usearchglobal/**
- tests/modules/vsearch/usearchglobal/**
whamg:
- modules/whamg/**
- tests/modules/whamg/**
yara/index:
- modules/yara/index/**
- tests/modules/yara/index/**

@ -0,0 +1,18 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { WHAMG } from '../../../modules/whamg/main.nf'
workflow test_whamg_bam {
input = [
[ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
WHAMG ( input, fasta )
}

@ -0,0 +1,8 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: WHAMG {
ext.args = ""
}
}

@ -0,0 +1,6 @@
- name: whamg test_whamg_bam
command: nextflow run ./tests/modules/whamg -entry test_whamg_bam -c ./tests/config/nextflow.config -c ./tests/modules/whamg/nextflow.config
tags:
- whamg
files:
- path: output/whamg/test.vcf.gz
Loading…
Cancel
Save