cytoscape / py2cytoscape

Python utilities for Cytoscape and Cytoscape.js
https://py2cytoscape.readthedocs.io
MIT License
178 stars 45 forks source link

py2cytoscape Build Status PyPI version ReadtheDocs DOI

DEPRECATION

Please note that this project has been superceded by the py4cytoscape project. py2cytoscape is not currently maintained.

Installation

py2cytoscape can be installed using conda, pip.

conda

conda installs igraph with py2cytoscape. You do not need to install igraph by yourself.

conda install -c conda-forge py2cytoscape

Latest stable release (pip)

pip3 install py2cytoscape

Development version (pip)

pip3 install git+https://github.com/cytoscape/py2cytoscape.git

Dependencies (extra): igraph

git clone https://github.com/igraph/python-igraph/
cd python-igraph

git clone https://github.com/igraph/igraph igraphcore
cd igraphcore
./bootstrap.sh
mkdir _build && cd _build
../configure --prefix=$PWD/../_install
make
make install
cd ../../

CPPFLAGS="-I$PWD/igraphcore/_install/include/igraph ${CPPFLAGS}"
export CPPFLAGS
LDFLAGS="-L$PWD/igraphcore/_install/lib ${LDFLAGS}"
export LDFLAGS
PKG_CONFIG_PATH=igraphcore/_install/lib/pkgconfig/
export PKG_CONFIG_PATH

python3 setup.py install --user

Documentation

Package documentation can be found on https://py2cytoscape.readthedocs.io.

For contributing please check the wiki.

Full workflows can be found on the cytoscape/cytoscape-automation repo. The following workflows include cyrest usage:

Contributing

Please do all your development in our development docker image:

docker pull mpgagebioinformatics/py2cytoscape:latest

Once you have connected to the running container you can start jupyter with

module load jupyterhub
jupyter notebook --ip=0.0.0.0

A URL will be presented to you, and it should be pasted into your host's browser (Chrome recommended).


For stopping the server use:

sudo rstudio-server stop

On a Mac install socat and xquartz:

brew install socat
brew install xquartz

Open Xquartz:

open -a Xquartz

Then navigate to XQuartz > Preferences > Security and tick the box 'Allow connections from network clients'.

Check your ip address:

IP=$(ifconfig en0 | grep inet | awk '{ print $2 }')

Start socat:

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

an then start the container by adding the -e DISPLAY=${IP}:0 argument.

Complete example call:

IP=$(ifconfig en0 | grep inet | awk '{ print $2 }') && \
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" & \
docker run -d -e DISPLAY=${IP}:0 -p 8787:8787 -p 8888:8888 \
-v ~/py2cy-container:/home/mpiage --name py2cy-container \
-it mpgagebioinformatics/py2cytoscape:latest

User: mpiage

Pass: bioinf

Citing

Ono, K. et al. (2015) CyREST: Turbocharging Cytoscape Access for External Tools via a RESTful API. F1000Res, 4, 478

Note to repository maintainers: Please *DO NOT* move this page ... the Cytoscape Automation paper refers directly to it.