dotasek / cy-ndex-2

CyNDEx 2: Chromium-based Cytoscape client app for the NDEx database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CyNDEx-2

The NDEx client App for Cytoscape

Introduction

This is an Electron-based hybrid App for Cytoscape. You can search, import, and save NDEx networks from Cytoscape.

For Users

How to Install

Just like other Cytoscape apps, you can install this from the Cytoscape App Store or directly from the file. All of the required files will be installed automatically.

Note: JXBrowser

Once you install the app from the App Store, the CyNDEx2 searchbox will be available in the query dropdown (Cytoscape 3.6+). JXBrowser is used to open the search window, and can cause issues when the app is updated or uninstalled. If JXBrowser fails to start, the search entry field will be disabled and a restart is required.

Uninstall CyNDEx-2

To uninstall CyNDEx-2 completely from your machine, you need to follow these steps:

  1. Uninstall the app from App menu
  2. Open CytoscapeConfiguration directory
  3. Remove the following files/directories:
    • cyndex-2 directory
    • ndex-electron-2.x.x directory
    • ndex-installed-2.x.x.txt file
    • Mac users - remove ~/Library/Application Support/CyNDEx-2 directory
    • Windows user - remove %AppData%/Roaming/CyNDEx-2 directory

How to Use CyNDEx-2

(TBD)

For Developers

This app provides user interface for NDEx, and it uses REST API provided via CyREST. You can use CyREST-2 endpoints from tools of your choice, including Jupyter Notebook.

REST API Document

The REST endpoints are provided via CyREST 3.5.0 or newer. From CyREST version 3.5, it provides complete API documentation a using Swagger. Please select Help→Automation→CyREST API to open the Swagger API document.


(TBD)

How to Build the App

This application consists of the three parts:

  1. NDEx Client for Java
  2. Cytoscape Java App
  3. Electron dialog
  4. JavaScript front-end

NDEx Client for Java

This is an official Java client maintained by the NDEx team.

Cytoscape Java App

This is the code for the actual Cytoscape app.

This application consists of two parts:

  1. Electron web application
  2. Cytoscape app written in Java
mvn clean install

Install

(TBD)

New: CyREST API

This app adds new endpoints to Cytoscape and you can use them to programmatically access some of the features of this application.

Endpoints

Root of this API is http://localhost:1234/ndex/v1.

Port number depends on your rest.port Cytoscape property setting.

GET /

Show status of the App

Sample response
{
  "apiVersion": "v1",
  "appName": "CyNDEx-2",
  "appVersion": "2.0.0"
}

GET /networks/current

Returns summary of the current network.

Sample response
{
  "currentNetworkSuid": 25230,
  "currentRootNetwork": {
    "suid": 36,
    "name": "MyCollection1",
    "props": {
      "name": "MyCollection1",
      "SUID": 36,
      "selected": false
    }
  },
  "members": [
    {
      "suid": 52,
      "name": "BIOGRID-ORGANISM-Caenorhabditis_elegans-3.4.129.mitab",
      "props": {
        "shared name": "BIOGRID-ORGANISM-Caenorhabditis_elegans-3.4.129.mitab",
        "__Annotations": [],
        "name": "BIOGRID-ORGANISM-Caenorhabditis_elegans-3.4.129.mitab",
        "SUID": 52,
        "selected": false
      }
    },
    {
      "suid": 25230,
      "name": "galFiltered.sif",
      "props": {
        "shared name": "galFiltered.sif",
        "__Annotations": [],
        "name": "galFiltered.sif",
        "SUID": 25230,
        "selected": true
      }
    }
  ]
}

POST /networks

Create new network from an NDEx entry.

Request body
{
    "uuid": "0268f115-b021-11e6-831a-06603eb7f303",
    "serverUrl": "http://www.ndexbio.org/v2",
    "userId": "myid",
    "password": "mypassword"
}
  • uuid - UUID of the NDEx network
  • serverUrl - URL of the NDEx API server
  • userId - (Optional) NDEx user ID for loading private network
  • password - (Optional) NDEx password for loading private network
Sample response
{
  "suid":52,
  "uuid":"b5cb599b-ae23-11e6-831a-06603eb7f303"
}

POST /networks/SUID

Upload a Cytoscape network to NDEx server specified by the caller.

Request body
{
  "isPublic": false,
  "userId": "myid",
  "password": "mypw",
  "serverUrl": "http://www.ndexbio.org/v2",
  "metadata": {
    "ndex.description": "Sample description from Cytoscape",
    "name": "Network name updated via rest",
    "ndex.species": "human"
  }
}
Sample response
{
  "suid":3320,
  "uuid":"4a23aef0-2ba5-11e7-8f50-0ac135e8bacf"
}

POST /networks/current

Utility function to upload current networks to NDEx. It actually calls POST /networks/SUID where SUID is the current network's SUID.

(same as above)

PUT /networks/SUID

Update the existing NDEx entry.

(TBD)

License

MIT

Components

CyNDEx2 uses JxBrowser http://www.teamdev.com/jxbrowser, which is a proprietary software. The use of JxBrowser is governed by JxBrowser Product License Agreement http://www.teamdev.com/jxbrowser-licence-agreement. If you would like to use JxBrowser in your development, please contact TeamDev.

(Please don't remove this notice)

About

CyNDEx 2: Chromium-based Cytoscape client app for the NDEx database

License:MIT License


Languages

Language:Java 68.6%Language:Jupyter Notebook 31.4%