Skip to content

Commit

Permalink
Merge pull request #6 from TRON-Bioinformatics/fix-vafator-params
Browse files Browse the repository at this point in the history
ensure VAFator parameters are passed when 0 is provided + change the …
  • Loading branch information
priesgo authored Feb 2, 2022
2 parents 811024d + a6aa58b commit faae556
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ 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
* --mapping_quality: VAFator minimum mapping quality (default: 0)
* --base_call_quality: VAFator minimum base call quality (default: 0)
Output:
* Normalized VCF file
Expand Down Expand Up @@ -206,7 +208,7 @@ chr1 13325 . CT C . MNV-INDEL OLD_CLUMPED=chr1:13321:AGCCCT/CGCC GT:AD:PS 0:229,
Same as MNVs this behaviour can de disabled with `--skip_decompose_complex`.


## Technical annotations
## Technical annotations (VAFator)

The technical annotations provide an insight on the variant calling process by looking into the context of each variant
within the pileup of a BAM file. When doing somatic variant calling it may be relevant to have technical annotations
Expand Down
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ params.filter = false
params.cpus = 1
params.memory = "4g"
params.vcf_without_ad = false
params.mapping_quality = false
params.base_call_quality = false
params.mapping_quality = 0
params.base_call_quality = 0
params.skip_multiallelic_filter = false
params.snpeff_organism = false
params.snpeff_args = ""
Expand Down
11 changes: 6 additions & 5 deletions modules/04_vafator.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
params.cpus = 1
params.memory = "4g"
params.output = ""
params.mapping_quality = false
params.base_call_quality = false
params.mapping_quality = 0
params.base_call_quality = 0
params.skip_multiallelic_filter = false
params.enable_conda = false

Expand All @@ -23,12 +23,13 @@ process VAFATOR {

script:
bams_param = bams.collect { b -> "--bam " + b.split(":").join(" ") }.join(" ")
mq_param = params.mapping_quality ? "--mapping-quality " + params.mapping_quality : ""
bq_param = params.base_call_quality ? "--base-call-quality " + params.base_call_quality : ""
"""
vafator \
--input-vcf ${vcf} \
--output-vcf ${vcf.baseName}.vaf.vcf ${bams_param} ${mq_param} ${bq_param}
--output-vcf ${vcf.baseName}.vaf.vcf \
${bams_param} \
--mapping-quality ${params.mapping_quality} \
--base-call-quality ${params.base_call_quality}
"""
}

Expand Down
4 changes: 3 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.1.2'
VERSION = '2.1.3'

cleanup=true

Expand Down Expand Up @@ -68,6 +68,8 @@ 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
* --mapping_quality: VAFator minimum mapping quality (default: 0)
* --base_call_quality: VAFator minimum base call quality (default: 0)
Output:
* Normalized VCF file
Expand Down

0 comments on commit faae556

Please sign in to comment.