Skip to content

Commit

Permalink
updated dev docs and js/py apis
Browse files Browse the repository at this point in the history
  • Loading branch information
zakandrewking committed Jul 10, 2019
1 parent 4fb18eb commit 528eafd
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Build and run the docs::

```
cd docs
make html
./build_docs
cd _build/html
python -m SimpleHTTPServer # python 2
python -m http.server # python 3
Expand Down
7 changes: 2 additions & 5 deletions docs/convert_maps.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Validate and convert maps
-------------------------

Validate an Escher map
======================
Validate Escher maps
--------------------

Escher maps follow a specification using the `JSON Schema`_ format. Therefore,
any JSON Schema validator can be used to validate an Escher map by comparing it
Expand Down
25 changes: 22 additions & 3 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ For an example of the boilerplate code that is required to begin developing with
Escher, have a look at the `escher-demo repository`_. For projects built with
npm, use the `escher-test repository`_ as a guide.

You can also follow the :doc:`Developer Tutorial <developer-tutorial>` for an
example of extending Escher to create custom tooltips.

Import Escher
=============

Expand Down Expand Up @@ -110,12 +113,28 @@ COBRA models are also saved as JSON files. This format has not been documented
with a schema, but you can browse through the `core metabolism model`_ as a
guide to generating valid COBRA models.

Contributing to the Escher Source Code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We welcome open source contributions to the Escher source code. You can find
installation instructions for developing Escher in the README:

https://github.com/zakandrewking/escher/blob/master/README.md

And instructions (work in progress :):

https://github.com/zakandrewking/escher/blob/master/CONTRIBUTING.md

And our code of conduct:

https://github.com/zakandrewking/escher/blob/master/CODE_OF_CONDUCT.md

I still need help!
^^^^^^^^^^^^^^^^^^

If you are interested in developing with Escher and you need more information
than what is provided in the documentation, please contact Zachary King
<zaking@ucsd.edu>.
If you are interested in developing with or contributing to Escher and you need
more information than what is provided in the documentation, please contact
Zachary King <zaking@ucsd.edu>.

.. _`Gitter chat room`: https://gitter.im/zakandrewking/escher
.. _`Development roadmap`: https://github.com/zakandrewking/escher/wiki/Development-Roadmap
Expand Down
28 changes: 17 additions & 11 deletions docs/javascript_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,7 @@ JavaScript API

.. js:attribute:: options.reaction_scale

Default::

[ { type: 'min', color: '#c8c8c8', size: 12 },
{ type: 'median', color: '#9696ff', size: 20 },
{ type: 'max', color: '#ff0000', size: 25 } ]
Default: ``null`` (``options.reaction_scale_preset`` used instead)

An array of objects that define stops on the data scale.

Expand Down Expand Up @@ -211,6 +207,13 @@ JavaScript API
``{ type: 'value', value: 8.5, color: '#333', size: 50 }`` Specifies
that reactions near 8.5 value have the given color and size.

.. js:attribute:: options.reaction_scale_preset

(Default:: ``'GaBuGeRd'``) A preset metabolite scale that will set
``options.reaction_scale`` for you. The available scales are here:

https://github.com/zakandrewking/escher/blob/master/src/scalePresets.js

.. js:attribute:: options.reaction_no_data_color

(Default: ``'#dcdcdc'``) The color of reactions with no data value.
Expand Down Expand Up @@ -254,16 +257,19 @@ JavaScript API

.. js:attribute:: options.metabolite_scale

Default::

[ { type: 'min', color: '#fffaf0', size: 20 },
{ type: 'median', color: '#f1c470', size: 30 },
{ type: 'max', color: '#800000', size: 40 } ]
Default: ``null`` (``options.metabolite_scale_preset`` used instead)

An array of objects that define stops on the data scale. See the
description of **options.reaction_scale** for an explanation of the
format.

.. js:attribute:: options.metabolite_scale_preset

(Default: ``'WhYlRd'``) A preset metabolite scale that will set
``options.metabolite_scale`` for you. The available scales are here:

https://github.com/zakandrewking/escher/blob/master/src/scalePresets.js

.. js:attribute:: options.metabolite_no_data_color

(Default: ``'#ffffff'``) The color of metabolites with no data value.
Expand Down Expand Up @@ -303,7 +309,7 @@ JavaScript API
show when hoving over reactions, metabolites, and genes. See
``escher.Tooltip.DefaultTooltip`` in the source code for an example of
a Preact component that defines the default tooltips. And see the
:doc:`Tooltip Tutorial <development-tutorial>` for more tips on
:doc:`Tooltip Tutorial <developer-tutorial>` for more tips on
getting started with custom tooltips.

For correct placement of the tooltip, the tooltip component should
Expand Down
5 changes: 0 additions & 5 deletions py/escher/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,7 @@ def save_html(self, filepath):
The name of the HTML file.
TODO apply options from self
"""

# options = transform(self.options)
# get options
options = {}
for key in self.traits(option=True):
val = getattr(self, key)
Expand Down

0 comments on commit 528eafd

Please sign in to comment.