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

Fixed VEP s3 bucket path #127

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading