wikipathways / wikipathways2ndex

Convert WikiPathways content to CX and export to NDEx.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wikipathways2ndex

Convert pathways from WikiPathways to CX format and export to NDEx.

Installation

Just install Nix. Then when you run ./export.R the first time, all required dependencies will be installed for you.

Usage

  1. Clone and enter this repo:
git clone https://github.com/wikipathways/wikipathways2ndex.git
cd wikipathways2ndex

Temporary: until the updated version (>= 3.3.7-7) of the WikiPathways app for Cytoscape is put into production, do this:

bash ./install_dev_wikipathways_app.sh
  1. Create an account at NDEx if you don't have one. Then set your NDEx username and password (perhaps in ~/.profile):
export NDEX_USER_UUID="userid-for-your-ndex-account"
export NDEX_USER="username-for-your-ndex-account"
export NDEX_PWD="password-for-your-ndex-account"

If you don't have permissions to edit the NDEx Network Sets specified in wikipathways2ndex.R, you'll need to change to one you can edit.

  1. Execute: ./export.R AnalysisCollection ndex ./output-dir

To see more options, run ./export.R --help

To put job running and detach:

screen -R
./export.R AnalysisCollection ndex ./output-dir
# Ctrl+a
# d

Now you can leave. To check up on the job and then close the screen:

screen -R
# look at what's going on. if the job is complete, you can kill the screen:
# Ctrl+a
# K

Alternative

If everything is installed but you don't want to use Nix, try this, but note it hasn't been fully tested:

  1. Disable the lines like system(paste0("(cd ", here("nix_rcy3/extras"), "; bash cytoscapestart.sh)")) in export.R
  2. Open Cytoscape
  3. Execute: ./export.R Rscript AnalysisCollection ndex ./output-dir

Development

Run tests: ./test/run.R

Further Details

We used xvfb-run as a dummy display to enable running Cytoscape in headless mode. Should we use something other than xvfb-run? xf86videodummy is maybe supposed to be the replacement for xvfb. nix-env -iA nixos.xorg.xf86videodummy It's also possible to use xpra like xvfb-run nix-env -iA nixos.xpra

Interesting example of using R or R in X.

About

Convert WikiPathways content to CX and export to NDEx.


Languages

Language:R 91.8%Language:Nix 4.2%Language:Shell 4.0%