mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 10:48:18 +00:00
parent
49825425bb
commit
a509eda8a4
6 changed files with 126 additions and 0 deletions
41
modules/whamg/main.nf
Normal file
41
modules/whamg/main.nf
Normal file
|
@ -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
|
||||
"""
|
||||
}
|
49
modules/whamg/meta.yml
Normal file
49
modules/whamg/meta.yml
Normal file
|
@ -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/**
|
||||
|
|
18
tests/modules/whamg/main.nf
Normal file
18
tests/modules/whamg/main.nf
Normal file
|
@ -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 )
|
||||
}
|
8
tests/modules/whamg/nextflow.config
Normal file
8
tests/modules/whamg/nextflow.config
Normal file
|
@ -0,0 +1,8 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: WHAMG {
|
||||
ext.args = ""
|
||||
}
|
||||
}
|
6
tests/modules/whamg/test.yml
Normal file
6
tests/modules/whamg/test.yml
Normal file
|
@ -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…
Reference in a new issue