dib-lab / elvers

(formerly eelpond) an automated RNA-Seq workflow system
https://dib-lab.github.io/elvers/
Other
28 stars 3 forks source link

[MRG] Better dag handling #69

Closed bluegenes closed 5 years ago

bluegenes commented 5 years ago

Don't print to stdout if building a dag. This change means that we can redirect the output directly to a dot file, or use graphviz to get an image (rather than needing to delete the extra lines first).

./run_eelpond examples/nema.yaml default --dag > dagfile.dot

or

./run_eelpond examples/nema.yaml default --dag | dot -Tpng > dagfile.png

addresses #11 - provides all the functionality, though it doesn't enable an easy --dagfile FILENAME flag. Thoughts @charlesreid1?

charlesreid1 commented 5 years ago

I think having the --dag flag to dump straight to output is a good idea, so that you can pipe it to scripts or other command line utilities, but I also think it's good to have a flag to dump to a file or to a png.

I implemented a context manager that will capture stdout when the user is creating the directed acyclic graph, and either prints it to the screen (in the case of --dag, which will continue to work as you implemented it), or prints it to a file (if the user passes the --dagfile flag), or uses dot to convert the dotfile into a png file (if the user passes the --dagpng flag).

I opened a pull request (#73) against this pull request so you can take a look. I'll also add a few tests of the new functionality.

bluegenes commented 5 years ago

@ctb - @charlesreid1 added a testing framework! Works and looks good to me, but your review would be helpful

ctb commented 5 years ago

I think I already merged it?

bluegenes commented 5 years ago

it was merged into this branch/PR, not into master i think...?

ctb commented 5 years ago

oh. well, I reviewed it already :)

On Mon, Feb 04, 2019 at 11:51:03AM -0800, Tessa Pierce wrote:

it was merged into this branch/PR, not into master!

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dib-lab/eelpond/pull/69#issuecomment-460387667 -- C. Titus Brown, ctbrown@ucdavis.edu

charlesreid1 commented 5 years ago

it was merged into this branch/PR, not into master i think...?

yup, that's right - the inspiration for the tests was testing the new --dagfile and --dagpng flags so I added it into the DAG-related pull requests. Thanks for merging!