mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Merge pull request #1570 from nvnieuwk/vardict-java
new_module:vardict-java
This commit is contained in:
commit
b61cdc7355
6 changed files with 151 additions and 0 deletions
50
modules/vardictjava/main.nf
Normal file
50
modules/vardictjava/main.nf
Normal file
|
@ -0,0 +1,50 @@
|
|||
def VERSION = '1.8.3'
|
||||
|
||||
process VARDICTJAVA {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0':
|
||||
'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
path(bed)
|
||||
tuple path(fasta), path(fasta_fai)
|
||||
|
||||
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 args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
"""
|
||||
vardict-java \\
|
||||
$args \\
|
||||
-c 1 -S 2 -E 3 \\
|
||||
-b $bam \\
|
||||
-th $task.cpus \\
|
||||
-N $prefix \\
|
||||
-G $fasta \\
|
||||
$bed \\
|
||||
| teststrandbias.R \\
|
||||
| var2vcf_valid.pl \\
|
||||
$args2 \\
|
||||
-N $prefix \\
|
||||
| gzip -c > ${prefix}.vcf.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
vardict-java: $VERSION
|
||||
var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }'))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
60
modules/vardictjava/meta.yml
Normal file
60
modules/vardictjava/meta.yml
Normal file
|
@ -0,0 +1,60 @@
|
|||
name: "vardictjava"
|
||||
|
||||
description: The Java port of the VarDict variant caller
|
||||
keywords:
|
||||
- variant calling
|
||||
- VarDict
|
||||
- AstraZeneca
|
||||
tools:
|
||||
- "vardictjava":
|
||||
description: "Java port of the VarDict variant discovery program"
|
||||
homepage: "https://github.com/AstraZeneca-NGS/VarDictJava"
|
||||
documentation: "https://github.com/AstraZeneca-NGS/VarDictJava"
|
||||
tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava"
|
||||
doi: "10.1093/nar/gkw227 "
|
||||
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: Index of the BAM file
|
||||
pattern: "*.bai"
|
||||
- fasta:
|
||||
type: file
|
||||
description: FASTA of the reference genome
|
||||
pattern: "*.{fa,fasta}"
|
||||
- fasta_fai:
|
||||
type: file
|
||||
description: The index of the FASTA of the reference genome
|
||||
pattern: "*.fai"
|
||||
- bed:
|
||||
type: file
|
||||
description: BED with the regions of interest
|
||||
pattern: "*.bed"
|
||||
|
||||
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 output
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
authors:
|
||||
- "@nvnieuwk"
|
|
@ -1920,6 +1920,10 @@ unzip:
|
|||
- modules/unzip/**
|
||||
- tests/modules/unzip/**
|
||||
|
||||
vardictjava:
|
||||
- modules/vardictjava/**
|
||||
- tests/modules/vardictjava/**
|
||||
|
||||
variantbam:
|
||||
- modules/variantbam/**
|
||||
- tests/modules/variantbam/**
|
||||
|
|
23
tests/modules/vardictjava/main.nf
Normal file
23
tests/modules/vardictjava/main.nf
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf'
|
||||
|
||||
workflow test_vardictjava {
|
||||
|
||||
bam_input_ch = Channel.value([
|
||||
[ 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)
|
||||
])
|
||||
|
||||
bed = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true))
|
||||
|
||||
reference = Channel.value([
|
||||
file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
])
|
||||
|
||||
VARDICTJAVA ( bam_input_ch, bed, reference )
|
||||
}
|
5
tests/modules/vardictjava/nextflow.config
Normal file
5
tests/modules/vardictjava/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
9
tests/modules/vardictjava/test.yml
Normal file
9
tests/modules/vardictjava/test.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- name: vardictjava test_vardictjava
|
||||
command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config
|
||||
tags:
|
||||
- vardictjava
|
||||
files:
|
||||
- path: output/vardictjava/test.vcf.gz
|
||||
md5sum: 3f1f227afc532bddeb58f16fd3013fc8
|
||||
- path: output/vardictjava/versions.yml
|
||||
md5sum: 9b62c431a4f2680412b61c7071bdb1cd
|
Loading…
Reference in a new issue