Skip to content

PC2Client

Igor Rodchenkov edited this page Jun 17, 2017 · 9 revisions

Introduction

We develop a convenient Java client (cPath2 client) for the new PC web services to use in other projects, such as in Cytoscape apps, to quickly start exploring and querying the integrated PC BioPAX L3 database. Besides, we are forcing anyone to use this client only; feel free to develop a simpler and or more specific one.

Goals

To develop a swiss-army-knife Java client for the cPath2 web services (BioPAX Level 3). To make it provide a convenient fluent query API, reasonable defaults, and documentation.

Details

Backlog

Requirements Priority Size/Complexity
Basic programmatic access to all cPath2 atomic commands and parameters (without processing the results, not adding layers of data interpretation) medium small/normal
Advanced access/analysis on top of cPath2 (post-process results; built-in complex queries (series of server calls); FAQ use-cases queries, e.g., search that includes guessing, id-mapping, data inference/merging, etc.) medium large/complex
Easy get to (PC) BioPAX L3 data using Paxtools library (for tests/examples/docs) high medium/moderate
Accessing cPath2 resources from the new Cytoscape plugin/app high medium/complex

Note: the latest, stateless client class, is CPathClient, whereas CPath2Client is the deprecated one (stateful, had problems with HTTP redirects).

Usage

auto-generated documentation

//using the Pathway Commons cPath2 web service URL (default):
CPathClient client = CPathClient.newInstance();
// then, result=client.create*Query()...result() or ...stringResult(format), etc.

in a Maven project, add to the pom.xml the following:

            <repositories>
	        <repository>
		    <id>ossrh</id>
		    <name>OSSRH Repository</name>
		    <url>https://oss.sonatype.org/content/groups/public/</url>
	        </repository>
            </repositories>
            <dependencies>
                <dependency>
                        <groupId>pathwaycommons.cpath</groupId>
                        <artifactId>cpath-client</artifactId>
                        <version>6.1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.biopax.paxtools</groupId>
                        <artifactId>paxtools-core</artifactId>
                        <version>4.3.1-SNAPSHOT</version>
                </dependency>
            </dependencies>

See also:

Alternatively, one can add the cpath-client fat jar with dependencies to a Java (or JPype) project: grab the latest fat-jar (from here).

Other/Links

Clone this wiki locally