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" tag "$meta.id"
label 'process_medium' 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) conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0':
@ -10,7 +9,8 @@ process VARDICTJAVA {
input: input:
tuple val(meta), path(bam), path(bai), path(bed) tuple val(meta), path(bam), path(bai), path(bed)
tuple path(fasta), path(fasta_fai) path(fasta)
path(fasta_fai)
output: output:
tuple val(meta), path("*.vcf.gz"), emit: vcf tuple val(meta), path("*.vcf.gz"), emit: vcf
@ -23,8 +23,8 @@ process VARDICTJAVA {
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: '' def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" 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 \\ vardict-java \\
$args \\ $args \\
-c 1 -S 2 -E 3 \\ -c 1 -S 2 -E 3 \\
@ -41,8 +41,8 @@ process VARDICTJAVA {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
vardict-java: $VERSION vardict-java: \$( realpath \$( command -v vardict-java ) | sed 's/.*java-//;s/-.*//' )
var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) var2vcf_valid.pl: \$( var2vcf_valid.pl -h | sed '2!d;s/.* //' )
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -28,6 +28,10 @@ input:
type: file type: file
description: Index of the BAM file description: Index of the BAM file
pattern: "*.bai" pattern: "*.bai"
- bed:
type: file
description: BED with the regions of interest
pattern: "*.bed"
- fasta: - fasta:
type: file type: file
description: FASTA of the reference genome description: FASTA of the reference genome
@ -36,10 +40,6 @@ input:
type: file type: file
description: The index of the FASTA of the reference genome description: The index of the FASTA of the reference genome
pattern: "*.fai" pattern: "*.fai"
- bed:
type: file
description: BED with the regions of interest
pattern: "*.bed"
output: output:
- meta: - meta:

View file

@ -4,7 +4,7 @@ nextflow.enable.dsl = 2
include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf'
workflow test_vardictjava { workflow test_vardictjava_bam {
bam_input_ch = Channel.value([ bam_input_ch = Channel.value([
[ id:'test' ], // meta map [ id:'test' ], // meta map
@ -13,10 +13,8 @@ workflow test_vardictjava {
file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
]) ])
reference = Channel.value([ fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
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)
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 - name: vardictjava test_vardictjava_bam
command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava_bam -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config
tags: tags:
- vardictjava - vardictjava
files: files:
- path: output/vardictjava/test.vcf.gz - path: output/vardictjava/test.vcf.gz
md5sum: 3f1f227afc532bddeb58f16fd3013fc8 md5sum: 3f1f227afc532bddeb58f16fd3013fc8
- path: output/vardictjava/versions.yml
md5sum: 9b62c431a4f2680412b61c7071bdb1cd