Bandage icon indicating copy to clipboard operation
Bandage copied to clipboard

image: Specify random seed value [feature request]

Open sjackman opened this issue 6 years ago • 2 comments

I'd like to specify the random seed value for Bandage image, so that I can reproducibly get the same image for a given graph. For example, if I create both a PNG file and a SVG file, I'd like them to be the same. A workaround for this example is to generate the SVG file and convert it to PNG.

sjackman avatar Aug 23 '17 19:08 sjackman

When Bandage does the layout, it re-seeds the random number generator for each component to avoid this effect where lots of graph segments end up with the same shape: screen shot 2017-09-01 at 4 04 28 pm

Since Bandage doesn't seed the RNG once, that means that I can't trivially add a --seed option to do this. It would of course be possible to make it work, just a bit more involved. I'll keep this one around as an enhancement!

rrwick avatar Sep 01 '17 06:09 rrwick

The specified --seed value could be used for the first component, and it could be incremented for each successive component (or any other deterministic sequence).

sjackman avatar Sep 02 '17 00:09 sjackman