auspice icon indicating copy to clipboard operation
auspice copied to clipboard

Headless auspice?

Open AngieHinrichs opened this issue 4 years ago • 3 comments

It seems that the whole point of auspice is its beautiful interactive display, so this seems like kind of a silly question but I'll ask anyway, just in case.

Is there a way (or could you recommend a simple cut point in the code) to invoke the parts of auspice that read in JSON and generate SVG for the tree, but outside of the web browser environment? (E.g. just in node?) I would like to programmatically produce a static document with a static tree image that looks just like auspice. [Who knows, maybe you already have something static for testing? :]

Thanks, Angie

AngieHinrichs avatar Apr 13 '21 18:04 AngieHinrichs

We've used decktape for this a bit: https://docs.nextstrain.org/en/latest/guides/communicate/create-pdf.html, but haven't tested it greatly. Feedback would be welcome. It would be great to have Auspice spit out SVG trees include in a PDF report without having to manually screenshot the site.

trvrb avatar Apr 13 '21 19:04 trvrb

Ah, interesting, thanks for the pointer. I'm hoping for something leaner than a full headless Chrome browser, so I'll have a look at the code.

AngieHinrichs avatar Apr 15 '21 17:04 AngieHinrichs

I'm hoping for something leaner than a full headless Chrome browser

There's nothing that I know of. We use(d) puppeteer for snapshot testing, but that's essentially a headless Chrome browser itself.

If you want to do custom plotting of trees in python, something like baltic would be a good choice.

jameshadfield avatar Apr 15 '21 19:04 jameshadfield