python api for evs konrad rokicki, saic. python programming language dynamic, object-oriented,...
DESCRIPTION
pyCaCORE Code generator and client library 1.Generates a complete Python API from a WSDL file 2.Generated API uses pyCaCORE as a client library (for features like proxying, caching, association navigation, compatibility with Axis) Built on top of ZSI (Zolera SOAP Infrastructure) Originally built to generate caBIO Python API Now tested with EVS This required modifications to support eager loading of associationsTRANSCRIPT
![Page 1: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/1.jpg)
Python API for EVS
Konrad Rokicki, SAIC
![Page 2: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/2.jpg)
Python Programming Language
• Dynamic, object-oriented, open-source• Cross-platform, popular for scripting• Extensive standard libraries and large open source community• Strong support for scientific computing (SciPy, python(x,y), Matplotlib)• Gaining popularity in bioinformatics (Biopython, Pygr)• See also
• A Primer on Python for Life Science Researchershttp://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.0030199
• Python course in Bioinformaticshttp://www.pasteur.fr/recherche/unites/sis/formation/python/
• Biopythonhttp://biopython.org/wiki/Main_Page
• python(x,y)http://www.pythonxy.com/foreword.php
![Page 3: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/3.jpg)
pyCaCORE
• Code generator and client library 1. Generates a complete Python API from a WSDL file2. Generated API uses pyCaCORE as a client library (for features
like proxying, caching, association navigation, compatibility with Axis)
• Built on top of ZSI (Zolera SOAP Infrastructure)• Originally built to generate caBIO Python API• Now tested with EVS
• This required modifications to support eager loading of associations
![Page 4: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/4.jpg)
ZSI
pyEVS Architecture
EVS Server
Web Service Endpoint SOAP Request
SOAP Response
wsdl2py-generated API
pyEVS
User Code
AxisReaderAxis
Server Client
![Page 5: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/5.jpg)
pyEVS API
from cabig.evs.service import *s = EVSApplicationService()
m = MetaThesaurusConcept(name='NCBI')results = s.queryObject(MetaThesaurusConcept.className, m)for r in results: print r.cui, r.name print "Synonyms:",‘; '.join(r.synonymCollection)
![Page 6: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/6.jpg)
Output
C0995203 NCBI_taxonomySynonyms: NCBI_taxonomy; National Center for Biotechnology
Information; NCBI Taxonomy; NCBI; root (of NCBI Taxonomy); NCBI Taxonomy; NCBI Taxonomy; NCBI; root (of NCBI Taxonomy)
C1621796 NCBI Taxonomy, 2006_01_04Synonyms: NCBI Taxonomy, 2006_01_04; NCBI2006_01_04
CL357298 NCBI_Taxon_IDSynonyms: NCBI_Taxon_ID
![Page 7: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/7.jpg)
No association traversal
d = DescLogicConcept(name='intronic')results = s.queryObject(d.className, d)
Next line generates error: “This service does not support the getAssociation method.”
results[0].propertyCollection
Instead, do this:
propertyCollection = s.queryObject(Property.className, d)
![Page 8: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/8.jpg)
No tree traversal
d = DescLogicConcept(name='intron')results = s.queryObject(d.className, d)d = results[0]
d.name is “Intron”d.code is “C13249” But what is the super concept?
NCI Term Browser says “Gene Feature” (C13445)Not possible to retrieve with web services.
![Page 9: Python API for EVS Konrad Rokicki, SAIC. Python Programming Language Dynamic, object-oriented, open-source Cross-platform, popular for scripting Extensive](https://reader036.vdocuments.us/reader036/viewer/2022082419/5a4d1b077f8b9ab059988a85/html5/thumbnails/9.jpg)
Resources
• Distribution: pyCaBIG Gforge• http://gforge.nci.nih.gov/frs/?group_id=525&release_id=2586
• Also available in SVNhttps://gforge.nci.nih.gov/svnroot/pycabig/pyevs/trunk
• Documentation: NCICB WIKI• https://wiki.nci.nih.gov/display/caCORE/EVS+Python+API• https://wiki.nci.nih.gov/display/caCORE/Python+API+Generation
• Related Feature Requests• [#15091] Implement getAssociation for EVS API web service
http://gforge.nci.nih.gov/tracker/index.php?func=detail&aid=15091• [#15092] Implement tree browsing for web services
http://gforge.nci.nih.gov/tracker/index.php?func=detail&aid=15092