跳转到主要内容

Jupyter的Cytoscape小部件

项目描述

ipycytoscape

Tests Documentation Status StackOverflow Join the chat at https://gitter.im/QuantStack/Lobby

一个允许在JupyterLab和Jupyter笔记本中使用cytoscape.js进行交互式图形可视化的Widget。

使用Binder尝试: Binder 或者安装并尝试示例

cytoscape screencast

支持

安装

使用mamba

mamba install -c conda-forge ipycytoscape

使用conda

conda install -c conda-forge ipycytoscape

使用pip

pip install ipycytoscape

Pandas安装

您可以使用pip安装ipycytoscape的Pandas依赖项

pip install pandas

或conda-forge

mamba install pandas

Neo4j安装

您可以使用pip安装ipycytoscape的neo4j依赖项

pip install -e ".[neo4j]"

或conda-forge

mamba install py2neo neotime

对于jupyterlab 1.x或2.x

如果您正在使用JupyterLab 1.x或2.x,那么您还需要安装nodejsjupyterlab-manager扩展。您可以这样做

# installing nodejs
conda install -c conda-forge nodejs


# install jupyterlab-manager extension
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0 --no-build

# if you have previously installed the manager you still to run jupyter lab build
jupyter lab build

对于Jupyter Notebook 5.2及更早版本

您可能还需要手动启用nbextension

jupyter nbextension enable --py [--sys-prefix|--user|--system] ipycytoscape

对于开发安装

(需要npm)

虽然不是必需的,但我们建议创建一个conda环境来工作

conda create -n ipycytoscape -c conda-forge jupyterlab nodejs
conda activate ipycytoscape

# clone repo
git clone https://github.com/cytoscape/ipycytoscape.git
cd ipycytoscape

安装开发版本的python包

这将运行npm installnpm run build。此命令还将安装测试套件和文档的本地版本

pip install jupyter_packaging==0.7.9
pip install -e ".[test, docs]"

jupyter labextension develop . --overwrite

可选地,使用以下命令安装pre-commit钩子

pre-commit install

或者对于经典notebook,您可以运行

jupyter nbextension install --sys-prefix --symlink --overwrite --py ipycytoscape
jupyter nbextension enable --sys-prefix --py ipycytoscape

请注意,Windows上--symlink标志不起作用,因此每次您重新构建扩展时都必须运行install命令。对于某些安装,您可能还需要另一个标志而不是--sys-prefix,但在这里我们不介绍这些标志的含义。

如何查看您的更改

Typescript

要持续监视项目以检测更改并自动触发重新构建,请开始监视ipycytoscape代码

npm run watch

然后在另一个终端中正常启动JupyterLab

jupyter lab

webpack重新构建完成后,刷新JupyterLab页面以使您的更改生效。

Python

如果您对Python代码进行了更改,则需要重新启动notebook内核才能使其生效。

如何在本地运行测试

使用pip安装必要的依赖项

pip install -e ".[test]"

或使用conda/mamba

mamba -c conda-forge install networkx pandas nbval pytest

然后运行它

pytest

如何构建文档

cd docs

安装依赖项

conda env update --file doc_environment.yml

然后构建它们

make html

致谢

ipycytoscape项目由Mariana Meireles在QuantStack启动。这项初始开发是作为PLASMA项目的一部分资助的,该项目由Claire Vandiedonck,Pierre Poulain和Sandrine Caburet领导。

许可协议

我们使用共享版权模式,允许所有贡献者保留其贡献的版权。

此软件根据BSD-3-Clause许可证授权。有关详细信息,请参阅LICENSE文件。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。

源分布

ipycytoscape-1.3.3.tar.gz (3.9 MB 查看哈希值)

上传时间

构建分布

ipycytoscape-1.3.3-py2.py3-none-any.whl (3.6 MB 查看哈希值)

上传时间 Python 2 Python 3

由以下组织支持