matthiasbock / boolesim Goto Github PK
View Code? Open in Web Editor NEWSystems biology tool: Boolean network simulator
Home Page: http://matthiasbock.github.io/BooleSim
Systems biology tool: Boolean network simulator
Home Page: http://matthiasbock.github.io/BooleSim
How to reproduce the problem:
Some more example files (demo networks etc.)
When nodes are added, renamed, moved or deleted from within the rule editor, the corresponding time series state boxes from previous simulations remain in place, even if they do not necessarily belong to the nodes labeled on the left. Even superfluous boxes remain without any label.
This way e.g. after editing the cell cycle demo network, such things can happen:
I herby forward a wish from a co-worker of ours: It would be nice to have a little introductory text instead of the empty white canvas on loading, as he didn't notice that the site has already finished loading - was expecting something to pop up in the big white space ;-)
Should we do that? What should we write?
We now have two distinct ways of getting to a network, create and import. As the simulator settings apply to both of them, I suggest we move/copy them from the import dialog to a separate one. Agree?
This settings dialog could also feature buttons for "set all nodes to true" and so on.
This issue comprises several sub issues mentioned by the reviewer:
I clicked Reset. At first the cursor jumped from left to right, now the Timeseries graph is gone. Labels on the left are still there. Details follow ...
For example
a = b
leads to automatic addition of
b = b
and a self-loop arrow in the network, which is incorrect. The state of b should be undefined. Such rules should not be added automatically.
feature required for the paper
Right now every time you switch the tab, the network is refreshed, displaying a dialog which needs to be acknowledged and changing all node positions.
The rxncon project allows to export Boolean networks. An importer for such networks into BooleSim would be nice.
I wonder if you may have considered to add the option to create Probabilistic Boolean Networks as well.
Should be possible to set initial state by hand, either through handing the complete state to the tool or by stopping the simulation completely, then changing the nodes' state through clicking on them and then relaunching the simulation from that new state.
It would be cool to render a more compact interface on small screens (smartphones). Does of course depend on the smartphone's browser's html5/js capabilities...
If "!" in front of parentheses in the imported file or in the rules tab, it is not translated as an inhibition in the network view
It should be possible to reset the timeseries cursor and counter to zero, also clearing all timeseries fields back to white.
When importing an example .ginml file (Boolean Cell Cycle model) (see: http://gin.univ-mrs.fr/GINsim/model_repository/CELL%20CYCLE/Cell_cycle/boolean_cell_cycle.ginml), the network is at first imported in the correct way. However, when clicking on the "Rules" tab, the generated rules are incorrect, including true and false that shouldn't be there. When afterwards clicking on the network view again, the model has changed to the incorrect version where "true" and "false" are interpreted as separate nodes. The same apparently holds for boolnet and jSBGN import as stated by the reviewer. This definitely needs to be corrected!!!
Hand in hand with this bug, goes the bug mentioned by the reviewer as "round trip" that upon importing certain formats, the rules are changed export in booleannet or boolnet format will be incorrect as well.
To disable the simulate on-click functionality, there was a checkbox in the import dialog.
It can be disabled by default, but a checkbox to enable it, if required, should be present.
The current design of the code is messy, make it more object oriented, taking cues from biographer-ui.
@matthiasbock, I would like to know the reasons for abandoning the simulator object. I agree it was quite big and needed to be broken down into parts, but this should be done gracefully and not the way it is now.
Alt+mouse wheel only zooms the network graph, if the mouse cursor is inside the network graph, which does not cover the whole network tab area especially when the network is zoomed small. This should be changed. Regardless of whether the cursor is inside the network or on another spot of the network tab canvas, Alt+mouse wheel should zoom the network graph.
At 100% zoom the menu width is too large for my notebook screen (1024px).
Not really an urgent problem, but if we have some spare time we could design this case more nicely, e.g. inserting a break to a second menu line between "Simulate/Pause" button and "Network" tab and align this second menu line on the left with the "Create" button.
Import from GINML doesn't work properly. Additional nodes with name "FALSE" are added in JavaScript. They do not show up in the network.
Why are they there ?
These nodes are getting exported to Python and R aswell, which breaks the model.
During GSoC, I had minimized the number of files that need to be fetched by the browser to speed up the site loading. I think all the js files need to be squashed into 1 or 2 files. Secondly to speed up the js code on the site, all the libraries must be in minified form. This ensures that the browser does not waste time in interpreting line endings and spaces and long variable/function names.
Maybe we could do what biographer ui does, do the development in a number of files and then combine them all to a single file.
We should all follow the same code quality standards. I suggest that all tabs be in the form of 2 spaces. This is adopted by many open source projects. Every block of code should be exactly 1 tab or 2 spaces right of it's parent block. Currently the tabs and spaces are all mixed and it will take time to switch to this standard.
Regardless of whether the network was changed or not, clicking the Rules or Time series tab in Firefox raises a "Network will now be re-imported" message, a switch back to the Network tab and re-import. The problem does not occur with Chromium.
There should be a warning, whenever the current network view is destroyed:
Exporting a network to jSBGN works; it includes node positions.
Example:
{ "sbgnlang": "PD", "nodes": [{ "id": "A", "visible": true, "data": { "cssClasses": ["rect"], "x": 800.7725423966185, "y": 80, "width": 60, "height": 60, "label": "A" }, "sbo": 245 }, { "id": "B", "visible": true, "data": { "cssClasses": ["rect"], "x": 200.7923725876608, "y": 130.48633059786516, "width": 60, "height": 60, "label": "B" }, "sbo": 245 }, { "id": "C", "visible": true, "data": { "cssClasses": ["rect"], "x": 787.4670172830229, "y": 267.87945549358847, "width": 60, "height": 60, "label": "C" }, "sbo": 245 }, { "id": "D", "visible": true, "data": { "cssClasses": ["rect"], "x": 192, "y": 306.6664647782454, "width": 60, "height": 60, "label": "D" }, "sbo": 245 }], "edges": [{ "id": "B -> A", "visible": true, "data": { "cssClasses": ["line"] }, "source": "B", "target": "A", "sbo": 20 }, { "id": "C -> B", "visible": true, "data": { "cssClasses": ["line"] }, "source": "C", "target": "B", "sbo": 11 }, { "id": "D -> C", "visible": true, "data": { "cssClasses": ["line"] }, "source": "D", "target": "C", "sbo": 11 }], "rules": { "A": "!B", "B": "C", "C": "D" } }
However it seems, on import the node coordinates embedded in jSBGN are not used to position the nodes accordingly on the canvas. The positioning appears random instead. They should be though, because the Export dialog says "Export graph and model", which somehow implies that the next time the user imports his or her network the nodes will be where they were placed.
Side note: jSBGN format is apparently currently not recognized by "infer format".
The tiny blue box which appears when you hover a node, sometimes doesn't disappear. This can lead to numerous hint boxes on screen, which is not so nice. As only one such box can exist at a time, it should have an id and be removed, whenever a new one is displayed.
It is currently impossible to go directly from the "rules" tab to the "time series" tab. Upon clicking "time series" tab from "rules" tab, it always changes to network view.
should though, somehow, the user expects that to happen
Possibility to copy-paste an URL to transmit (simple) networks
would be as another measure of safety and professionality of our software
After clicking the Create button, it is possible to add/remove nodes via Rule editor or Ctrl+right click. However, this is not instantly possible when the simulator is started.
Should we leave it that way or rather allow for immediate network editing, even before a network is loaded ?
Arrowheads invisible in .svg network export
I only just noticed that libSBGN.js is a "compressed" JavaScript file. This does not comply with the idea of open source. We definitely should have a readable version there.
We can think of preparing a packed version with everything in one file ("BooleSim-1.0.html5"), but the source code should be clean.
Example as done here:
https://www.filepicker.io/products/javascript_v1/#localfiles
Important source code to consider for .png files for instance:
Choose a PNG file to display below:
<input type="file" onchange="filepicker.read(this, {base64encode: true}, function(imgdata) {$('#readResultImg').attr('src', 'data:image/png;base64,'+imgdata);}, function(fperror){alert(fperror);});" accept="image/png">
The add node and delete node functions should not overwrite the browsers right click menu, but extend it.
https://hacks.mozilla.org/2011/11/html5-context-menus-in-firefox-screencast-and-code/
It sometime happens, that rules entered in the Rules tab, do not lead to an update of the network. Maybe this goes along with errors in the syntax. Maybe we should add some syntax checking or error messages (?)
Unfortunately I am not aware of a "nice" JavaScript formula editor.
I'm trying to find a reproducable procedure to get this problem ...
Importing a (Boolean) model and setting the node states "as initialized in the model" won't actually set them as in the model. Instead they are all True.
When exporting the network to booleannet format, the network is deeply changed.
The problem appears to be a missing space when translating "!" into "not" when there are no parentheses (this time the parentheses are translated correctly from BoolNet to booleannet) but for instance !pluri_exo_meth or !pluri_exo_het_chrom becomes notpluri_exo_meth or notpluri_exo_het_chrom thus creating 2 new species. In python Booleannet, you have to introduce a space after the not!
Deleting a node from the network view does not remove it's rule or it being referenced in other rules. This way upon rule saving it will be ex- or implicitly recreated. It's a systematic problem.
Is it sufficient to add a note in the delete node dialog, that the node remains in the rules ?
When the timeseries cursor jumps back from 40 to 0, manual simulation whitespace is missing. Instead the corresponding column's counter and previous colors stay as they are, what they shouldn't. I guess they are just not overwritten, which they should.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.