nf-core / rnavar

gatk4 RNA variant calling pipeline
https://nf-co.re/rnavar
MIT License
31 stars 31 forks source link

ANNOTATE processes scheduled but not executed despite params.annotate_tool not null and skip_variantannotation = false #85

Open PBMCHUGA opened 1 year ago

PBMCHUGA commented 1 year ago

Description of the bug

Hi,

The pipeline is executing succesfully until the end but skip annotation processes despite params.annotate_tool is not null. I tried to set it up with 'vep' and 'merge' values.

------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/rnavar v1.0.0
------------------------------------------------------
Core Nextflow options
  runName         : hopeful_mclean
...
Input/output options
  input           : /data/home/cbenoit3/datasets/DragenTest/samplesheetTest.csv
 ...

Reference genome options
...

Variant Annotation
  annotate_tools  : vep
...

[6b/9cc46d] process > NFCORE_RNAVAR:RNAVAR:GATK4_... [100%] 2 of 2 ✔
[a2/98ca04] process > NFCORE_RNAVAR:RNAVAR:TABIX ... [100%] 2 of 2 ✔
[67/43781f] process > NFCORE_RNAVAR:RNAVAR:GATK4_... [100%] 2 of 2 ✔
[-        ] process > NFCORE_RNAVAR:RNAVAR:ANNOTA... -
[-        ] process > NFCORE_RNAVAR:RNAVAR:ANNOTA... -
[8c/0d8a3c] process > NFCORE_RNAVAR:RNAVAR:CUSTOM... [100%] 1 of 1 ✔
[8d/c6f5d2] process > NFCORE_RNAVAR:RNAVAR:MULTIQC   [100%] 1 of 1 ✔
-[nf-core/rnavar] Sent summary e-mail to cbenoit3@chu-grenoble.fr (sendmail)-
-[nf-core/rnavar] Pipeline completed successfully-
Completed at: 08-Feb-2023 14:54:00
Duration    : 10m 2s
CPU hours   : 2.7
Succeeded   : 150

.nextflow.log.txt

All vep and snpfEff options are defined in my igenomes.config.txt (GRCh37)

Also I commented these two lines in WorkflowRnaVar.groovy :

       if((!params.skip_variantannotation) && (params.annotate_tools) && (params.annotate_tools.contains('merge') || params.annotate_tools.contains('vep')) && (!params.genome || !params.vep_genome || !params.vep_species || !params.vep_cache_version)) {
            print(params.skip_variantannotation)
            print(params.annotate_tools)
            log.error "Species name (using --vep_species), genome assembly (either --genome or --vep_genome) and cache version (--vep_cache_version) are required to run VEP variant annotation."
            System.exit(1)
        }
        if((!params.skip_variantannotation) && (params.annotate_tools) && (params.annotate_tools.contains('merge') || params.annotate_tools.contains('snpeff')) && (!params.genome || !params.snpeff_db)) {
            log.error "Either --genome or --snpeff_db is required to run snpEff variant annotation."
            System.exit(1)
        }

Because I did not managed to pass the log.error even all parameters seemed to be set up (skip_variantannotation = false). But I guess it's not a good practice X)

Command used and terminal output

No response

Relevant files

No response

System information

No response

PBMCHUGA commented 1 year ago

Hello,

I nearly figured out what causes this strange behavior. Despite we find these lines in main.nf :

params.vep_genome           = WorkflowMain.getGenomeAttribute(params, 'vep_genome')
params.vep_cache_version    = WorkflowMain.getGenomeAttribute(params, 'vep_cache_version')

They return null values. So we can't define these values as genome attributes in igenomes.config.

If we directly define params.vep_cache_version and params.vep_genome in nextflow.config. Annotation steps are not skipped and WorkflowRnaVar.groovy does not complain.

But I am not sure if it is the expected behaviour ?

maxulysse commented 1 year ago

Good spot, that looks like it's indeed the issue, I'll be sure to fix that in the coming release