-
Notifications
You must be signed in to change notification settings - Fork 5
PC2Client
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.
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.
| 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).
//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:
- the project's tests can be used as example;
- more client.create* examples [here] (http://github.com/PathwayCommons/CyPath2/blob/master/src/main/java/org/pathwaycommons/cypath2/internal/CyPC.java);
- example pom.xml (ignore OSGi and Cytoscape specifics if you are not making a Cytoscape 3 app);
Alternatively, one can add the cpath-client fat jar with dependencies to a Java (or JPype) project: grab the latest fat-jar (from here).