-
Notifications
You must be signed in to change notification settings - Fork 0
Make the app available as a desktop application #12
Comments
See cytoscape/cytoscape.js#1018 -- this might actually be pretty well-supported, from the looks of it |
OK, here's the (a?) plan:
This should work well! By running everything headlessly we avoid browser overhead, and by using node-sqlite3 we avoid the limitations of sql.js. Alternatively we could export from the python script directly to desktop Cytoscape (by preparing JSON output [we could even add our own data fields that we could parse via a Cytoscape plugin], or by using the existing dot-app for Cytoscape to load .gv or .dot files). |
WHOOOOO GET HYPE I CAN STOP WORRYING ABOUT THIS ...Anyway, yeah, this wasn't that bad. Just needed to reuse the _ele2parent statements in the right places. I guess next important things are: -Add biodata stuff (#34) -Add jQuery UI progress bar -Fix inefficient(-ish) code (likely includes moving xdot parsing in xdot2cy.js to another repository or something -- a bit annoying trying to manage both .xdot and .db parsing...) -Node/edge scaling (#23) -node.js json export stuff (#12)
I was previously running into an error in which UPDATE: Nope I'm dumb see commit message below |
Turns out the bug was on my end: collections of nodes are evidently unserializable in JSON, which prevented the call to JSON.stringify(cy.json()) from working. This data is now stored in scratch, and I'm looking into using less scratch/data stuff in general (a lot of this we can deduce from the elements themselves, without extra space requirements of storing lots of stuff).
Ok, so here's an idea. Things like Electron (https://electron.atom.io) can facilitate the creation of desktop apps from HTML/JS/etc code, right? And there's a tutorial available demonstrating that Cytoscape.js works ok with Electron. So it should be feasible to use electron to create a desktop version of the viewer interface, but using node.js et al for certain things (e.g. node-sqlite3 in lieu of sql.js). I'm a bit fuzzy on the details here, but I'll do some more research on this soon. This could result in a fairly performant application, if done right. |
Alternatively, we could have collate.py just generate a .json file that could be loaded in desktop cytoscape. Look into that also. |
This issue was moved to marbl/MetagenomeScope#5 |
Using cy.json(), node.js, and node-sqlite3 would allow assembly graphs to be viewed in Cytoscape.js or (with less support for certain Cytoscape.js-specific features -- see this) the desktop version of Cytoscape.
The upside of this is that we get the best of both worlds: the ability to view the graph in a browser (and, theoretically, host it on a website) and the ability to view the graph in desktop Cytoscape (which would make viewing huge graphs faster).
Note that I have pretty much no experience with desktop Cytoscape, and we'll probably have to tweak things to get this to work. (I think compound nodes, in particular, are only somewhat supported in desktop Cytoscape -- so I'll have to look into that.)
The text was updated successfully, but these errors were encountered: