BioBlend

From BioUML platform
Jump to: navigation, search
BioBlend structure

BioBlend is a unified API in Python that wraps the functionality of Galaxy and CloudMan APIs [1].

Automated installation of BioBlend is available via PyPI (e.g. pip install bioblend).

The library has been tested and is working on Linux, Macintosh and Windows-based systems.

There is Java version blend4j, but it supports only Galaxy API. https://github.com/jmchilton/blend4j

Links:

CloudMan examples

Create a CloudMan compute cluster, via an API and directly from your local machine:

from bioblend.cloudman import CloudManConfig
from bioblend.cloudman import CloudManInstance
cfg = CloudManConfig('<your cloud access key>', '<your cloud secret key>', 'My CloudMan',  'ami-<ID>', 'm1.small', '<password>')
cmi = CloudManInstance.launch_instance(cfg)
cmi.get_status()

Reconnect to an existing CloudMan instance and manipulate it:

from bioblend.cloudman import CloudManInstance
cmi = CloudManInstance("<instance IP>", "<password>")
cmi.add_nodes(3)
cluster_status = cmi.get_status()
cmi.remove_nodes(2)

Implementation details

BioBlend uses REST protocol to Interact with Galaxy and CloudMan.

For example,

REST call: http://main.g2.bx.psu.edu/api/histories/0a7b7992a7cabaec?key=123456789abcdef10

Returns JSON:

{ 'id': '0a7b7992a7cabaec',
  'name': 'Output history',
  'state_details': { 'discarded': 0, 
                     'empty': 0, ......

In BioBlend it becomes Python:

GalaxyInstance.histories.show_history('0a7b7992a7cabaec')

Returns corresponding Python dictionary

{ 'id': '0a7b7992a7cabaec',
  'name': 'Output history',
  'state_details': { 'discarded': 0,
                     'empty': 0, .....

References

Error fetching PMID 23630176:
  1. Error fetching PMID 23630176: [Sloggett2013]

http://bib.irb.hr/datoteka/627609.PUBLISHED_BioBlend.pdf

Personal tools
Namespaces

Variants
Actions
BioUML platform
Community
Modelling
Analysis & Workflows
Collaborative research
Development
Virtual biology
Wiki
Toolbox