Git Product home page Git Product logo

Comments (5)

drpatelh avatar drpatelh commented on July 28, 2024 1

Yeah, this is going to be tricky. Pipelines will want to use the module command in different ways so we will have to try and anticipate different numbers/types of inputs and outputs. Should this be done on a case-by-case basis? e.g. add the option for a another input/output whilst maintaining backward compatability?

With DSL1 the way I have provided conditional inputs is:
https://github.com/nf-core/chipseq/blob/21be3149542cdc84431e12d1e092359058aed32a/main.nf#L424

and conditional outputs as:
https://github.com/nf-core/chipseq/blob/21be3149542cdc84431e12d1e092359058aed32a/main.nf#L1087

Note all of the files dont have to be created as an output here and so NF wont fail if they arent. Maybe the solution is to have all outputs from a module in a single channel and then filter as required but this could get messy...

from modules.

ewels avatar ewels commented on July 28, 2024

I think DSLv2 can have named outputs, right? So I'm hoping that if pipelines specify the output channels that they are using, they can ignore the ones that they don't need. Then we can just allow those channels to be empty and I think everything should be fine... 🤞

The conditional input ifEmpty() thing shouldn't be necessary... I think... because with modules you don't specify the input channel name. Not sure though.

I think the one channel for everything isn't necessary if we use optional outputs and named outputs in the workflows.

Make sense? Bit scatterbrained today sorry - say if the above is jumbled jibberish 😆

from modules.

drpatelh avatar drpatelh commented on July 28, 2024

No. That makes sense. Like most things "modules" this will need a play around to work out how best to proceed. I need to fix up and look sharp with DSL2 too. Maybe we can try with a simple TrimGalore implementation?

from modules.

apeltzer avatar apeltzer commented on July 28, 2024

Yes I agree - we should really get some "basic" tests for this and play around a bit to get a feeling for how this behaves. During the discussion we all kind of agreed its got lots of potential for problems arising, which is why Phil created the issue here 👍

from modules.

drpatelh avatar drpatelh commented on July 28, 2024

We have a requirement to emit every output file which solves this issue. Where required, we are using the optional declaration for optional outputs.

We still don't have a proper solution for optional inputs but this will have to be announced officially on the Nextflow end

from modules.

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.