zakandrewking / escher Goto Github PK
View Code? Open in Web Editor NEWBuild, share, and embed visualizations of metabolic pathways.
Home Page: https://escher.github.io
License: Other
Build, share, and embed visualizations of metabolic pathways.
Home Page: https://escher.github.io
License: Other
To avoid setTimeout hack in the knockout.html example
➜ escher git:(master) ✗ python setup.py build
Tracing dependencies for: ../build/almond
Error: ENOENT, no such file or directory '/home/aebrahim/escher/escher/js/src/Input.js'
In module tree:
main
Builder
Error: Error: ENOENT, no such file or directory '/home/aebrahim/escher/escher/js/src/Input.js'
In module tree:
main
Builder
at Object.fs.openSync (fs.js:427:18)
Tracing dependencies for: ../build/almond
Error: ENOENT, no such file or directory '/home/aebrahim/escher/escher/js/src/Input.js'
In module tree:
main
Builder
Error: Error: ENOENT, no such file or directory '/home/aebrahim/escher/escher/js/src/Input.js'
In module tree:
main
Builder
at Object.fs.openSync (fs.js:427:18)
There should be a way to return a value from get_flux() in knockout.js. Then, we can remove one extra layer of callback.
Currently this works
python server/tornado_main.py
This doesn't
cd server
python tornado_main.py
Pointed out by @jlerman44.
This happens in the current dev branch.
@steve-federowicz pointed out that the general public does not have access to json serialization of data (basically, if Excel doesn't have it, don't count on it).
So we should support CSV files for uploading reaction and metabolite data.
Ideally the python module would use other locations instead of its own "static" directory to avoid duplication and needing to update code in 2 places.
Should it also place things in the appropriate directories i.e. its templates in the template directory?
@zakandrewking If you think this is a good idea I can make a PR to tweak the install script and that all that jazz.
Hi, the example from http://cobrapy.readthedocs.org/en/latest/visbio.html doesn't work. I get the following error:
ValueError: No map named e-coli-core found in cache or at http://zakandrewking.github.io/visbio/
Space characters inserted in text mode of the builder are not remembered if I save a json map and reload it again.
I tried it online with the last version (1).
One instance: Add reaction with one product, cycle metabolite (c) twice, undo (C-z).
would be great if you could use the map builder w/o having to specify a simpheny map to start with. maybe just a cobrapy structure if all that is needed?
As I am working with a wide range of bacterial organisms (and not ecoli) I was wondering how to couple known informations such as enzymatic commission numbers to a visualisation perspective? Also I looked for simpheny maps but it seems a closed source private company?
See https://github.com/batiste/sprite.js for a nice example.
Map-cache cannot run in site-packages because permission usually require root.
Just a suggestion...
Using _ instead of - in id's will make future tab-completion in languages like python easier if that ever were to happen in the future, and these id's will likely be easier to change sooner instead of later.
The server has some options that should be set in a settings.ini file. For instance, the location of a cobra model.
Is it possible to export the map made by escher directly from python?
I mean something like this:
b = escher.Builder (...)
b.export_svg (...)
It would be usefull to integrate escher in other web apps.
The Knockout map does not usually load the wildtype flux distribution. Not sure why.
When you do an svg export of a metabolic map (I used simpheny-maps/ijo-central.svg), there are black boxes in the background (as in a previous bug, though the black boxes do not appear in the browser from which the svg is exported).
In this function, in js/vis/scaffold.js, trying to load the same file for multiple callbacks results in values of the callbacks
object being overwritten.
function load_files(files_to_load, final_callback) {
// load multiple files asynchronously
// Takes a list of objects: { file: a_filename.json, callback: a_callback_fn }
var i = -1, remaining = files_to_load.length, callbacks = {};
while (++i < files_to_load.length) {
var this_file = files_to_load[i].file;
callbacks[this_file] = files_to_load[i].callback;
load_the_file(this_file,
function(e, d, file) {
callbacks[file](e, d);
if (!--remaining) final_callback();
},
files_to_load[i].value);
}
};
I am trying to make a visualization of a metabolic network using COBRApy and escher (as they suggest in the COBRApy manual). I have an sbml file with all the reactions in my organism.
I already generated my own escher HTML file using following code:
model = cobra.io.read_sbml_model('E:/e.coli.sbml')
modeljson = cobra.io.json.to_json(model)
b = Builder(map_json=modeljson)
b.save_html('E:/e.coli.html')
Opening the html file in my browser(s) just results in an empty screen, although the file itself is not empty.
Does anyone have an idea how I could solve this, or get to the bottom of the problem?
The b.display_in_browser(), also does not work (gives a grey empty screen)
Thanks,
Bart
typing b when selecting a reaction name activates "show control points (b)" instead of just allowing user to type b as in "FBP"
Goal: Build the E. coli core metabolic map in < 10 minutes.
Anything else? @jlerman44?
i'm using visbio to visualize cobrapy results from the e. coli model what works fine thanks!
i'm wondering and i'm just a little confused how to bring it to work with other organisms?
i have created a model and have a sbml file. when running cobrapy & visbio only very few reactions were highlighted due to the fact that pathways and reaction names differ.
what is the easiest way to create my own map?
i have no simpheny. can i load sbml data into the builder?
thanks for helping
The file complete.ly.1.0.1.js does not always load before the rest of the builder files.
What is the best way to save a map produced with escher & cobrapy as svg?
When I use escher.Builder(map_name=map).display_in_browser()
to get the builder with the map, I can save it as svg but there are guides in it (circles which are used in the builder to move the reaction) and even the arrow indicating the direction of a further reaction.
How can I avoid them?
How can I influence the colours shown in a map for active fluxes?
Currently when I open a map with flux data:
escher.Builder(map_name=map, reaction_data=flux)
all reactions are coloured even non existing or ones with zero fluxes.
This effect all plots that load css then update svg without waiting for the css to be ready, including bar.js, histogram.js, box-and-whiskers.js.
Run the tornado server from the installed python package.
python -m visbio.server
With a help menu:
python -m visbio.server --help
And extensions:
python -m visbio.server.knockout
Inspired by: http://agschwender.github.io/pilbox/
Related to this stack overflow question:
http://stackoverflow.com/questions/15147136/how-to-know-the-current-zoom-level-in-d3-js
Turning zoom on and off is tricky because the d3 zoom behavior remembers pan and zoom even when zoom is off. Thus, one has to record the last scale/translate state then move to that state when entering pan+zoom mode again.
The exported SVG from the builder displays incorrectly in Illustrator CS6, but works fine in Chrome.
Paths with markers only display the markers, and the paths are not created on import. Adding a duplicate path with no marker solves the problem, but it's not an ideal solution.
Something goes wrong when you rotate after loading a map.
Error:
Uncaught TypeError: undefined is not a function escher.1.0.dev.js:2794
Seen after selecting a large section of the map (Ubiquinone reduction/oxidation) and rotating, and trying to undo.
Hardcode the filenames for github.io.
In templates, maybe demonstrate the hardcoded data option.
Hi!
I'm using Escher-1.0.0b2. A few weeks ago, when I started using this version, arrows would show the direction of the flux for reversible reactions:
However the behaviour now (I haven't updated anything nor touched the code) is no longer there. For example:
The only thing that I could think of is of an update in the browser, but then I tried a different browser and arrows still showed the same behaviour (not indicating the flux direction). Any ideas of why this might not be working anymore?
Thanks!
Pablo
Installation:
pip install escher
python setup.py install
Running:
python -m escher.server
Development:
python -m escher.server
or python server.py
Testing:
Is it loading asynchronously?
I need to take jquery out of the minified file anyway. And that will probably speed it up. If it is asynchronous, I should supply a callback to the global scope. For example:
window.visbio_loaded(function(visbio) {
});
The reaction AKDGH does not change color or get a flux value assigned.
I believe @jonm4024 also noticed this.
This will effect the maps hosted at zakandrewking.github.io/escher
does not undo the complete rotation
The following two errors are seen with a Windows installation of Escher:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\***\Documents\GitHub\escher>C:\Python27\python setup.py ins
tall
Traceback (most recent call last):
File "setup.py", line 13, in <module>
version = __import__('escher').__version__
File "C:\Users\***\Documents\GitHub\escher\escher\__init__.py", li
ne 3, in <module>
from plots import (Builder, get_cache_dir, clear_cache, list_cached_maps,
File "C:\Users\***\Documents\GitHub\escher\escher\plots.py", line
14, in <module>
from jinja2 import Environment, PackageLoader, Template
File "C:\Python27\lib\site-packages\jinja2\__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "C:\Python27\lib\site-packages\jinja2\environment.py", line 13, in <modul
e>
from jinja2 import nodes
File "C:\Python27\lib\site-packages\jinja2\nodes.py", line 18, in <module>
from jinja2.utils import Markup
File "C:\Python27\lib\site-packages\jinja2\utils.py", line 520, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
C:\Users\***\Documents\GitHub\escher>C:\Python27\python setup.py tes
t
Traceback (most recent call last):
File "setup.py", line 27, in <module>
'out=escher/lib/%s'%escher, 'optimize=none'])
File "C:\Python27\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application
C:\Users\***\Documents\GitHub\escher>
Implement using the d3 tile plugin.
https://github.com/d3/d3-plugins/blob/master/geo/tile/tile.js
Demo:
From an email:
I ran into something strange that didn't happen before:
Separate out metabolite details into a metabolite list.
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.