Class Index | File Index

Classes


Class Biojs.PsicquicGraph


Version 1.0.0_beta.

Extends Biojs.

Defined in: Biojs.PsicquicGraph.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Graph display of molecular interactions using PSICQUIC.
Field Summary
Field Attributes Field Name and Description
<inner>  
Array containing the supported event names
<inner>  
opt
Default values for the options
Method Summary
Method Attributes Method Name and Description
 
constructor(options)
Methods borrowed from class Biojs:
addListener, extend, getId, listen, raiseEvent, removeListener, setEventHandlers, setOptions
Class Detail
Biojs.PsicquicGraph(options)
Graph display of molecular interactions using PSICQUIC.
Author: José Villaveces.
var instance = new Biojs.PsicquicGraph({
     target: "YourOwnDivId",
	    psicquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
		proxyUrl: '../biojs/dependencies/proxy/proxy.php',
     query: 'species:human?firstResult=0&maxResults=100',
     cyoptions: {
         style: cytoscape.stylesheet().selector('node').css({
             'content': 'data(id)',
             'font-family': 'helvetica',
             'font-size': 14,
             'text-outline-width': 3,
             'text-outline-color': '#888',
             'text-valign': 'center',
             'color': '#fff',
             'width': 'mapData(weight, 30, 80, 20, 50)',
             'height': 'mapData(height, 0, 200, 10, 45)',
             'border-color': '#fff'
           }).selector(':selected').css({
             'background-color': '#000',
             'line-color': '#000',
             'target-arrow-color': '#000',
             'text-outline-color': '#000'
          }).selector('edge').css({
             'width': 2
          }),
         layout: {
               name: 'circle',
               fit: true, // whether to fit the viewport to the graph
               ready: undefined, // callback on layoutready
               stop: undefined, // callback on layoutstop
               rStepSize: 10, // the step size for increasing the radius if the nodes don't fit on screen
               padding: 30, // the padding on fit
               startAngle: 3/2 * Math.PI, // the position of the first node
               counterclockwise: false // whether the layout should go counterclockwise (true) or clockwise (false)
           },
           ready:function(){
               var cy = this;
               cy.nodes().click(function(e){
                   console.log(e.cyTarget.id());
               });
           }
     }
});
Parameters:
{Object} options
An object with the options for this component.
Options detailed:
{string} target
id of the div where the component should be displayed
{string} psicquicUrl
url of the PSICQUIC server to query.
{string} proxyUrl
url of the proxy to use.
{string} query
MIQL query.
{Object} cyoptions
cytoscapejs inititlization options more info here
Requires:
jQuery 1.7.2
Cytoscape.js (latest version strongly suggested)
Field Detail
<inner> eventTypes
Array containing the supported event names

<inner> opt
Default values for the options
Method Detail
constructor(options)
Parameters:
options

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Apr 17 2014 17:42:43 GMT+0100 (BST)