Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VEP cache is not working #126

Closed
nschcolnicov opened this issue Feb 15, 2024 · 4 comments
Closed

VEP cache is not working #126

nschcolnicov opened this issue Feb 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nschcolnicov
Copy link

nschcolnicov commented Feb 15, 2024

Description of the bug

I got the error: MSG: ERROR: Cache directory vep_cache/homo_sapiens not found` When running the module NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_MERGE:ENSEMBLVEP_VEP

I saw that, similarly to what happened with snpEff, the conditional statement that checks if the vep_cache is equal to "s3://annotation-cache/vep_cache/" is missing a "/" in https://github.com/nf-core/rnavar/blob/dev/workflows/rnavar.nf lines 154 and 162.

However, if I add the missing "/" and run the command: nextflow run main.nf -profile docker,test --annotate_tools merge --outdir . It still doesn't work because it fails to build the right path, and raises the error: This path is not available within annotation-cache. Please check https://annotation-cache.github.io/ to create a request for it.

The test profile is a modified version that removes the parameters vep_cache = null and snpeff_cache = null

Command used and terminal output

No response

Relevant files

No response

System information

No response

@nschcolnicov nschcolnicov added the bug Something isn't working label Feb 15, 2024
@maxulysse
Copy link
Member

which build are you trying?

@nschcolnicov
Copy link
Author

nschcolnicov commented Feb 15, 2024

dev, I already spotted the issue:
First is the conditional statements missing the "/"
Second is that the vep_cache_dir variable in line 159 is building the wrong path:

if (params.vep_cache && params.annotate_tools && (params.annotate_tools.split(',').contains("vep") || params.annotate_tools.split(',').contains("merge"))) {
    def vep_annotation_cache_key = ''
    if (params.vep_cache == "s3://annotation-cache/vep_cache") {
        vep_annotation_cache_key = "${params.vep_cache_version}_${params.vep_genome}/"
    } else {
        vep_annotation_cache_key = params.use_annotation_cache_keys ? "${params.vep_cache_version}_${params.vep_genome}/" : ""
    }
    def vep_cache_dir = "${vep_annotation_cache_key}${params.vep_cache_version}_${params.vep_genome}/${params.vep_species}"
    def vep_cache_path_full = file("$params.vep_cache/$vep_cache_dir", type: 'dir')

For the test profile we define this:

    snpeff_genome     = 'WBcel235'
    
    vep_cache_version = 110
    vep_genome        = 'WBcel235'
    vep_species       = 'caenorhabditis_elegans'

So the vep_annotation_cache_key contains "110_WBcel235"
The vep_cache_dir contains "110_WBcel235110_WBcel235/caenorhabditis_elegans"

While the actual path is s3://annotation-cache/vep_cache/110_WBcel235/caenorhabditis_elegans/

I'll create a PR for it

@maxulysse I didn't see this when fixing the issue for snpEff because I was already using the path to the VEP cache instead of using the automatic path builder

@nschcolnicov
Copy link
Author

@maxulysse I created a PR for this, let me know what you think!
#127

@nschcolnicov
Copy link
Author

Pr fixed the issue, closing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants