Python bindings to the HiGlass for tile serving, view config generation, and Jupyter Notebook + Lab integration.
This package provide access to:
- server: a lightweight flask server
- tilesets: tileset API
- client: an API for generating view configs
- viewer: an API for launching HiGlass in Jupyter Notebook or Lab
First install higlass-python
via pip:
pip install higlass-python
Open a terminal and execute the following code to activate the integration:
# The following is only required if you have not enabled the ipywidgets nbextension yet
jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension install --py --sys-prefix higlass
jupyter nbextension enable --py --sys-prefix higlass
Open a terminal and execute the following code to activate the integration:
# The following is only required if you have not enabled the jupyterlab manager yet
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install higlass-jupyter
Take a look at notebooks/Examples.ipynb on how to get started.
There is more detailed documentation at docs-python.higlass.io.
-
Install the package in editable mode. (The module will be imported from the development directory, rather than copied to
site-packages
).pip install -e .
-
Build and enable the Jupyter Notebook Extension. (With the
--symlink
option, the assets inhiglass/static
are linked to the extension registry rather than copied.)python setup.py jsdeps jupyter nbextension enable --py --sys-prefix widgetsnbextension jupyter nbextension install --py --symlink --sys-prefix higlass jupyter nbextension enable --py --sys-prefix higlass
-
Uninstall the Jupyter Notebook Extension
jupyter nbextension uninstall --py --sys-prefix higlass
-
Experimental: install the Jupyter Lab Extension
cd js && jupyter labextension link .
To work on the docs, start the autoserver and edit the rst files in the docs
directory:
cd docs
./serve.sh
- If you are running JupyterLab
v1.x
and ipywidgetsv7.5
and the HiGlass widget is not being displayed! Then you might have an incompatible widget installed that makes all other widgets fail. Try to deinstall all other widgets to test HiGlass separately before submitting a ticket. For more information see jupyter-widgets/ipywidgets#2483 (comment)