-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move igenomes config into pipeline code #3131
Comments
@ewels mentioned that users like to modify this genomes config. In that case, it should be refactored into an index file (e.g. JSON, YAML). Then you can load it in the config, although it still might be easier to have a param for the file name (e.g. def getGenomesIndex(filename) {
new groovy.json.JsonSlurper().parseText(file(filename).text)
} |
My summary is that we have two problems here:
So the most urgent thing is a short term fix for (1). Instead of this: // Load igenomes.config if required
if (!params.igenomes_ignore) {
includeConfig 'conf/igenomes.config'
} else {
params.genomes = [:]
} Suggestion is to use a ternary expression, which should work: // Load igenomes.config if required
includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' Where a new igenomes_ignored.config file would simply contain: params.genomes = [:] Can maybe think of more elegant syntax, but that's the gist of it. Regarding (2) in the longer term - it'd be nice to rewrite how all of the iGenomes configuration works. This will break how existing user's config files work, but I think it's ok if we're overhauling the entire references system anyway. So hopefully we can incorporate this syntax change along with the new references back end. |
See #3132 (comment) for another issue about |
Done by #3168 |
The
params.genomes
is a map that is conditionally included, which is a very clever hack that will not be supported by the new config parser 😅Instead, I suggest refactoring the
igenomes.config
into a function that returns a giant map:You can then include this function into your workflow and use it however you want:
The text was updated successfully, but these errors were encountered: