Git Product home page Git Product logo

Comments (5)

dansondergaard avatar dansondergaard commented on August 20, 2024

I'm considering adding a Group feature to gwf in version 2.0, so you can write something like:

with gwf.group("map_reads") as g:
    for sample_id in samples:
        g.target("sample_{}".format(i}, inputs=[], outputs=[], ...) <<< "..."

This would prefix all target names with "map_reads", but also save the group(s) (they could be nested) associated with each target. With that you can compact each all groups (or just large groups) as you describe.

from gwf-graph.

Hogfeldt avatar Hogfeldt commented on August 20, 2024

That would be really useful when naming targets and especially afterwards for doing this specific task.
Right now I have come up with a solution where I run BFS on the graph and identify parallel paths, but then I will have to use some heuristics, for making a sanity check, where I look at the targets names to see if the naming is similar, for example by seeing that all parallel targets starts with "map_reads". With the group feature the heuristics would be unnecessary, because it would be fair to expect that the user use groups if they want a compact graph.

from gwf-graph.

dansondergaard avatar dansondergaard commented on August 20, 2024

Sounds like a sensible solution for now! :-)

from gwf-graph.

jbethune avatar jbethune commented on August 20, 2024

I'm considering adding a Group feature to gwf in version 2.0, so you can write something like:

with gwf.group("map_reads") as g:
    for sample_id in samples:
        g.target("sample_{}".format(i}, inputs=[], outputs=[], ...) <<< "..."

You probably already have this in mind, but it would be really nice to summarize related jobs into one line for gwf status.

from gwf-graph.

dansondergaard avatar dansondergaard commented on August 20, 2024

@jbethune That is one of the main reasons for introducing a group feature, yes 🙂

from gwf-graph.

Related Issues (4)

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.