Package: vitessce
vitessce-pythonPython API and Jupyter widget facilitating interactive visualization of spatial single-cell data withVitessce.InstallationTo install with pip:$ pip install vitessce[all]Getting startedExplore ourexample notebooks.
These contain demos of different use cases and integrations with single-cell data analysis packages.DevelopmentFor a development installation (requires NodeJS and NPM),$ git clone https://github.com/vitessce/vitessce-python.git
$ cd vitessce-python
$ conda env create -f environment.yml
$ conda activate vitessce-python-dev
$ pip install -e ".[dev,docs,all]"Conda environmentsIn this repository, there are multiple conda environments for different purposes:vitessce-python-dev(defined inenvironment.yml) is used for the development of thevitesscepackage itselfvitessce-python-notebooks(defined indocs/notebooks/environment.yml) is used for running the example notebooks in thedocs/notebooks/directory (seedocs/notebooks/README.mdfor more information)vitessce-python-binder(defined inbinder/environment.yml) is the environment used by Binder upon opening notebooks from this repositoryLinting and testingflake8
pytestFormattingOne file:autopep8--in-place--aggressive./path/to/file.pyAll.pyfiles:find.-name'*.py'-execautopep8--in-place--aggressive'{}'\;DocumentationmakehtmlDeploymentTo deploy a new version, increment the version of the Python package inpyproject.toml.Then, when you push or merge the code with the incremented versions tomain, the GitHub Actiondeploy.ymlworkflow will build and push the package to PyPI.TroubleshootingCheck JavaScript consoleCheck the JavaScript console in the web browser for error messages. To do so, shift+right click in Jupyter, then click Inspect element. You may need to enable your browser's develop mode in its preferences for this option to appear when you right-click.Check your Python environmentCheck that you have activated the correct conda or other virtual environment as you expect.
When sharing errors, it can be helpful to share the current versions of packages in the environment, e.g., byconda listorpip list.Restart Kernel and Clear All Outputs, then refresh the browser tabTo ensure that older widget JavaScript output is not causing conflicts with newer JavaScript output (which may persist via notebook outputs even without running notebook cells), clear old outputs by Kernel -> Restart Kernel and Clear All Outputs. Then refresh the browser tab (containing Jupyter) to ensure all JavaScript outputs are fresh.This is also typically required when running!pip install vitessce[all]from within a Jupyter notebook cell in the same session as runningvc.widget()for the first time.
The Kernel restart/Output clearing is required when a new Jupyter widget is installed in the environment, otherwise Jupyter will not yet recognize the newly-installed widget (as the notebook was opened with a different set of Jupyter widgets installed, and widget discovery is performed only at certain stages in the notebook lifecycle).Check the widget configurationIf the widget renders successfully, you can get its current configuration byvw=vc.widget()vwvw.configUsage when Jupyter is running on a remote machineIf Jupyter is running on a remote machine, then useproxy=True. You may need to specifyhost_nameas well (widgetshould be able to detect this but the plaindisplaycannot).vw=vc.widget(proxy=True)vworvc.display(proxy=True,host_name="http://localhost:8888")Ensure that Vitessce and Jupyter are installed in the same environmentWith the environment activated, runpip liston the command line:Package                       Version
----------------------------- -----------
...
jupyterlab                    3.x.x
...
vitessce                      3.x.xResourcesipywidget docs: Building a Custom Widgetipywidget docs: Low Level Widget Tutorialipywidget example: ipyleafletipywidget example (with React): ipymaterialuiipywidget example (with React): higlass-pythonipywidget cookiecutterSphinx: Getting StartedRead the Docs Sphinx Themejupyter server proxyGetting/Offering HelpIf you have a specific bug or feature request, please feel free to open anissue.  Otherwise ourdiscussionssection is a great place to get help or offer it.  If you aren't sure if something is a bug or not, don't have all the reproduction steps, or just have a general question, feel free to open a discussion post.