Git Product home page Git Product logo

Comments (2)

bentsherman avatar bentsherman commented on September 2, 2024

@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. params.igenomes_index) and load it in the pipeline code:

def getGenomesIndex(filename) {
  new groovy.json.JsonSlurper().parseText(file(filename).text)
}

from tools.

ewels avatar ewels commented on September 2, 2024

My summary is that we have two problems here:

  1. The includeConfig is within an if statement in the config. This won't work with the new config parser, and needs resolving ASAP.
  2. The config itself uses nested parameters, support for which may be dropped in the slightly longer term.

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.

from tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.