Skip to content

Commit

Permalink
web app, widget
Browse files Browse the repository at this point in the history
  • Loading branch information
cornhundred committed Feb 14, 2017
1 parent d13c4a2 commit 9ef8e42
Show file tree
Hide file tree
Showing 20 changed files with 123 additions and 107 deletions.
Binary file modified docs/_build_html/.doctrees/building_webpage.doctree
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/getting_started.doctree
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/jupyter_widget.doctree
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/web_app.doctree
Binary file not shown.
31 changes: 10 additions & 21 deletions docs/_build_html/_sources/building_webpage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ Clustergrammer can be used by developers to add interactive heatmap visualizatio
Embedding Clustergrammer
========================

The Clustergrammer web app can be used to produce visualizations that are embedded into another page using an IFrame - see below:
::

<iframe id="iframe_preview" src="http://amp.pharm.mssm.edu/clustergrammer/viz/5734a7399fee36034aeb787e/rc_two_cats.txt" frameborder="0"></iframe>

Users can obtain a permanent link to their visualization by manually uploading their data using the upload section of Clustergrammer-Web's `homepage`_ and copying the URL to the full-screen version of their visualization. Alternatively users can programatically upload their data using the :ref:`clustergrammer_web_api` and receive their permanent links through the API.

Clustergrammer Web Page
=======================

Adding Clustergrammer to a Page
===============================
The Clustergrammer-JS library can be used to generate an interactive visualization in your webpage. Simply include the ``clustergrammer.js`` script in your page and load the pre-calculated :ref:`Clustergrammer-JSON <clustergrammer_json>` to generate a visualization.


Clustergrammer can be used to generate interactive visualizations for your own web application by: using the Clustergrammer.js library on your site, or embedding a visualization provided by the Clustergrammer web app.


*Webpage Examples*

The easiest way to generate a visualize of your own data on a webpage is to:

#. follow the :ref:`clustergrammer_py_workflow` to cluster your matrix and generate the front-end JSON
Expand All @@ -30,20 +35,4 @@ These examples require Clustergrammer's JavaScript and Python libraries:

These libraries can be installed npm, ``npm install Clustergrammer``, and pip, ``pip install clustergrammer``, respectively.

*Embedding Information*

The Clustergrammer web app can be used to produce visualizations that are embedded into another page using an IFrame - see below:
::

<iframe id="iframe_preview" src="http://amp.pharm.mssm.edu/clustergrammer/viz/5734a7399fee36034aeb787e/rc_two_cats.txt" frameborder="0"></iframe>

Users can upload their data using the upload section of the web app `homepage`_



or upload their data using the web app API.



Clustergrammer Web App
======================
.. _`homepage`: http://amp.pharm.mssm.edu/clustergrammer
3 changes: 1 addition & 2 deletions docs/_build_html/_sources/getting_started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ For more information on interacting with the visualization please see the :ref:`
For more information on Clustergrammer's biology specific features please see the :ref:`biology_specific_features` section.

.. _`Enrichr`: http://amp.pharm.mssm.edu/Enrichr/
.. _`Harmonizome`: http://amp.pharm.mssm.edu/Harmonizome/
.. _`homepage`: http://amp.pharm.mssm.edu/clustergrammer
.. _`Harmonizome`: http://amp.pharm.mssm.edu/Harmonizome/
23 changes: 13 additions & 10 deletions docs/_build_html/_sources/jupyter_widget.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

Clustergrammer Jupyter Widget
-----------------------------
Clustergrammer can be used within a Jupyter notebook as an interactive HTML widget and is compatable with Python 2 and 3. Clustergrammer-Widget can be used to visualize a matrix of data from a file or from a Pandas DataFrame.
Clustergrammer can be used within a Jupyter notebook as an interactive HTML widget and is compatable with Python 2 and 3. Clustergrammer-Widget can be used to visualize a matrix of data from a file or from a `Pandas`_ DataFrame.


Dependencies
============

- Numpy
- SciPy
- Pandas
- ipywidgets
- `Numpy`_
- `SciPy`_
- `Pandas`_
- `ipywidgets`_

Installation
============
Expand All @@ -29,9 +29,9 @@ To enable rendering interactive widgets on `nbviewer`_ you must have `ipywidgets

Clustergrammer-Widget Workflow Example
======================================
The Jupyter notebook `Running_clustergrammer_widget.ipynb`_ (which is rendered using `_nbviewer`) shows how to visualize a matrix from a file and Pandas DataFrame. The following code snippits are from the notebook.
The Jupyter notebook `Running_clustergrammer_widget.ipynb`_ (which is rendered using `nbviewer`_) shows how to visualize a matrix from a file and `Pandas`_ DataFrame. The following code snippits are from the notebook.

This example shows how to visualize a matrix of gene expression data saved as a tab-separated file using :ref:`clustergrammer_py` and Clustergrammer-Widget:
This example shows how to visualize a matrix of gene expression data saved as a tab-separated file:
::

# import clustergrammer_widgets and initialize network object
Expand All @@ -47,7 +47,7 @@ This example shows how to visualize a matrix of gene expression data saved as a
# make interactive widget
clustergrammer_widget(network=net.widget())

Clustergrammer-Widget can also be thought of as a
Clustergrammer-Widget can also be thought of as a general purpose `Pandas`_ DataFrame viewer

.. _clustergrammer_widget_dev:

Expand All @@ -58,10 +58,13 @@ Clustergrammer-Widget's source code can be found in the `clustergrammer-widget`_
Please :ref:`contact` Nicolas Fernandez or Avi Ma'ayan with questions or use the GitHub `issues`_ feature to raise an issue.

.. _`ipywidgets version 6`: https://github.com/ipython/ipywidgets/releases
.. _`ipywidgets`: https://github.com/ipython/ipywidgets
.. _`ipywidgets`: http://ipywidgets.readthedocs.io/en/latest/
.. _`cookie cutter`: https://github.com/jupyter/widget-cookiecutter
.. _`issues`: https://github.com/MaayanLab/clustergrammer-widget/issues
.. _`clustergrammer-widget`: https://github.com/MaayanLab/clustergrammer-widget
.. _`nbviewer`: http://nbviewer.jupyter.org/
.. _`Rendering Interactive Widgets on nbviewer`: http://ipywidgets.readthedocs.io/en/latest/embedding.html?highlight=save#rendering-interactive-widgets-on-nbviewer
.. _`Running_clustergrammer_widget.ipynb`: http://nbviewer.jupyter.org/github/MaayanLab/clustergrammer-widget/blob/master/Running_clustergrammer_widget.ipynb
.. _`Running_clustergrammer_widget.ipynb`: http://nbviewer.jupyter.org/github/MaayanLab/clustergrammer-widget/blob/master/Running_clustergrammer_widget.ipynb
.. _`Pandas`: http://pandas.pydata.org/
.. _`Numpy`: http://www.numpy.org/
.. _`SciPy`: https://www.scipy.org/
21 changes: 18 additions & 3 deletions docs/_build_html/_sources/web_app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,28 @@ Clustergrammer Web App
----------------------
The Clustergrammer web application (referred to as Clustergrammer-Web) enables users to easily generate interactive and shareable heatmap visualizations.

.. _clustergrammer_web_upload:

Uploading Data through the Homepage
====================================

**add upload screenshots**


.. _clustergrammer_web_viz:

Clustergrammer-Web Visualization
================================
Uploading a matrix to Clustergrammer-Web will redirect the user to a new permanent and shareable page with three views of their data:

#. clustered heatmap view of their matrix
#. clustered similarity matrix of the columns in their original matrix
#. clustered similarity matrix of the rows in their original matrix

.. _clustergrammer_web_api:

Web Application API
===================
Clustergrammer-Web API
======================
Clustergrammer-Web's RESful API enables users to programatically generate visualizations. The API can be useful for users that need to generate many clustergrams or developers that need to automatically generate visualizations for their own web application.

*Matrix Upload*
Expand All @@ -20,7 +35,7 @@ Users can post a matrix file to Clustergrammer-Web using the endpoint

http://amp.pharm.mssm.edu/clustergrammer/matrix_upload/

and recieve a permanent link to their visualization. Below is an example in Python 2.7 showing the post request and how to obtain the link from the response object:
and receive a permanent link to their visualization. Below is an example in Python 2.7 showing the post request and how to obtain the link from the response object:
::

import requests
Expand Down
23 changes: 8 additions & 15 deletions docs/_build_html/building_webpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
<li class="toctree-l1"><a class="reference internal" href="matrix_format_io.html">Matrix Formats and Input/Output</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building a Webpage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#embedding-clustergrammer">Embedding Clustergrammer</a></li>
<li class="toctree-l2"><a class="reference internal" href="#clustergrammer-web-page">Clustergrammer Web Page</a></li>
<li class="toctree-l2"><a class="reference internal" href="#clustergrammer-web-app">Clustergrammer Web App</a></li>
<li class="toctree-l2"><a class="reference internal" href="#adding-clustergrammer-to-a-page">Adding Clustergrammer to a Page</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="clustergrammer_js.html">Clustergrammer-JS</a></li>
Expand Down Expand Up @@ -148,12 +147,16 @@
<p>Clustergrammer can be used by developers to add interactive heatmap visualizations to their web pages and web applications.</p>
<div class="section" id="embedding-clustergrammer">
<h2>Embedding Clustergrammer<a class="headerlink" href="#embedding-clustergrammer" title="Permalink to this headline"></a></h2>
<p>The Clustergrammer web app can be used to produce visualizations that are embedded into another page using an IFrame - see below:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">iframe</span> <span class="nb">id</span><span class="o">=</span><span class="s2">&quot;iframe_preview&quot;</span> <span class="n">src</span><span class="o">=</span><span class="s2">&quot;http://amp.pharm.mssm.edu/clustergrammer/viz/5734a7399fee36034aeb787e/rc_two_cats.txt&quot;</span> <span class="n">frameborder</span><span class="o">=</span><span class="s2">&quot;0&quot;</span><span class="o">&gt;&lt;/</span><span class="n">iframe</span><span class="o">&gt;</span>
</pre></div>
</div>
<div class="section" id="clustergrammer-web-page">
<h2>Clustergrammer Web Page<a class="headerlink" href="#clustergrammer-web-page" title="Permalink to this headline"></a></h2>
<p>Users can obtain a permanent link to their visualization by manually uploading their data using the upload section of Clustergrammer-Web&#8217;s <a class="reference external" href="http://amp.pharm.mssm.edu/clustergrammer">homepage</a> and copying the URL to the full-screen version of their visualization. Alternatively users can programatically upload their data using the <a class="reference internal" href="web_app.html#clustergrammer-web-api"><span class="std std-ref">Clustergrammer-Web API</span></a> and receive their permanent links through the API.</p>
</div>
<div class="section" id="adding-clustergrammer-to-a-page">
<h2>Adding Clustergrammer to a Page<a class="headerlink" href="#adding-clustergrammer-to-a-page" title="Permalink to this headline"></a></h2>
<p>The Clustergrammer-JS library can be used to generate an interactive visualization in your webpage. Simply include the <code class="docutils literal"><span class="pre">clustergrammer.js</span></code> script in your page and load the pre-calculated <a class="reference internal" href="clustergrammer_js.html#clustergrammer-json"><span class="std std-ref">Clustergrammer-JSON</span></a> to generate a visualization.</p>
<p>Clustergrammer can be used to generate interactive visualizations for your own web application by: using the Clustergrammer.js library on your site, or embedding a visualization provided by the Clustergrammer web app.</p>
<p><em>Webpage Examples</em></p>
<p>The easiest way to generate a visualize of your own data on a webpage is to:</p>
<ol class="arabic simple">
<li>follow the <a class="reference internal" href="clustergrammer_py.html#clustergrammer-py-workflow"><span class="std std-ref">Python Workflow Example</span></a> to cluster your matrix and generate the front-end JSON</li>
Expand All @@ -165,16 +168,6 @@ <h2>Clustergrammer Web Page<a class="headerlink" href="#clustergrammer-web-page"
<li>the back-end Clustergrammer.py Python library clusters a matrix of data and makes the JSON for the front-end</li>
</ol>
<p>These libraries can be installed npm, <code class="docutils literal"><span class="pre">npm</span> <span class="pre">install</span> <span class="pre">Clustergrammer</span></code>, and pip, <code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">clustergrammer</span></code>, respectively.</p>
<p><em>Embedding Information</em></p>
<p>The Clustergrammer web app can be used to produce visualizations that are embedded into another page using an IFrame - see below:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">iframe</span> <span class="nb">id</span><span class="o">=</span><span class="s2">&quot;iframe_preview&quot;</span> <span class="n">src</span><span class="o">=</span><span class="s2">&quot;http://amp.pharm.mssm.edu/clustergrammer/viz/5734a7399fee36034aeb787e/rc_two_cats.txt&quot;</span> <span class="n">frameborder</span><span class="o">=</span><span class="s2">&quot;0&quot;</span><span class="o">&gt;&lt;/</span><span class="n">iframe</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Users can upload their data using the upload section of the web app <a href="#id1"><span class="problematic" id="id2">`homepage`_</span></a></p>
<p>or upload their data using the web app API.</p>
</div>
<div class="section" id="clustergrammer-web-app">
<h2>Clustergrammer Web App<a class="headerlink" href="#clustergrammer-web-app" title="Permalink to this headline"></a></h2>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/_build_html/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@
<li class="toctree-l1"><a class="reference internal" href="viz_interaction.html">Interactive Visualization</a></li>
<li class="toctree-l1"><a class="reference internal" href="biology_specific_features.html">Biology-Specific Features</a></li>
<li class="toctree-l1"><a class="reference internal" href="case_studies.html">Case Studies</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrix_format_io.html">Matrix Formats and Input/Output</a></li>
<li class="toctree-l1"><a class="reference internal" href="building_webpage.html">Building a Webpage</a></li>
<li class="toctree-l1"><a class="reference internal" href="clustergrammer_js.html">Clustergrammer-JS</a></li>
<li class="toctree-l1"><a class="reference internal" href="clustergrammer_py.html">Clustergrammer-PY</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing_with_clustergrammer.html">Developing Clustergrammer</a></li>
<li class="toctree-l1"><a class="reference internal" href="matrix_format_io.html">Matrix Formats and Input/Output</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>

Expand Down
6 changes: 3 additions & 3 deletions docs/_build_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ <h2>Contents:<a class="headerlink" href="#contents" title="Permalink to this hea
</li>
<li class="toctree-l1"><a class="reference internal" href="web_app.html">Clustergrammer Web App</a><ul>
<li class="toctree-l2"><a class="reference internal" href="web_app.html#uploading-data-through-the-homepage">Uploading Data through the Homepage</a></li>
<li class="toctree-l2"><a class="reference internal" href="web_app.html#web-application-api">Web Application API</a></li>
<li class="toctree-l2"><a class="reference internal" href="web_app.html#clustergrammer-web-visualization">Clustergrammer-Web Visualization</a></li>
<li class="toctree-l2"><a class="reference internal" href="web_app.html#clustergrammer-web-api">Clustergrammer-Web API</a></li>
<li class="toctree-l2"><a class="reference internal" href="web_app.html#clustergrammer-web-development">Clustergrammer-Web Development</a></li>
</ul>
</li>
Expand Down Expand Up @@ -217,8 +218,7 @@ <h2>Contents:<a class="headerlink" href="#contents" title="Permalink to this hea
</li>
<li class="toctree-l1"><a class="reference internal" href="building_webpage.html">Building a Webpage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="building_webpage.html#embedding-clustergrammer">Embedding Clustergrammer</a></li>
<li class="toctree-l2"><a class="reference internal" href="building_webpage.html#clustergrammer-web-page">Clustergrammer Web Page</a></li>
<li class="toctree-l2"><a class="reference internal" href="building_webpage.html#clustergrammer-web-app">Clustergrammer Web App</a></li>
<li class="toctree-l2"><a class="reference internal" href="building_webpage.html#adding-clustergrammer-to-a-page">Adding Clustergrammer to a Page</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="clustergrammer_js.html">Clustergrammer-JS</a><ul>
Expand Down

0 comments on commit 9ef8e42

Please sign in to comment.