Skip to content

Commit

Permalink
Merge pull request #11 from TRON-Bioinformatics/snpeff-memory
Browse files Browse the repository at this point in the history
parametrise SnpEff memory
  • Loading branch information
priesgo authored Aug 16, 2022
2 parents 9aead35 + 1a5a3cf commit 54f1033
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Optional input:
* --snpeff_organism: the SnpEff organism name (eg: hg19, hg38, GRCh37.75, GRCh38.99)
* --snpeff_datadir: the SnpEff data folder where the reference genomes were previously downloaded. Required if --snpeff_organism is provided
* --snpeff_args: additional SnpEff arguments
* --snpeff_memory: for some samples SnpEff may require to use more memory (default: 3g)
* --mapping_quality: VAFator minimum mapping quality (default: 0)
* --base_call_quality: VAFator minimum base call quality (default: 0)
Expand Down
9 changes: 7 additions & 2 deletions modules/05_variant_annotation.nf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
params.snpeff_memory = "3g"
params.memory = "3g"
params.cpus = 1
params.output = "."
Expand All @@ -8,8 +9,9 @@ params.snpeff_args = ""

process VARIANT_ANNOTATION_SNPEFF {
cpus params.cpus
memory params.memory
memory params.snpeff_memory
publishDir "${params.output}/${name}", mode: "copy"
tag "${name}"

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

Expand All @@ -22,14 +24,17 @@ process VARIANT_ANNOTATION_SNPEFF {
script:
datadir_arg = params.snpeff_datadir ? "-dataDir ${params.snpeff_datadir}" : ""
"""
snpEff eff ${datadir_arg} ${params.snpeff_args} -nodownload ${params.snpeff_organism} ${vcf} > ${name}.annotated.vcf
snpEff -Xmx${params.snpeff_memory} eff \
${datadir_arg} ${params.snpeff_args} \
-nodownload ${params.snpeff_organism} ${vcf} > ${name}.annotated.vcf
"""
}

process VARIANT_ANNOTATION_BCFTOOLS {
cpus params.cpus
memory params.memory
publishDir "${params.output}/${name}", mode: "copy"
tag "${name}"

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

Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env {
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']

VERSION = '2.4.0'
VERSION = '2.4.1'

manifest {
name = 'TRON-Bioinformatics/tronflow-vcf-postprocessing'
Expand Down Expand Up @@ -84,6 +84,7 @@ Optional input:
* --snpeff_organism: the SnpEff organism name (eg: hg19, hg38, GRCh37.75, GRCh38.99)
* --snpeff_datadir: the SnpEff data folder where the reference genomes were previously downloaded. Required if --snpeff_organism is provided
* --snpeff_args: additional SnpEff arguments
* --snpeff_memory: for some samples SnpEff may require to use more memory (default: 3g)
* --mapping_quality: VAFator minimum mapping quality (default: 0)
* --base_call_quality: VAFator minimum base call quality (default: 0)
Expand Down

0 comments on commit 54f1033

Please sign in to comment.