Skip to content

Commit 54f1033

Browse files
authored
Merge pull request #11 from TRON-Bioinformatics/snpeff-memory
parametrise SnpEff memory
2 parents 9aead35 + 1a5a3cf commit 54f1033

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Optional input:
8080
* --snpeff_organism: the SnpEff organism name (eg: hg19, hg38, GRCh37.75, GRCh38.99)
8181
* --snpeff_datadir: the SnpEff data folder where the reference genomes were previously downloaded. Required if --snpeff_organism is provided
8282
* --snpeff_args: additional SnpEff arguments
83+
* --snpeff_memory: for some samples SnpEff may require to use more memory (default: 3g)
8384
* --mapping_quality: VAFator minimum mapping quality (default: 0)
8485
* --base_call_quality: VAFator minimum base call quality (default: 0)
8586

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: 2 additions & 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'
@@ -84,6 +84,7 @@ Optional input:
8484
* --snpeff_organism: the SnpEff organism name (eg: hg19, hg38, GRCh37.75, GRCh38.99)
8585
* --snpeff_datadir: the SnpEff data folder where the reference genomes were previously downloaded. Required if --snpeff_organism is provided
8686
* --snpeff_args: additional SnpEff arguments
87+
* --snpeff_memory: for some samples SnpEff may require to use more memory (default: 3g)
8788
* --mapping_quality: VAFator minimum mapping quality (default: 0)
8889
* --base_call_quality: VAFator minimum base call quality (default: 0)
8990

0 commit comments

Comments
 (0)