Introduction to Cytoscape App Development

Overview

This step is designed to introduce you to Cytoscape App Development concepts and technology.

Cytoscape and OSGi

Cytoscape 3 design goals:

Definition of OSGi from Wikipedia:

"The OSGi framework is a module system and service platform for the Java programming language that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. Applications or components (coming in the form of bundles for deployment) can be remotely installed, started, stopped, updated, and uninstalled without requiring a reboot; management of Java packages/ classes is specified in great detail. Application life cycle management (start, stop, install, etc.) is done via APIs that allow for remote downloading of management policies. The service registry allows bundles to detect the addition of new services, or the removal of services, and adapt accordingly."

Important definitions:

Anatomy of a Bundle

A bundle is a JAR with extra metadata:

anatomyofabundle.png


Cytoscape 3 Architecture

Example: HelloWorld

Maven Project Layout

Core Bundles

Core Bundles usually come in sets:

Task bundles

VizMapper bundles

OSGi Services


Cytoscape API

Available as OSGi services. Two main types:

OSGi Services

Most common types of services:


Cytoscape TaskFactories

TO-DO: Insert graphic for Tasks

TaskFactories:

Cytoscape TaskFactory Properties:

Example

import org.cytoscape.work.AbstractTaskFactory; import org.cytoscape.work.TaskIterator; class MyTaskFactory extends AbstractTaskFactory {

super(); } public TaskIterator !createTaskIterator() {

} public boolean isReady() { return true; } }

in CyActivator MyTaskFactory myFactory = new MyTaskFactory(); Properties props= new Properties(); // Note the “.” notation for cascading menus props.setProperty(PREFERRED_MENU, "Apps.cddApp"); props.setProperty(TITLE, "Load CDD Domains for Node"); // Not all task factories will be commands props.setProperty(COMMAND, "loadCDDDomains4node"); props.setProperty(COMMAND_NAMESPACE, "cddApp"); props.setProperty(IN_MENU_BAR, "true"); // Usually means the second menu item props.setProperty(MENU_GRAVITY, "2.0"); registerService(bc, loadCDDDomainNodeView,

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux