Welcome - webinar instructions

Slides:



Advertisements
Similar presentations
Snejina Lazarova Senior QA Engineer, Team Lead CRMTeam Dimo Mitev Senior QA Engineer, Team Lead SystemIntegrationTeam Telerik QA Academy SOAP-based Web.
Advertisements

LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
More APIs: Web Services CMPT 281. Announcements Project milestone Lab: – Web services examples.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Distributing an imported HTML newsletter Prerequisites: 1. Basic HTML knowledge 2.An external HTML editor - requires external HTMTL editing program (e.g.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WEB DESIGN SOME FOUNDATIONS. SO WHAT IS THIS INTERNET.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Attendee overview 1 Joining a Redback Webinar. Before the Webinar Getting organised It’s always a good idea to ensure you are prepared well in advance.
GIS technologies and Web Mapping Services
Server-side Scripting Powering the webs favourite services.
Introducing Dreamweaver MX 2004
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
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.
1 Welcome to CSC 301 Web Programming Charles Frank.
NETWORK HARDWARE AND SOFTWARE MR ROSS UNIT 3 IT APPLICATIONS.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
User Interface Status (May 07) Status of the UKCIP08 User Interface: May 2007 UKCIP08 User Panel, 3 rd May 2007 Ag Stephens, British Atmospheric Data Centre.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
SOAP-based Web Services Telerik Software Academy Software Quality Assurance.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
RESTful Web Services What is RESTful?
Getting started with Adobe Connect for presenters.
CaBIO iPhone App Konrad Rokicki SAIC. Why a native app? Current web UIs are cumbersome to use from a mobile device This could be addressed by developing.
SVG technology SVG technology is what we want? is what we want? Jaehoon Woo KNU Real-Time Systems Lab. KNU Real-Time Systems Lab.
#SummitNow What's Coming Arrived in CMIS November, 2013 Gregory Melahn/Alfresco Software
Tutorial 1 Getting Started with Adobe Dreamweaver CS5.
4.01 How Web Pages Work.
ArcGIS for Server Security: Advanced
Jeff Barrette Jeff Moulds
4.01 How Web Pages Work.
Introduction to Networking
Web fundamentals: Clients, Servers, and Communication
Web Programming Language
4.01 How Web Pages Work.
Chapter 10: Web Basics.
How to install GoToTraining software and join a demo
Tiny http client and server
HTML CS422 Dick Steflik.
To the ETS – Accounts Setup and Preferences Online Training Course
Business Directory REST API
Take a REST from manual searching: PDBe, programmatically
Ad-blocker circumvention System
Data Virtualization Tutorial… CORS and CIS
Unit – 5 JAVA Web Services
GF and RS, Dept. of CS, Mangalore University
Brian McCallum UWS, Web Services Unit 15 November 2011
Azure CLI Deep Dive Neil Peterson Content Developer Microsoft.
Application with Cross-Platform GUI
The EBI Search RESTful API
Getting started with Alfresco Development
Applied Cyber Infrastructure Concepts Fall 2017
Creating Interactive Assignments in BCPS One
COMP 101 Introduction.
Web services, WSDL, SOAP and UDDI
Create and edit web pages 2
$, $$, $$$ API testing Edition
Testing RESTful Web APIs
JavaScript & jQuery AJAX.
Web Standards and Accessible Design.
Python and REST Kevin Hibma.
PRODUCTION PHASES CHANGES
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Welcome - webinar instructions
WCF Data Services and Silverlight
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Welcome - webinar instructions GoToTraining works best in Chrome or IE – avoid Firefox due to audio issues with Macs To access the full features of GoToTraining, use the desktop version by clicking on the flower symbol and selecting “switch to desktop version” All microphones will be muted whilst the trainer is speaking If you have a question please use the chat box at the bottom of the GoToTraining box Please complete the feedback survey which will launch at the end of the webinar.

Practical introduction ChEMBL REST API Practical introduction Michał Nowotka ChEMBL team chembl-help@ebi.ac.uk

ChEMBL data distribution channels

Web services - what's that? “A Web service is a method of communication between two electronic devices over a network. [Wikipedia]” “A software system designed to support interoperable machine-to-machine interaction over a network. [WC3]”

Web services For machines But still human-readable Used in scripts, applications Can fetch data in bulk Web-friendly

ChEMBL API - where to start? API main website (reference, examples, links): https://www.ebi.ac.uk/chembl/ws Live documentation (execute simple API calls from your web browser): https://www.ebi.ac.uk/chembl/api/data/docs Source code: https://github.com/chembl/chembl_webservices_2

ChEMBL API basics - pagination ChEMBL contains 1.7M compounds and 14M activities You can’t get them all at once using the API Data is paginated Chunks are wrapped in envelopes Default page size is 20 but can be adjusted up to 1000. Pagination is controlled by two parameters: limit offset

Page anatomy 4

Page anatomy

Filtering Select all approved drugs: molecule?max_phase=4 Select all approved drugs with two or more aromatic rings: molecule?max_phase=4&molecule_properties__aromatic_rings__gte=2 Select all targets with name starting from 'serotonin': target?pref_name__istartswith=serotonin

Filter types exact (iexact) contains (icontains) search startswith (istartswith) endswith (iendswith) regex (iregex) gt (gte) lt (lte) range in isnull

Ordering (ascending and descending) Order molecules by weight, ascending: molecule?order_by=molecule_properties__full_mwt Order molecules by weight, descending: molecule?molecule_properties__isnull=false&order_by=-molecule_properties__full_mwt Order by aromatic rings ascending and then by weight descending: molecule?order_by=molecule_properties__aromatic_rings&order_by=-molecule_properties__full_mwt

Supported formats JSON XML YAML SDF PNG SVG

Supported HTTP methods GET curl -g "https://www.ebi.ac.uk/chembl/api/data/molecule/[Na+].CO[C@@H](CCC%23C\C=C/CCCC(C)CCCCC=C)C(=O)[O-]" curl https://www.ebi.ac.uk/chembl/api/data/substructure/N%23CCc2ccc1ccccc1c2.json POST (used as GET but with larger payload) curl -X POST -H "X-HTTP-Method-Override: GET" -H "Content-Type: application/json" -d '{"smiles":"N#CCc2ccc1ccccc1c2"}' https://www.ebi.ac.uk/chembl/api/data/substructure.json curl -X POST -H "X-HTTP-Method-Override: GET" -d 'smiles=N#CCc2ccc1ccccc1c2' https://www.ebi.ac.uk/chembl/api/data/substructure.json

In-browser cross-domain techniques supported CORS JSONP

Query SMILES: [Na+].CO[C@@H](CCC#C\C=C/CCCC(C)CCCCC=C)C(=O)[O-] SMILES support Query SMILES: [Na+].CO[C@@H](CCC#C\C=C/CCCC(C)CCCCC=C)C(=O)[O-] GET: Wrong: https://www.ebi.ac.uk/chemblws/compounds/smiles/[Na+].CO[C@@H](CCC#C\C=C/CCCC(C)CCCCC=C)C(=O)[O-] Right (for get use percent encoding): https://www.ebi.ac.uk/chembl/api/data/molecule/%5BNa+%5D.CO%5BC@@H%5D%28CCC%23C%5CC=C/CCCC%28C%29CCCCC=C%29C%28=O%29%5BO-%5D POST (no need to encode anything): curl -X POST -H "X-HTTP-Method-Override: GET" -H "Content-Type: application/json" -d '{"smiles":"[Na+].CO[C@@H](CCC#C\\C=C/CCCC(C)CCCCC=C)C(=O)[O-]"}' https://www.ebi.ac.uk/chembl/api/data/molecule.json

Python ChEMBL client Handles pagination Takes care about HTTP Caches results locally Friendly syntax

Examples Scripting Web widgets Slack KNIME Jupyter (IPython) Bash (curl) Python R Web widgets Slack KNIME Jupyter (IPython)

Bash/Python/R scripts The same task: Read a CSV file with molecule ids and create the output CSV file with mapping between each compound and related target, optionally filtered by organism. Bash: ./mol2tar.sh R: ./mol2tar.r [-O "Homo sapiens"] Python: python mol2tar.py [-O "Homo sapiens"] Bonus: bash script to fetch images for compounds in CSV file: ./mol2img.sh

fiddle 1 | fiddle 2 | fiddle 3 Web widgets fiddle 1 | fiddle 2 | fiddle 3

Slack bot

KNIME

Jupyter/IPython

Next in the series Feedback See the full list of upcoming webinars at http://www.ebi.ac.uk/training/webinars Feedback Tell us what you think