• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

cytoscape/cytoscape-jupyter-widget: Cytoscape.js based network visualizer for Ju ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

cytoscape/cytoscape-jupyter-widget

开源软件地址:

https://github.com/cytoscape/cytoscape-jupyter-widget

开源编程语言:

JavaScript 53.7%

开源软件介绍:

CyJupyter (cytoscape-jupyter-widget)

Overview

CyJupyter is a simple interactive network visualizer for Jupyter Notebook. For additional features and capabilities, we recommend you try the new ipycytoscape package instead.

Limitations

CyJupiter is not supported in JupyterLab. There is another visualizer specifically created for JupyterLab:

This package is still under development, but we will add more features to it and release the final version once the JupyterLab extention API is finalized.

Introduction

With the CyJupyter widget, you can easily visualize network data in JSON / Python Dict using the built-in Cytoscape.js visualizer.

About Cytoscape

Cytoscape is a de-facto standard software for biological network analysis and visualization. It has a rich ecosystem for network analysis and visualization, and this Jupyter Widget is part of it. It was developed for biologists, but it core functions are domain-independent and you can use it for all types of network data.

In addition, you can use it from Jupyter Notebook via CyRest API. Since you are interested in Jupyter Notebook environment, combination of Jupyter, CyJupyter, and Cytoscape Desctop with CyREST will be a very powerful workbench for your network analysis workflows.

If you want to interactively edit (large) networks, create PDF/SVG, try the Cytoscape Desktop. It can read/write CX / Cytoscape.js JSON files and many standard network file formats. Please visit here for more information.

Status

  • 10/10/2018 - First public version released (0.2.0)

Quick Start

> pip install cyjupyter
> jupyter nbextension enable --py --sys-prefix cyjupyter
> jupyter notebook

Features

CyJupyter is a simple data visualization widget, but yet very powerful tool once you understand its engine, Cytoscape.js.

  • Interactive network visualization using Cytoscape.js
  • Full support for Cytoscape.js compatible Styles
    • Mapping data points to color, size, shape, etc.

(Fig. 1: Betweenness cetrarity is mapped to node size, edge width, and node opacity)

  • Support for complex network structures, including compound nodes

(Fig. 2: Network with hierachical struture, visualized as Compound Nodes)

  • Support for built-in automatic layouts (circle, grid, cose, etc.)
  • Support for Cytoscape.js and CX JSON formats
    • You can easily converted network data from/to these formats using popular network analysis libraries, such as NetworkX
  • Adjustable cell size
  • Custom background

(Fig. 3: Network visualization with custom background using CSS gradient)

  • Can be used with popular network analysis tools, such as NetworkX

(Fig. 4: Network generated with NetworkX, visualized with CyJupyer)

Installation

From PyPI

To install this widget, use pip:

# Install the widget from PyPI repository
> pip install cyjupyter

# Enable it
> jupyter nbextension enable --py --sys-prefix cyjupyter

Install from source

For a development installation (requires npm),

$ git clone https://github.com/idekerlab/cytoscape-jupyter-widget.git
$ cd cytoscape-jupyter-widget
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix cyjupyter
$ jupyter nbextension enable --py --sys-prefix cyjupyter

How to use the widget

Once you install this widget, you can use it by importing it to your notebook:

from cyjupyter import Cytoscape

Cytoscape is the only Class in this Widget. Basic usage is:

Cytoscape(data=network_data, format=cx)

where data is the actual network data in Python Dictionary or List (for CX) and format is the network data format name.

Supported Data Format

Currently, this Widget supports two network formats:

If you have data in JSON file, you can use Python's standard json library to convert it into Python Dict/List.

Cytoscape.js JSON

The data should be in the following format:

{
  "elements": {
    "nodes":[],
    "edges": []
  }
}

for more information about this data model, please visit Cytoscape.js web site.

CX JSON Array

This is always a JSON Array and is a fairly complex data format, but you can use this Python library to simplify your work:

Also, for network biologists, NDEx is a great resource. All data sets are availabe in CX format.

Internally, it uses Cytoscape.js as the rendering engine, and if you provide your data in Cytoscape.js format, it is the most efficient way yo visualize your data. If you provide your data as CX, the Widget automatically convert the data into Cytoscape.js compatible data structure and then visualizes it.

Examples

The best way to learn this widget is actually visualize some network data. Please try this notebook to learn how to use this widget.

API Reference

(TBD)

  • data
  • format
  • style
  • background
  • layout_name
  • layout

License

MIT

Questions / Bugs / Feature Requests?

Please use GitHub Issue Tracker.


© 2018 Keiichiro ONO

University of California, San Diego: Trey Ideker Lab / The Cytoscape Consortium / National Resource for Network Biology




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap