Skip to content

Commit

Permalink
Merge pull request #127 from nschcolnicov/fix_vep
Browse files Browse the repository at this point in the history
Fixed VEP s3 bucket path
  • Loading branch information
maxulysse authored Feb 15, 2024
2 parents 0429e57 + 3de9b74 commit d47e3ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#97](https://github.com/nf-core/rnavar/pull/97) - Update all gatk4 modules to disable JVM hotspot
- [#124](https://github.com/nf-core/rnavar/pull/124) - Fixed s3 bucket path in conditional statement for SnpEff cache
- [#127](https://github.com/nf-core/rnavar/pull/127) - Fixed s3 bucket path in conditional statement for VEP cache

### Dependencies

Expand Down
10 changes: 5 additions & 5 deletions workflows/rnavar.nf
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,24 @@ if (params.snpeff_cache && params.annotate_tools && (params.annotate_tools.split

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") {
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_dir = "${vep_annotation_cache_key}/${params.vep_species}"
def vep_cache_path_full = file("$params.vep_cache/$vep_cache_dir", type: 'dir')
if ( !vep_cache_path_full.exists() || !vep_cache_path_full.isDirectory() ) {
if (params.vep_cache == "s3://annotation-cache/vep_cache") {
if (params.vep_cache == "s3://annotation-cache/vep_cache/") {
error("This path is not available within annotation-cache. Please check https://annotation-cache.github.io/ to create a request for it.")
} else {
error("Files within --vep_cache invalid. Make sure there is a directory named ${vep_cache_dir} in ${params.vep_cache}.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation")
}
}
vep_cache = Channel.fromPath(file("${params.vep_cache}/${vep_annotation_cache_key}"), checkIfExists: true).collect()
} else if (params.annotate_tools && (params.annotate_tools.split(',').contains("vep") || params.annotate_tools.split(',').contains("merge")) && !params.download_cache) {
} else if (params.annotate_tools && (params.annotate_tools.split(',').contains("vep") || params.annotate_tools.split(',').contains("merge")) && !params.download_cache) {
error("No cache for VEP or automatic download of said cache has been detected.\nPlease refer to https://nf-co.re/sarek/docs/usage/#how-to-customise-snpeff-and-vep-annotation for more information.")
} else vep_cache = []
} else vep_cache = []

vep_extra_files = []

Expand Down

0 comments on commit d47e3ff

Please sign in to comment.