Added java options to vardict java (#1695)

* Added java options to vardict java

* updated test.yml

* correctly added java options

* Added automatic version numbers for vardictjava

* possible fix for version number in conda

* removed the cram tests

* linting

* Update modules/vardictjava/main.nf

Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>

* Update modules/vardictjava/main.nf

Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>

* removed the version line

Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>
This commit is contained in:
nvnieuwk 2022-08-10 14:13:03 +02:00 committed by GitHub
parent 53108b6b51
commit eab173f2bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 19 deletions

View file

@ -2,7 +2,6 @@ process VARDICTJAVA {
tag "$meta.id"
label 'process_medium'
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
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':
@ -10,7 +9,8 @@ process VARDICTJAVA {
input:
tuple val(meta), path(bam), path(bai), path(bed)
tuple path(fasta), path(fasta_fai)
path(fasta)
path(fasta_fai)
output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
@ -23,8 +23,8 @@ process VARDICTJAVA {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.8.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
export JAVA_OPTS='"-Xms${task.memory.toMega()/4}m" "-Xmx${task.memory.toGiga()}g" "-Dsamjdk.reference_fasta=$fasta"'
vardict-java \\
$args \\
-c 1 -S 2 -E 3 \\
@ -41,8 +41,8 @@ process VARDICTJAVA {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vardict-java: $VERSION
var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }'))
vardict-java: \$( realpath \$( command -v vardict-java ) | sed 's/.*java-//;s/-.*//' )
var2vcf_valid.pl: \$( var2vcf_valid.pl -h | sed '2!d;s/.* //' )
END_VERSIONS
"""
}

View file

@ -28,6 +28,10 @@ input:
type: file
description: Index of the BAM file
pattern: "*.bai"
- bed:
type: file
description: BED with the regions of interest
pattern: "*.bed"
- fasta:
type: file
description: FASTA of the reference genome
@ -36,10 +40,6 @@ input:
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:

View file

@ -4,7 +4,7 @@ nextflow.enable.dsl = 2
include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf'
workflow test_vardictjava {
workflow test_vardictjava_bam {
bam_input_ch = Channel.value([
[ id:'test' ], // meta map
@ -13,10 +13,8 @@ workflow test_vardictjava {
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)
])
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fasta_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
VARDICTJAVA ( bam_input_ch, reference )
VARDICTJAVA ( bam_input_ch, fasta, fasta_fai )
}

View file

@ -1,9 +1,7 @@
- name: vardictjava test_vardictjava
command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config
- name: vardictjava test_vardictjava_bam
command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava_bam -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config
tags:
- vardictjava
files:
- path: output/vardictjava/test.vcf.gz
md5sum: 3f1f227afc532bddeb58f16fd3013fc8
- path: output/vardictjava/versions.yml
md5sum: 9b62c431a4f2680412b61c7071bdb1cd