ICAR 2015
Workshop 10 (TUESDAY, JULY 7, 2015, 4:30-6:00 PM)
The Arabidopsis information portal for users and developers
Matt Vaughn (Texas Advanced Computing Center)
Developing Apps: Exposing your data through Araport
1. araport.org
Developing Apps: Exposing Your
Data Through Araport
Matt Vaughn
Director, Life Sciences Computing
Texas Advanced Computing Center
vaughn@tacc.utexas.edu | @mattdotvaughn | www.slideshare.net/mattdotvaughn
2. 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?
3. araport.org
Why become an Araport contributor?
• Recognition
• Exposure
• Feedback
• Interoperability
• Professional presentation
• Reusability
4. araport.org
Araport: A Road Map
API.ARAPORT.ORG
CLI clients,
Scripts, 3rd party
applications
Core Resources
AGAVE
apps
meta
files
profile
jobssystems
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
6. 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
7. 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
8. 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
12. 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
13. 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
16. 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()
17. 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
18. 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
20. 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
21. 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
24. 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
25. 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?
28. 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
29. araport.org
Chris Town, PI
Lisa McDonald
Education and
Outreach Coordinator
Chris Nelson
Project ManagerJason 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