-
Notifications
You must be signed in to change notification settings - Fork 526
FEAT: Improve documentation for annotation cache #1248
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aaaf953
better docs
maxulysse 0de1049
more safeguards
maxulysse 90d5bc8
update WEBSITE
maxulysse 55085a5
update CHANGELOG
maxulysse 87b83c8
better docs
maxulysse 8cbbf97
better error handling when no cache provided
maxulysse 0f36b8a
forgot a case in the if else logic
maxulysse a7acd5c
unhide some params
maxulysse 544e16c
Update docs/usage.md
maxulysse bd1748b
Apply suggestions from code review
maxulysse 5898739
Apply suggestions from code review
maxulysse 9e3e91d
point towards correct docs
maxulysse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -324,25 +324,45 @@ vep_species = params.vep_species ?: Channel.empty() | |
|
|
||
| // Initialize files channels based on params, not defined within the params.genomes[params.genome] scope | ||
| if (params.snpeff_cache && params.tools && params.tools.contains("snpeff")) { | ||
| def snpeff_annotation_cache_key = params.use_annotation_cache_keys ? "${params.snpeff_genome}.${params.snpeff_db}/" : "" | ||
| if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache") { | ||
| def snpeff_annotation_cache_key = "${params.snpeff_genome}.${params.snpeff_db}/" | ||
| } else { | ||
| def snpeff_annotation_cache_key = params.use_annotation_cache_keys ? "${params.snpeff_genome}.${params.snpeff_db}/" : "" | ||
| } | ||
| def snpeff_cache_dir = "${snpeff_annotation_cache_key}${params.snpeff_genome}.${params.snpeff_db}" | ||
| def snpeff_cache_path_full = file("$params.snpeff_cache/$snpeff_cache_dir", type: 'dir') | ||
| if ( !snpeff_cache_path_full.exists() || !snpeff_cache_path_full.isDirectory() ) { | ||
| 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/dev/usage#how-to-customise-snpeff-and-vep-annotation") | ||
| if (params.snpeff_cache == "s3://annotation-cache/snpeff_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 --snpeff_cache invalid. Make sure there is a directory named ${snpeff_cache_dir} in ${params.snpeff_cache}.\nhttps://nf-co.re/sarek/dev/usage#how-to-customise-snpeff-and-vep-annotation") | ||
|
||
| } | ||
| } | ||
| snpeff_cache = Channel.fromPath(file("${params.snpeff_cache}/${snpeff_annotation_cache_key}"), checkIfExists: true).collect() | ||
| .map{ cache -> [ [ id:"${params.snpeff_genome}.${params.snpeff_db}" ], cache ] } | ||
| } else snpeff_cache = [] | ||
| } else if (params.tools && params.tools.contains("snpeff") && !params.download_cache) { | ||
| 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.") | ||
| } else snpeff_cache = [] | ||
|
|
||
| if (params.vep_cache && params.tools && params.tools.contains("vep")) { | ||
| def vep_annotation_cache_key = params.use_annotation_cache_keys ? "${params.vep_cache_version}_${params.vep_genome}/" : "" | ||
| if (params.vep_cache == "s3://annotation-cache/vep_cache") { | ||
| def vep_annotation_cache_key = "${params.vep_cache_version}_${params.vep_genome}/" | ||
| } else { | ||
| def 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_species}/${params.vep_cache_version}_${params.vep_genome}" | ||
| 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() ) { | ||
| 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/dev/usage#how-to-customise-snpeff-and-vep-annotation") | ||
| 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/dev/usage#how-to-customise-snpeff-and-vep-annotation") | ||
| } | ||
| } | ||
| vep_cache = Channel.fromPath(file("${params.vep_cache}/${vep_annotation_cache_key}"), checkIfExists: true).collect() | ||
| } else vep_cache = [] | ||
| } else if (params.tools && params.tools.contains("vep") && !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 = [] | ||
|
|
||
| vep_extra_files = [] | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.