Galaxy API.

Slides:



Advertisements
Similar presentations
Martin Senger [using also few slides from the presentations from the Galaxy Developers Conference 2011]
Advertisements

Cloudmesh Resource Shifting 1 2. Cloudmesh: from IaaS(NaaS) to Workflow (Orchestration) Workflow Virtual Cluster Components Infrastructure iPython (Pegasus)
Tina design review Main design decisions. Top level modules. Responsibilities. Phases A & B. Test plan. Time table.
ATS8500 Remote Service Solution
User Group 2015 Version 5 Features & Infrastructure Enhancements.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Lecture 8 – Platform as a Service. Introduction We have discussed the SPI model of Cloud Computing – IaaS – PaaS – SaaS.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik University of Manchester materials by Dr Katy Wolstencroft and Dr Aleksandra.
Building service testbeds on FIRE D5.2.5 Virtual Cluster on Federated Cloud Demonstration Kit August 2012 Version 1.0 Copyright © 2012 CESGA. All rights.
Extending the Discovery Environment: Tool Integration and Customization.
LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:
PRESENTED BY: K2 blackpoint Fundamentals Module 1: Understand J SCOTT PITMAN –
WEB API: WHY THEY MATTER ECOL 453/ Nirav Merchant
Geospatial Technical Support Module 2 California Department of Water Resources Geospatial Technical Support Module 2 Architecture overview and Data Promotion.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
Leveraging ArcGIS Online Elevation and Hydrology Services
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
1 Taverna CISTIB Ernesto Coto Taverna Open Workshop, October 2014.
A FIRST TOUCH ON NOSQL SERVERS: COUCHDB GENOVEVA VARGAS SOLAR, JAVIER ESPINOSA CNRS, LIG-LAFMIA, FRANCE
Facebook API Kelly Orser. Client Libraries Client libraries will simplify the calls to the platform by reducing the amount of code you have to write.
Grid Computing Environment Shell By Mehmet Nacar Las Vegas, June 2003.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
IPG2P Steering Committee January 25, CI Development Update Feb 2011 – next release – API function and Job Execution Paves way for user-led analysis.
Extending the Discovery Environment: Tool Integration and Customization.
INFN OCCI implementation on Grid Infrastructure Michele Orrù INFN-CNAF OGF27, 13/10/ M.Orrù (INFN-CNAF) INFN OCCI implementation on Grid Infrastructure.
Galaxy in Production Nate Coraor Galaxy Team Penn State University.
Use Outlook Task API to access tasks stored on user’s mailbox. These REST API’s are  Simple to use.  Supports CRUD.  JSON structured.  OAuth 2.0.
Esri UC 2014 | Technical Workshop | Administering ArcGIS for Server with Python Jon Bodamer.
Real-Time Dashboards on Power BI
Bluemix for Domino Developers Niklas Heidloff, heidloff.net.
Portlet Development Konrad Rokicki (SAIC) Manav Kher (SemanticBits) Joshua Phillips (SemanticBits) Arch/VCDE F2F November 28, 2008.
Transportation Agenda 19. Transportation Your Role: Designer Designers organize SharePoint content and determine how to display that content Typical tasks.
Developers Introduction to the Power BI Platform.
Luis Gomez, Principal SW Test Engineer, Brocade
Join the Community
Call to Action To increase market adoption of oneM2M, more publically available CSEs, AEs, tools and guides are needed for developers and systems integrators.
HP Operations Orchestration
ArcGIS Workflow Manager: Advanced Workflows and Concepts
NTP, Syslog & Secure Shell
Getting Started with Plot.ly
Node.js Express Web Applications
Changing How You Reverse Engineer
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Node.js Express Web Services
Platform as a Service.
DATA MINING Python.
Applied Cyber Infrastructure Concepts Fall 2017
Automated Automation of REST APIs
Integration of Singularity With Makeflow
New Mexico State University
Tableau Overview  Tableau is widely used data visualization and BI tool. Tableau is simple to use and has extensive visualization capability that make.
Enterprise Integration: Workflow
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
ModelBuilder for Beginners
20409A 7: Installing and Configuring System Center 2012 R2 Virtual Machine Manager Module 7 Installing and Configuring System Center 2012 R2 Virtual.
OpenStack-alapú privát felhő üzemeltetés
Dovetail & CVP Tutorial/Demo
In this session… Introduce what we’re talking about
Testing RESTful Web APIs
Hyperledger Fabric and Composer Install
ARCHITECTURE OVERVIEW
Storing and Accessing G-OnRamp’s Assembly Hubs outside of Galaxy
RESTful Web Services.
Configuration management suite
Python Crash Course CSC 576: Data Science.
Python and REST Kevin Hibma.
Informer 5 API How to get connected and start integrating
Presentation transcript:

Galaxy API

Galaxy's REST Overview Uses generated API keys for per-user authentication No username/password No credential caching, yet (so not really REST) Request parameters and responses are in JSON (JavaScript Object Notation) Maintains security Enable with enable_api = True in config (enabled by default)

API Interactions with Galaxy python lib: blend JavaScript lib $GALAXY_HOME/scripts/api Galaxy’s REST API Galaxy

Bare Bones Galaxy API create (POST) display (GET) update (PUT) delete (DELETE)

Making the Calls Wrapper methods exist (in /scripts/api/) to make the API calls easier: ./{action}.py <api key> http://<ip>/api/{module}/[unit] [args] action: create | display | update | delete api_key: obtained from the UI module: datasets | forms | histories | libraries | permissions | quotas | requests | roles | samples | tools | users | visualizations | workflows unit: dataset_id / history_id / library_id / … args: name / key-value pair / …

Install a few things in the VM sudo apt-get install gnome-terminal ipython python-pip

Hands on time

Create an API script; script for auto data move Workshop tasks Run a workflow Create an API script; script for auto data move curl Galaxy

blend A python library for interacting with Galaxy’s API And CloudMan

Automate repetitive tasks Request compute infrastructure Manipulate compute infrastructure Upload data and run analyses Docs and examples Automate repetitive tasks Test Distribute

Docs and examples included http://blend.readthedocs.org/

Install blend $ sudo pip install blend-lib $ ipython

Working with Galaxy’s API from blend.galaxy import GalaxyInstance gi = GalaxyInstance(‘Galaxy IP', key=‘API key') gi.libraries.get_libraries() w = gi.workflows.get_workflows()[0] gi.workflows.show_workflow(w[‘id’]) gi.histories.get_histories(name=’Unnamed history’)

Running an analysis Create a data library and upload some data into it Create a history Execute a workflow

from blend.galaxy import GalaxyInstance # Define a connection to an instane of Galaxy gi = GalaxyInstance('http://127.0.0.1:8085', 'c18666899798c5ad233c511cd2d66c2d') # Create a data library l = gi.libraries.create_library(’WS6') # Uload some data to the data library d1 = gi.libraries.upload_file_from_url(l[0][‘id’], ‘http://tinyurl.com/gcc-exons’) d2 = gi.libraries.upload_file_from_url(l[0][‘id’], 'http://tinyurl.com/gcc-snps’) # Create a history gi.histories.create_history(’Run 6') # Get information on how to run a workflow ws = gi.workflows.get_workflows() w = gi.workflows.show_workflow(ws[0]['id']) # {u'id': u'93ab6bbd094e1dcd', # u'inputs': {u’1': {u'label': u'Input Dataset', u'value': u''}, # u’3': {u'label': u'Input Dataset', u'value': u''}}, # u'name': u’Demo workflow', # u'url': u'/api/workflows/93ab6bbd094e1dcd'} dataset_map = {‘1’: {'id':d1[0][‘id’], 'src':'ld'}, ‘3’: {'id’:d2[0][‘id’], 'src':’ld'}} wr = gi.workflows.run_workflow(w[‘id’], dataset_map, h[‘id’]) hl = gi.histories.get_histories() gi.histories.show_history(hl[0][‘id’], contents=True)

Blend’s state: public comment Blend wraps Galaxy’s existing API It does not add any functionality but simply exposes it as a python library About half of Galaxy’s API have been wrapped What’s not yet there is the sequencer integration & forms API Read the docs: blend.readthedocs.org