Team:Freiburg software/Project

From 2009.igem.org

Revision as of 14:31, 18 October 2009 by Davidn (Talk | contribs)

Contents

Introduction

Motivation

Google Wave

Google Wave is "a personal communication and collaboration tool" developed by Google. It is a web-based service, computing platform, and communications protocol designed to merge e-mail, instant messaging, wikis, and social networking. It has a strong collaborative and real-time focus and provides several ways to extend its functionality.

Wave basically consists of an open communication protocol similar to email, and client and server-software. Like Email, the protocol aims to be open, decentralized and easy to adapt, but includes modern achievements like real-time-communication and rich formated text with embedded data as well. At the moment, the only working server and client software for Wave is also written by Google, but with the protocol being open-source already, other - Google independent - servers and clients will soon be available.

Practically a typical Wave-conversations - called a wavelet - normally works like this: User Alice creates a new Wavelet. She than invites his friend Bob to join the conversation. Bob accepts and can now write Messages to the wave. Each message creates a so called Blip. What differentiates Wave from normal instant-messaging is, that if Alice and Bob decide to write an Document together, they can start to edit the same Blip together. Each change they make to the text there is shown to the other on in real time. If they want, they can also use a build-in playback feature similar to the version-history in wikis to review the changes made to the wavelet.

Additional Google has published an API for writing so called Robots and Gadgets for Wave. While Robots are small programs written in Python or Java, which can participate in Wave similar to normal users, Gadgets are small Webpages that can be embedded into a wave-conversation.

That makes Google Wave quite interesting for Systemic Biology: Synthetic biologist work with text most of the time, Google Wave is made for working with text, synthetic biologist need to work together in order to create artificial sequences, protein and later maybe hole genomes, Google Wave is made for working together, synthetic biologist need automated features for their work, Wave offers them via robots.

BioJava

[http://www.biojava.org BioJava] is an open source project dedicated to providing a [http://http://www.java.sun.com Java] framework for processing biological data. It provides analytical and statistical routines, parsers for common file formats and allows the manipulation of sequences and 3D structures. The goal of the [http://www.biojava.org BioJava] project is to facilitate rapid application development for bioinformatics.

Using the scalable, cross-platform, network-aware power of Java technology, researchers at Great Britain's famed Sanger Institute for genetic study have spawned [http://www.biojava.org BioJava]--an open-source project dedicated to providing genomic researchers with a Java technology-based developer's toolkit.

[http://www.biojava.org BioJava] offers bioinformatics developers over 1200 classes and interfaces for manipulating genomic sequences, file parsing, CORBA interoperability, and more. The facility is already being used at major research and pharmaceutical centers, and in over 85 countries around the world.

Why BioJava ?

There are three major frameworks for processing biological data: BioPerl, [http://www.biojava.org BioJava] and [http://biopython.org/wiki/Main_Page BioPhyton].

As google wave provides developer APIs both for the Java and the Phyton programming language, there was the decision between [http://www.biojava.org BioJava] and [http://biopython.org/wiki/Main_Page BioPhyton].

Why we have choosen the [www.biojava.org BioJava] framework:

[http://www.biojava.org BioJava] has grown tremendously since its beginnings. The most recent site statistics show 1,264 public classes and interfaces, with over 200,000 lines of code, and over 14 people regularly contributing to the code. This huge amount of features are summarized and classified in only about 15 interfaces, so they are really simple and intuitively in use.

[http://www.biojava.org BioJava] provides objects for all kind of synthetic biologists needs, which there are:

  • Basic manipulation of sequences, like translations, building complements and doing multiple sequence alignments.
  • Viewing sequences in different formats, like feature added sequence presentations and circular views.
  • Import and export sequence data in different file formats.
  • Accessing databases like BioSQL and [http://www.ensembl.org Ensembl].

Unlike [http://biopython.org/wiki/Main_Page BioPhyton], [http://www.biojava.org BioJava] is relatively fast and better suitable for greater applications and the amounts of data.

Concept

Our concept is to create a collaborative software suite called SynBioWave for synthetic biology purpose. SynBioWave is a Google Wave extension using BioJava to add synthetic biology functionality, giving synthetic biological research access to the collaborative and interactive web 2.0.

SynBioWave makes use of Wave's powerful communication and collaboration functionality and is designed to be be easily extended with new synthetic biology functionality. Mashing up the reinvention of the email with a major library for processing synthetic biology data, raises science collaboration to a new level.

Our small team of three developers will not be able to create a full-value synthetic biology software by iGEM Jamboree 2009. Our goal is to lay the foundation for a robust software suite and to implement some basic synthetic biological functionality.

SynBioWaves' key features

  • open source, free web application accessible from every computer connected to the internet
  • strong communication and collaboration functionality
  • basic synthetic biology functionality
  • easy to extended with additional synthetic biology functionality

The road to success

For addressing a wide audience of users and contributers, SynBioWave is published under a free licence. This will attract other developers creating new functions or modify the software for their own purpose.

One of the key goals of SynBioWave is the feature of easy-extendibility. We want to create a framework that allows other developers to contribute new biosynthetic functionality with a minimum knowledge of Wave development. For this purpose SynBioWave offers a abstract Robot Class which can be regarded as a template for biosynthetic functions. This concept has very nice side-effect: SynBioWave can be easily customized by adding and removing robots which represent certain function.

SynBioWave will not only be a simple mashup, a synthetic biological software running inside a wavelet. It will be a perfect symbioses of Wave and BioJava. The look and feel of SynBiowave will perfectly fit in the Wave concept. Waves real-time-editing, multi-user-editing functions as well as the playback function must work in harmony with SynBioWave. This sounds quite trivial. But looking at the current Wave extensions gives reason to be concerned about this.

Benefits of the symbioses

Building SynBioWave as mashup of Wave and BioJava brings up certain benefits:

  • no need for building the whole application from scratch
  • get the communication and collaboration features for nothing (wave)
  • get multi-user editing for nothing (wave)
  • get real-time editing for nothing (wave)
  • as a web application, SynBioWave can be accessed from any computer connected to the internet.
  • get many key bio features for nothing (biojava)
  • robust and high quality software basis
  • As Google's latest child, wave is going to be talked of a lot. As one of the first application using google wave, SynBioWave has probably a huge audience

challenge and difficulties

  • With the begin of SynBioWave's development, wave is in a very unstable Alpha version available. Even the API is still weak and might change. There is not much documentation and discussion yet.
  • developing a collaborative web application faces programmers special challenges and difficulties. For example, multi-user editing and real-time editing issues the challenge of synchronisation user input. What happens, for example, if two user submit contrary input at the same time?

The Software

Architecture

SynBioWave is a Google Wave extension, turning Wave into a biosynthetic Software Suite. There are currently two available methods of extending Google Wave (See Team:Freiburg_software/Project#Google_Wave for an introduction):

  1. Robots
  2. Gadgets

We are making use of both!

Robots

Robots are automated participants, able to modify the wavelets' contents they have joined and interact with real participants. Using Google's Java Client library for Robots gives us the possibility to implement biosynthetic functionality provided by the BioJava library. The SynBioWave Robot can be regarded as the core of our extension. Adding this robot to a wavelet activates SynBioWave. There are additional robots for specific functions, which can added to a wavlet to activate this certain function. The SynBioWave Robot is responsible for:

  • Organization of all SynBioWave functions represented by additional robots
  • extending Wave's user Interface with SynBioWave specific elements using the qooxWave protocolo
  • Providing basic functionality like
    • Import/export of sequences
    • Rendering and displaying of sequences
    • Circular view
    • BioBrick communication (searching and importing biological parts)

Additional robots extending SynBioWave functionality To extend SynBioWave with new biosynthetic functions, one can use additional robots. Adding such a robot to an active SynBioWave wavelet (a wavelet that contains the SynBioWave Robot), enables this function to all users participating in this wave. For SynBioWave users it is very easy to customize and extend SynBioWave. A User searches the robot representing a certain function and adds it to the wavelet he is working with. But this is not the only benefit! This modular architectures makes it very easy for other developers to create additional robots. To facilitate contribution, we provide an abstract SynBioWave Template robot.

qooxWave protocol

The qooxWave protocol is introduced to realise an easy to use interface for creating graphical user interfaces (GUI) inside a wave from a robot. The general goal is to provide one abstract robot class for implementing new function into SynBioWave (each function is provided by a robot; see ...). The programmer who uses this class does not need to worry about the client side GUI implementation. This protocol ensures some easy to use server side function, that automatically build the client side GUI.

The protocol defines a a server-to-client and client-to-server communication. This communication contains

  • a server to client communication for building client-side GUI elements from server side (so a server side robot can create a client side button for example)
  • a client to server communication for reporting events in the client side GUI (so the server knows when the user clicks a button for example)

The communication is realised via JSON-Strings that are stored inside a gadgets state object. Both, server (robot) an client (gadget) can access the state object and they can both react on changes of this state object (this is provided by the google wave API).

Building a GUI - Server to Client Communication

The JSON-object for building a GUI is stored as a String in wave.getState().get("ui.structure") and defined as follows:

{ 'type' : 'ui', 'subitem' : ITEMLIST} where ITEMLIST is associative Array with ids as keys and ITEM objects as values:

  { 'mySubitemId1' : ITEM, 'mySubitemId2' : ITEM, ...}

where ITEM is of the form

  {
    'label' : STRING <i>label</i>,
    'type' : ENUM('toolbar', 'button', 'menu', 'checkbox', 'radio', 'label', 'form') [,
    'subitem' : ITEMLIST ] 
  }

This protocol has a recursive structure. Each item can have an itemlist as subitem. This provides a basis for creating complex menus, forms and ui elements. The type specifies the element. We will extend the available types from time to time. Have a look at Team:Freiburg_software#Item_Structure for the available types and which combinations are allowed.

Item Structure

This section gives an overview of the available types for the items described above. It also depends on the type which other keys can be used for the object and which types are allowed for the subitem list.

  • 'type' : 'ui'
    • available keys:
    • available subitem types: toolbar, menu, button, checkbox, form, label
  • 'type' : 'toolbar'
    • available keys: subitem
    • available subitem types: button, checkbox, menu
  • 'type' : 'menu'
    • available keys: label, subitem
    • available subitem types: button, checkbox, menu
    • submits event/data: TODO
  • 'type' : 'button'
    • available keys: label
    • available subitem types: -
    • submits event/data: TODO
  • 'type' : 'checkbox'
    • available keys: label, value (true|false)
    • available subitem types: -
    • submits event/data: TODO
  • 'type' : 'radio'
    • available keys: label, value (true|false), group (to group radio items to one radiogroup)
    • available subitem types: -
    • submits event/data: TODO
  • 'type' : 'label'
    • available keys: label
    • available subitem types: -
  • 'type' : 'form'
    • available keys: label, subitem
    • available subitem types: textfield, textarea, checkbox, radio, upload, download
    • submits event/data: many, especially on uploads, downloads | TODO
  • 'type' : 'textarea'
    • available keys: label, value
    • available subitem types: -
  • 'type' : 'textfield'
    • available keys: label, value
    • available subitem types: -
  • 'type' : 'upload'
    • available keys: label, target
    • available subitem types: -
    • submits event/data: TODO | submitted, completed
  • 'type' : 'download'
    • available keys: label, target
    • available subitem types: -
    • submits event/data: TODO | ?

Freiburg software qooxwave protocol flowchart.png

Building GUI Events - Client to Server Communication

The JSON-object for submitting a GUI-Event from client to server is stored as a String in wave.getState().get("ui.idofelemt") and defined as follows: ...

Example of qooxWave

{'type':'ui','label':'ui','subitem':{'0':{'type':'toolbar','label':'toolbar','subitem': {'0':{'type':'menu','label':'DNA','subitem':{'0':{'type':'menu','label':'Import','subitem': {'0':{'type':'button','label':'from File'},'1':{'type':'button','label':'from Database'}}},'1': {'type':'button','label':'Translate'},'2':{'type':'button','label':'Rev-Complement'}}},'1': {'type':'menu','label':'Protein','subitem':{'0':{'type':'button','label':'Import'},'1': {'type':'button','label':'Export'},'2':{'type':'button','label':'Backtranslate'}}},'2': {'type':'button','label':'Titel3'},'3':{'type':'button','label':'Titel4'}}}}} The above JSON-String creates the following GUI:
Freiburg software qooxwave qooxwave-1.png

iGEM Release

Road-map

Guids

User-guide

Developer-guide