Skip to content

Commit dc05d53

Browse files
authored
Merge pull request #124 from nschcolnicov/dev
Fixed S3 bucket path in conditional statements
2 parents ebb949b + a42bb7e commit dc05d53

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
### Fixed
2121

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

2425
### Dependencies
2526

workflows/rnavar.nf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,25 +129,25 @@ vep_species = params.vep_species ?: Channel.empty()
129129
// Initialize files channels based on params, not defined within the params.genomes[params.genome] scope
130130
if (params.snpeff_cache && params.annotate_tools && (params.annotate_tools.split(',').contains("snpeff") || params.annotate_tools.split(',').contains("merge"))) {
131131
def snpeff_annotation_cache_key = ''
132-
if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache") {
132+
if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache/") {
133133
snpeff_annotation_cache_key = "${params.snpeff_genome}.${params.snpeff_db}/"
134134
} else {
135135
snpeff_annotation_cache_key = params.use_annotation_cache_keys ? "${params.snpeff_genome}.${params.snpeff_db}/" : ""
136136
}
137137
def snpeff_cache_dir = "${snpeff_annotation_cache_key}${params.snpeff_genome}.${params.snpeff_db}"
138138
def snpeff_cache_path_full = file("$params.snpeff_cache/$snpeff_cache_dir", type: 'dir')
139139
if ( !snpeff_cache_path_full.exists() || !snpeff_cache_path_full.isDirectory() ) {
140-
if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache") {
140+
if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache/") {
141141
error("This path is not available within annotation-cache. Please check https://annotation-cache.github.io/ to create a request for it.")
142142
} else {
143143
error("Files within --snpeff_cache invalid. Make sure there is a directory named ${snpeff_cache_dir} in ${params.snpeff_cache}.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation")
144144
}
145145
}
146146
snpeff_cache = Channel.fromPath(file("${params.snpeff_cache}/${snpeff_annotation_cache_key}"), checkIfExists: true).collect()
147147
.map{ cache -> [ [ id:"${params.snpeff_genome}.${params.snpeff_db}" ], cache ] }
148-
} else if (params.annotate_tools && (params.annotate_tools.split(',').contains("snpeff") || params.annotate_tools.split(',').contains("merge")) && !params.download_cache) {
148+
} else if (params.annotate_tools && (params.annotate_tools.split(',').contains("snpeff") || params.annotate_tools.split(',').contains("merge")) && !params.download_cache) {
149149
error("No cache for SnpEff 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.")
150-
} else snpeff_cache = []
150+
} else snpeff_cache = []
151151

152152
if (params.vep_cache && params.annotate_tools && (params.annotate_tools.split(',').contains("vep") || params.annotate_tools.split(',').contains("merge"))) {
153153
def vep_annotation_cache_key = ''

0 commit comments

Comments
 (0)