Skip to content

Commit

Permalink
Merge pull request #1563 from YeHW/vep_species_suffix
Browse files Browse the repository at this point in the history
Fix: Correct vep_cache_path_full when refseq/merged option is present
  • Loading branch information
maxulysse authored Jun 12, 2024
2 parents 3f1d34d + c051a5e commit ff9a474
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1542](https://github.com/nf-core/sarek/pull/1542) - Removing legacy configs of `CUSTOM_DUMPSOFTWAREVERSIONS`
- [#1547](https://github.com/nf-core/sarek/pull/1547) - Correct typo in help text in nextflow_schema.json
- [#1556](https://github.com/nf-core/sarek/pull/1556) - Fix display of some commands in `docs/usage.md`
- [#1563](https://github.com/nf-core/sarek/pull/1563) - Fix `vep_cache_path_full` so that `--refseq/--merged` will work for ENSEMBLVEP

### Removed

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ We thank the following people for their extensive assistance in the development
- [Grant Neilson](https://github.com/grantn5)
- [gulfshores](https://github.com/gulfshores)
- [Harshil Patel](https://github.com/drpatelh)
- [Hongwei Ye](https://github.com/YeHW)
- [James A. Fellows Yates](https://github.com/jfy133)
- [Jesper Eisfeldt](https://github.com/J35P312)
- [Johannes Alneberg](https://github.com/alneberg)
Expand Down
1 change: 1 addition & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ workflow NFCORE_SAREK {
params.vep_species,
params.vep_cache_version,
params.vep_genome,
params.vep_custom_args,
"Please refer to https://nf-co.re/sarek/docs/usage/#how-to-customise-snpeff-and-vep-annotation for more information.")

snpeff_cache = ANNOTATION_CACHE_INITIALISATION.out.snpeff_cache
Expand Down
4 changes: 3 additions & 1 deletion subworkflows/local/annotation_cache_initialisation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ workflow ANNOTATION_CACHE_INITIALISATION {
vep_species
vep_cache_version
vep_genome
vep_custom_args
help_message

main:
Expand All @@ -39,7 +40,8 @@ workflow ANNOTATION_CACHE_INITIALISATION {

if (vep_enabled) {
def vep_annotation_cache_key = (vep_cache == "s3://annotation-cache/vep_cache/") ? "${vep_cache_version}_${vep_genome}/" : ""
def vep_cache_dir = "${vep_annotation_cache_key}${vep_species}/${vep_cache_version}_${vep_genome}"
def vep_species_suffix = vep_custom_args.contains("--merged") ? '_merged' : (vep_custom_args.contains("--refseq") ? '_refseq' : '')
def vep_cache_dir = "${vep_annotation_cache_key}${vep_species}${vep_species_suffix}/${vep_cache_version}_${vep_genome}"
def vep_cache_path_full = file("$vep_cache/$vep_cache_dir", type: 'dir')
if ( !vep_cache_path_full.exists() || !vep_cache_path_full.isDirectory() ) {
if (vep_cache == "s3://annotation-cache/vep_cache/") {
Expand Down

0 comments on commit ff9a474

Please sign in to comment.