100 likes | 251 Views
Python API for EVS. Konrad Rokicki, SAIC. 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)
E N D
Python API for EVS Konrad Rokicki, SAIC
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 Researchers http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.0030199 • Python course in Bioinformatics http://www.pasteur.fr/recherche/unites/sis/formation/python/ • Biopython http://biopython.org/wiki/Main_Page • python(x,y) http://www.pythonxy.com/foreword.php
pyCaCORE • Code generator and client library • Generates a complete Python API from a WSDL file • 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
pyEVS Architecture Server Client User Code EVS Server pyEVS wsdl2py- generated API ZSI Web Service Endpoint SOAP Request AxisReader Axis SOAP Response
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)
Output C0995203 NCBI_taxonomy Synonyms: 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_04 Synonyms: NCBI Taxonomy, 2006_01_04; NCBI2006_01_04 CL357298 NCBI_Taxon_ID Synonyms: NCBI_Taxon_ID
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)
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.
Resources • Distribution: pyCaBIG Gforge • http://gforge.nci.nih.gov/frs/?group_id=525&release_id=2586 • Also available in SVN https://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