8000 GitHub - yitzchak/cytoscape-clj: Cytoscape widget for common-lisp-jupyter
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yitzchak/cytoscape-clj

< 10000 link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.481770160d9771376d19.module.css" />

Repository files navigation

cytoscape-clj

A common-lisp-jupyter widget for cytoscape.js.

Installation

The Jupyter Lab frontend code should be installed using the following command:

jupyter-labextension install cytoscape-clj

Once the extension has been installed then widget can be loaded in a notebook using Quicklisp.

(ql:quickload :cytoscape-clj)

Usage

For sample notebooks please see the examples directory. The main widgets are cytoscape-widget and element. For example to create and display a graph use the following.

(make-instance 'cytoscape:cytoscape-widget
               :graph-layouts (list (make-instance 'cytoscape:cose-layout))
               :graph-style "node { label: data(id); }"
               :elements (list (make-instance 'cytoscape:element
                                              :group "nodes"
                                              :data `(:object-alist
                                                      ("id" . "a")))
                               (make-instance 'cytoscape:element
                                              :group "nodes"
                                              :data `(:object-alist
                                                      ("id" . "b")))
                               (make-instance 'cytoscape:element
                                              :group "nodes"
                                              :data `(:object-alist
                                                      ("id" . "c")))
                               (make-instance 'cytoscape:element
                                              :group "edges"
                                              :data `(:object-alist
                                                      ("source" . "a")
                                                      ("target" . "b")))
                               (make-instance 'cytoscape:element
                                              :group "edges"
                                              :data `(:object-alist
                                                      ("source" . "a")
                                                      ("target" . "c")))
                               (make-instance 'cytoscape:element
                                              :group "edges"
                                              :data `(:object-alist
                                                      ("source" . "b")
                                                      ("target" . "c")))))

About

Cytoscape widget for common-lisp-jupyter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0