developing apps: exposing your data through araport

29
araport.org Developing Apps: Exposing Your Data Through Araport Matt Vaughn Director, Life Sciences Computing Texas Advanced Computing Center [email protected] | @mattdotvaughn | www.slideshare.net/mattdotvaughn

Upload: matthew-vaughn

Post on 06-Aug-2015

72 views

Category:

Science


3 download

TRANSCRIPT

Page 1: Developing Apps: Exposing Your Data Through Araport

araport.org

Developing Apps: Exposing Your Data Through Araport

Matt Vaughn Director, Life Sciences Computing Texas Advanced Computing Center

[email protected] | @mattdotvaughn | www.slideshare.net/mattdotvaughn

Page 2: Developing Apps: Exposing Your Data Through Araport

araport.org

Overview

•  Why contribute to Araport?

•  How does one create a web service?

•  How does one build a Science App?

•  Commonly asked questions

•  What resources are available?

Page 3: Developing Apps: Exposing Your Data Through Araport

araport.org

Why become an Araport contributor?

• Recognition • Exposure •  Feedback •  Interoperability • Professional presentation • Reusability

Page 4: Developing Apps: Exposing Your Data Through Araport

araport.org

Araport: A Road Map

API.ARAPORT.ORG

CLI clients, Scripts, 3rd party

applications

Core Resources

AGAVE

apps

meta

files

profile

jobs systems

ADAMA manage

enroll

a b c d e f

Data Resources

API Types •  Query •  Map* •  Generic •  Pass-through

•  Single-sign on •  Metering •  Unified logging •  API versioning •  Automatic HTTPS + CORS

REST*

CGI

SOAP New Web Services

InterMine

Chado & Tripal

Computing

Storage Database

APPS

APIs

Page 5: Developing Apps: Exposing Your Data Through Araport

araport.org

HOW DOES ONE CREATE A WEB SERVICE?

Page 6: Developing Apps: Exposing Your Data Through Araport

araport.org

Araport Data and Microservice API

•  Implement REST-like web services •  Allow real-time integration with and transformation of

existing web-based services •  Promote interoperability

–  Simple, extensible controlled vocabulary for queries –  Responses can conform to common schemas* –  GLOBAL SEARCH

•  Solve some annoying problems –  Provide HTTPS + valid SSL certificate –  Enable Cross Origin Scripting Support (CORS) –  Implement authenticated access to services

•  BE EASY TO ADOPT, USE, AND MAINTAIN

Page 7: Developing Apps: Exposing Your Data Through Araport

araport.org

Case Study: TIGR Gene Expression Database

•  NSF Arabidopsis 2010 project (#0520022)

•  How to make this resource more broadly usable and useful? – Create modernized web

services – Build an interactive

science app

Page 8: Developing Apps: Exposing Your Data Through Araport

araport.org

Creating a new data service in 5 easy steps

8

•  Check out a template

•  Write and debug service locally

•  Write docs •  Describe data

sources

Push to GitHub*

Register new service using ADAMA

Test and refine the microservice

Share with colleagues or the public

Develop a Science App using APIs

Write Code

Upload Enroll @ Araport

Use it Share Make a Science

App

Page 9: Developing Apps: Exposing Your Data Through Araport

araport.org

Example Source Code

https://github.com/Arabidopsis-Information-Portal/

jcvi-qpcr-services

Shared code among services

ADAMA services have search and/or list functions

Implement some query logic

Make a request to the server

Transform result to JSON & send it back

Page 10: Developing Apps: Exposing Your Data Through Araport

araport.org

Example Metadata (1)

Who has contributed?

Basic display fields

Configuration fields and values

Page 11: Developing Apps: Exposing Your Data Through Araport

araport.org

Example Metadata (2)

Definitions for the service’s various parameters

What are the data sources (can be nested!)

Page 12: Developing Apps: Exposing Your Data Through Araport

araport.org

Creating a new data service in 5 easy steps

12

•  Check out a template

•  Write and debug service locally

•  Write docs •  Describe data

sources

Push to GitHub*

Register new service using ADAMA

Test and refine the microservice

Share with colleagues or the public

Develop a Science App using APIs

Write Code

Upload Enroll @ Araport

Use it Share Make a Science

App

Page 13: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (1)

•  Use the Araport API Explorer Home->Tools->Web Services->Community Data

•  Use the Javascript console

embedded in your browser

•  Manually via command line tools like cURL or httpie

Page 14: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (2)

More Information

Page 15: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (3)

Try this service

Page 16: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (4)

Every Araport web service is available via Javascript console

Data API namespace

Individual Data API

> Agave.api.adama.getNamespaces()

Page 17: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (5)

curl -X GET -sk -H "Authorization: Bearer 17f4700fb4ffa9ab32f1bf560e8a2b8" https://api.araport.org/community/v0.3/jcvi/image_by_id_v0.1/search?image_id=237 -O "237.png"

•  Perform a GET using an Araport-issued Oauth token to the image_by_id community service; Save the result to a file named 237.png

•  Every Araport-hosted web service can be used by scripts

•  We offer Javascript and Python code libraries available as well

Page 18: Developing Apps: Exposing Your Data Through Araport

araport.org

Using the new service (6)

BUILD A SCIENCE APP THAT CONSUMES IT

JCVI QPCR app integrates half a dozen web service APIs Some from the QPCR service itself, some from ThaleMine Araport is a mash-up engine for plant science data

Page 19: Developing Apps: Exposing Your Data Through Araport

araport.org

HOW DOES ONE BUILD A SCIENCE APP?

Page 20: Developing Apps: Exposing Your Data Through Araport

araport.org

5 Steps to Creating a Science App

Install tool chain (just

once)

Launch a new Science App (or clone an existing

one)

Interactively design and build your

app

Push to GitHub

Install @ Araport

then Publish!

Setup Create New Write Code

Upload Share

Page 21: Developing Apps: Exposing Your Data Through Araport

araport.org

Anatomy of a Science App Your assets live inside /app

Static HTML content for laying out the app

JavaScript functions defined for the app

Cascading Style Sheets (CSS) specific to the app

JavaScript dependencies automatically managed via Bower

https://github.com/Arabidopsis-Information-Portal/ATExpressionProfilingApp

Page 22: Developing Apps: Exposing Your Data Through Araport

araport.org

1,2,3 Development

•  Application generator for quickly bootstrapping application development $  yo  aip-­‐science-­‐app  $  grunt  

Page 23: Developing Apps: Exposing Your Data Through Araport

araport.org

Science Apps Workspace

Create custom workspaces containing

diverse public and private

Science Apps

Page 24: Developing Apps: Exposing Your Data Through Araport

araport.org

Science App Store

•  Developers can share apps privately during creation and testing

•  Request publication under My Account->My Apps

•  Araport staff will review the app and either publish it or make suggestions about how to improve it

Page 25: Developing Apps: Exposing Your Data Through Araport

araport.org

Commonly Asked Questions

•  How can I get credit or attribution if my app or data is served through Araport?

•  I have data type X - can I share it via Araport? •  Can I keep my work private or shared with only select

people? •  Can someone publish malicious code at Araport? •  What if my Science App needs to compute on data,

not just access a database? •  Can you help me learn to write web services and

Science Apps?

Page 26: Developing Apps: Exposing Your Data Through Araport

araport.org

Community Support

www.araport.org/devzone

Register to become an Araport developer

Join our developer calls

Explore tutorials, example code, & documentation

Learn about our 2015 Fall Developer Workshop

Page 27: Developing Apps: Exposing Your Data Through Araport

araport.org

[email protected]

https://www.araport.org/contact

@araport

Page 28: Developing Apps: Exposing Your Data Through Araport

araport.org

The Road Ahead Science Apps •  Improved create & publish workflow •  Tags, ratings, comments, & live previews •  “Compute applications” •  Automatic display of provenance information •  Dynamically resizable app display •  Communication between apps

Web Services •  Improved create & publish workflow •  Support for “native” web services •  Comprehensive logging and usage analytics •  Performance and reliability improvements

Page 29: Developing Apps: Exposing Your Data Through Araport

araport.org

Chris Town, PI

Lisa McDonald Education and Outreach Coordinator

Chris Nelson Project Manager Jason Miller, Co-PI

JCVI Technical Lead Erik Ferlanti Software Engineer

Vivek Krishnakumar Bioinf. Engineer

Svetlana Karamycheva Bioinf Engineer

Eva Huala Project lead, TAIR

Bob Muller Technical lead, TAIR

Gos Micklem, co-PI Sergio Contrino Software Engineer

Matt Vaughn co-PI

Steve Mock Portal Engineer

Rion Dooley, API Engineer

Matt Hanlon, Portal Engineer

Maria Kim Bioinf Engineer

Ben Rosen Bioinf Analyst

Joe Stubbs, API Engineer

Walter Moreira, API Engineer