Top Banner
Data to Discovery The iPlant Collaborative ommunity Cyberinfrastructure for Life Scien Nirav Merchant ([email protected]) iPlant / University of Arizona troduction to iPlant Science
13

Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant ([email protected]) iPlant / University.

Dec 22, 2015

Download

Documents

Louisa Riley
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

The iPlant Collaborative Community Cyberinfrastructure for Life Science

Nirav Merchant ([email protected])iPlant / University of Arizona

Introduction to iPlant Science API

Page 2: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Topic Coverage

• API: What why and ….who cares• Why do we need API’s• Connecting parts of iPlant with API• Hands on work with API– Login/get tokens– See your files– Submit a tasks (on Docker)– Inspect results– Play with commands on your own

Page 3: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

The iPlant Collaborative: Vision

www.iPlantCollaborative.org

Enable life science researchers and educators touse and extend cyberinfrastructure

Page 4: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

iPlant: Layer Cake

Page 5: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

iPlant Architectural Motivation • We strive to be the CI Lego blocks• Danish 'leg godt' - 'play well’• Also translates as 'I put together' in

Latin• If a solution is not available you can

craft your own using iPlant CI components

Page 6: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

API’s are everywhere• API = Application Programming

Interface• We will focus on web API (and what is

that ?)• They help others do creative things

with your applications/platform (without you having to build it for them)

• You will find the used in your phone to your TV and everywhere in between (facebook, google or any company providing service)

• It is the window into their platform (but with monkey/safety bars)

Page 7: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

So how do you use Web API’s ?

• Use the same protocol as web url’s i.e http

• Everything is called as a URL• We call that REST interface• RES What ?• Things that do not fit on a url are

provided as JSON• J What ? • You have to know some basic

scripting or programming to benefit from it

Page 8: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Why did iPlant build API ?

Data Store

Computing Options

HPC

Cloud

HTC

Security

Page 9: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Really why did you build it ?

• More people sharing applications/pipelines

• Not enough resources available at authors home institution/lab to share analysis with world

• HPC was not a web friendly world• Lab with HPC access wanted web

interfaces (like DE)• No one else was building generic CI

API• We want people to extend our

platform

Page 10: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Your tool box

• Command line access on a linux, mac or PC

• cURL http://curl.haxx.se/download.html

• Text editor• Familiarity with shell (say what ?)• http://agaveapi.co/• Lots of patience (level = Sage)• Creativity !

Page 11: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Prepare you environment

• If you do not have a mac or linux box with curl and bash, please ssh using UA netid to:research.u.arizona.edu

• Go to http://agaveapi.co/ • We will explore the live docs (say

what)(Documentation | REST API DOCS)http://agaveapi.co/live-docs/

• Log into iPlant DE using your browser (de.iplantc.org)

Page 12: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Some terminology

• Tokens• Keys• Secrets• Agave-cli (you will like it)• Template (read some json and visit

DE)

• Now lets review Agav-cli options (in bin dir) and jump to live docs

Page 13: Data to Discovery The iPlant Collaborative Community Cyberinfrastructure for Life Science Nirav Merchant (nirav@email.arizona.edu) iPlant / University.

Data to Discovery

Hands on Steps

• ssh research.u.arizona.edu or use your own mac, linux box

• bash• git clone https://bitbucket.org/taccaci/foundation-cli.git

agave-cli

• export PATH=$PATH:`pwd`/agave-cli/bin

• tenants-init choose iplant

• clients-create -N cli-demo -S

• files-list <your login>

• jobs-template -AV demo-pyplot-demo-advanced-0.1.0u1 > submit.json

• edit submit.json to "line" and remove .0 for size

• jobs-submit -V -W -F submit.json