Skip to content

Commit 285eafa

Browse files
committed
parametrise SnpEff memory errors
1 parent 9aead35 commit 285eafa

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

modules/05_variant_annotation.nf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
params.snpeff_memory = "3g"
12
params.memory = "3g"
23
params.cpus = 1
34
params.output = "."
@@ -8,8 +9,9 @@ params.snpeff_args = ""
89

910
process VARIANT_ANNOTATION_SNPEFF {
1011
cpus params.cpus
11-
memory params.memory
12+
memory params.snpeff_memory
1213
publishDir "${params.output}/${name}", mode: "copy"
14+
tag "${name}"
1315

1416
conda (params.enable_conda ? "bioconda::snpeff=5.0" : null)
1517

@@ -22,14 +24,17 @@ process VARIANT_ANNOTATION_SNPEFF {
2224
script:
2325
datadir_arg = params.snpeff_datadir ? "-dataDir ${params.snpeff_datadir}" : ""
2426
"""
25-
snpEff eff ${datadir_arg} ${params.snpeff_args} -nodownload ${params.snpeff_organism} ${vcf} > ${name}.annotated.vcf
27+
snpEff -Xmx${params.snpeff_memory} eff \
28+
${datadir_arg} ${params.snpeff_args} \
29+
-nodownload ${params.snpeff_organism} ${vcf} > ${name}.annotated.vcf
2630
"""
2731
}
2832

2933
process VARIANT_ANNOTATION_BCFTOOLS {
3034
cpus params.cpus
3135
memory params.memory
3236
publishDir "${params.output}/${name}", mode: "copy"
37+
tag "${name}"
3338

3439
conda (params.enable_conda ? "conda-forge::libgcc-ng=10.3.0 conda-forge::gsl=2.7 bioconda::bcftools=1.15.1" : null)
3540

nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env {
2727
// Capture exit codes from upstream processes when piping
2828
process.shell = ['/bin/bash', '-euo', 'pipefail']
2929

30-
VERSION = '2.4.0'
30+
VERSION = '2.4.1'
3131

3232
manifest {
3333
name = 'TRON-Bioinformatics/tronflow-vcf-postprocessing'

0 commit comments

Comments
 (0)