File: ABOUT.rst

package info (click to toggle)
python-bioblend 0.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 800 kB
  • sloc: python: 5,195; sh: 217; makefile: 139
file content (60 lines) | stat: -rw-r--r-- 2,314 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
`BioBlend <http://bioblend.readthedocs.org/>`_ is a Python library for
interacting with `CloudMan`_ and `Galaxy`_'s API.

BioBlend is supported and tested on:

- Python 2.6, 2.7, 3.3 and 3.4
- Galaxy release_14.02 and later.

Conceptually, it makes it possible to script and automate the process
of cloud infrastructure provisioning and scaling via CloudMan, and
running of analyses via Galaxy. In reality, it makes it possible to do
things like this:

- 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)

- Interact with Galaxy via a straightforward API::

    from bioblend.galaxy import GalaxyInstance
    gi = GalaxyInstance('<Galaxy IP>', key='your API key')
    libs = gi.libraries.get_libraries()
    gi.workflows.show_workflow('workflow ID')
    gi.workflows.run_workflow('workflow ID', input_dataset_map)

- Interact with Galaxy via an object-oriented API::

    from bioblend.galaxy.objects import GalaxyInstance
    gi = GalaxyInstance("URL", "API_KEY")
    wf = gi.workflows.list()[0]
    hist = gi.histories.list()[0]
    inputs = hist.get_datasets()[:2]
    input_map = dict(zip(wf.input_labels, inputs))
    params = {"Paste1": {"delimiter": "U"}}
    wf.run(input_map, "wf_output", params=params)

.. note::
    Although this library allows you to blend these two services into
    a cohesive unit, the library itself can be used with either
    service irrespective of the other. For example, you can use it to
    just manipulate CloudMan clusters or to script the interactions
    with an instance of Galaxy running on your laptop.

.. References/hyperlinks used above
.. _CloudMan: http://usecloudman.org/
.. _Galaxy: http://usegalaxy.org/
.. _Git repository: https://github.com/afgane/bioblend