Using standards to gain interoperability:Bioclipse-OpenTox scriptingEgon Willighagenhttp://egonw.github.com/http://chem-bl...
Managers: the vital organs of BioclipseSome theory●  Make sure that things happen●  They provide all domain-related functi...
JavaScript Console                     3
TAB TABDiscover manager in the JavaScript console with:1) TAB TAB (auto-completion)2) man                                 ...
Many Managers Cheminformatics              Online 1. cdk                       1. chemspider 2. opsin                     ...
man <manager>Discover what functionality a manager has                                            6
Ctrl-N → JavaScript editorCtrl-N → JavaScript Wizard → Editor → Save As …                                                  7
Running JavaScripts in the EditorJavaScript Editor → Run → Action                                    8
Managers can be combined ...var alkanesIUPACNames = ["methane", "ethane", "propane", "butane"];var alkanes = cdk.createMol...
OpenTox: downloading data setsvar service = "http://apps.ideaconsult.net:8080/ambit2/";var datasets = opentox.listDataSets...
OpenTox: download-ed data sets                                 11
OpenTox: authentication(if needed)opentox.getToken(); // return a null// log in on the OpenTox networkopentox.login("user"...
OpenTox: searching data setsvar ontologyService = "http://apps.ideaconsult.net:8080/ontology/";js.clear();sets = opentox.s...
OpenTox: finding descriptorsserviceSPARQL = "http://apps.ideaconsult.net:8080/ontology/";stringMat = opentox.listDescripto...
OpenTox: XLogP calculationmolecules = cdk.createMoleculeList();molecules.add(cdk.fromSMILES("COC"));molecules.add(cdk.from...
OpenTox: searching descriptors(next release; a 5 min hack)var ontologyService = "http://apps.ideaconsult.net:8080/ontology...
OpenTox: searching models(next release; another 5 min hack)var ontologyService = "http://apps.ideaconsult.net:8080/ontolog...
OpenTox: running modelsmodels = opentox.listModels(ontologyService);model = models.get(3); // third modeljs.say(  opentox....
Ontology development needed...                      … just saying ...                                          19
More OpenTox: man opentoxOr type: “opentox.” and hit TAB TAB ...                                          20
Under the hood...Some more theory...Internally, the opentox manager uses RDF and SPARQL for a lot of   communication with ...
Where to get more scripts ...                                22
Future ...●  Continued development●  Computation without downloading data (pass by reference)●  More ontology development ...
Upcoming SlideShare
Loading in...5
×

Using standards to gain interoperability: Bioclipse-OpenTox scripting

1,655

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,655
On Slideshare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Using standards to gain interoperability: Bioclipse-OpenTox scripting

  1. 1. Using standards to gain interoperability:Bioclipse-OpenTox scriptingEgon Willighagenhttp://egonw.github.com/http://chem-bla-ics.blogspot.com/IMMKarolinska Institutet, Stockholm
  2. 2. Managers: the vital organs of BioclipseSome theory● Make sure that things happen● They provide all domain-related functionality● All Bioclipse GUI is using managers in the background● Takes care of threading (background processes)● They are plugged into the system● Bioclipse dynamically discovers managers when booted● Extend the JavaScript ConsoleSpjuth, O., Alvarsson, J., Berg, A., Eklund, M., Kuhn, S., Mäsak, C., Torrance, G., Wagener, J., Willighagen, E. L., Steinbeck, C., Wikberg, J. E., Dec. 2009. Bioclipse 2: A scriptable integration platform for the life sciences. BMC Bioinformatics 10 (1), 397+. 2
  3. 3. JavaScript Console 3
  4. 4. TAB TABDiscover manager in the JavaScript console with:1) TAB TAB (auto-completion)2) man 4
  5. 5. Many Managers Cheminformatics Online 1. cdk 1. chemspider 2. opsin 2. pubchem 3. jmol 3. gist 4. balloon 4. opentox General 1. bioclipse 2. ui 3. rdfMany more can be installed via update sites... 5
  6. 6. man <manager>Discover what functionality a manager has 6
  7. 7. Ctrl-N → JavaScript editorCtrl-N → JavaScript Wizard → Editor → Save As … 7
  8. 8. Running JavaScripts in the EditorJavaScript Editor → Run → Action 8
  9. 9. Managers can be combined ...var alkanesIUPACNames = ["methane", "ethane", "propane", "butane"];var alkanes = cdk.createMoleculeList()for (var i=0; i<alkanesIUPACNames.length; i++) { js.say("Adding: " + alkanesIUPACNames[i]); alkanes.add( opsin.parseIUPACName(alkanesIUPACNames[i]) );}var filename = "/OpenTox/alkanes.sdf";cdk.saveSDFile(filename, alkanes);ui.open(filename); 9
  10. 10. OpenTox: downloading data setsvar service = "http://apps.ideaconsult.net:8080/ambit2/";var datasets = opentox.listDataSets(service);for (set=0; set<5; set++) { var dataset = datasets.get(set); js.say("Downloading set: " + dataset); ui.open( opentox.downloadDataSetAsMDLSDfile( service, dataset, "/OpenTox/ambit/" + set + ".sdf" ) )} 10
  11. 11. OpenTox: download-ed data sets 11
  12. 12. OpenTox: authentication(if needed)opentox.getToken(); // return a null// log in on the OpenTox networkopentox.login("user", "password")opentox.getToken(); // returns the active token// log out againopentox.logout()opentox.getToken(); // return again 12
  13. 13. OpenTox: searching data setsvar ontologyService = "http://apps.ideaconsult.net:8080/ontology/";js.clear();sets = opentox.searchDataSets(ontologyService, "EPA");js.say(sets); 13
  14. 14. OpenTox: finding descriptorsserviceSPARQL = "http://apps.ideaconsult.net:8080/ontology/";stringMat = opentox.listDescriptors(serviceSPARQL);stringMat.getColumn("algo"); // returns the descriptor servicesstringMat.getColumn("desc"); // returns the descriptor ontology entriesjs.say(stringMat); 14
  15. 15. OpenTox: XLogP calculationmolecules = cdk.createMoleculeList();molecules.add(cdk.fromSMILES("COC"));molecules.add(cdk.fromSMILES("CNC"));js.say(opentox.calculateDescriptor(service, descriptor, molecules));js.say(opentox.calculateDescriptor( service, descriptor, cdk.fromSMILES("CCC"))); 15
  16. 16. OpenTox: searching descriptors(next release; a 5 min hack)var ontologyService = "http://apps.ideaconsult.net:8080/ontology/";js.clear();descriptors = opentox.searchDescriptors( ontologyService, "LogP");js.say(descriptors); 16
  17. 17. OpenTox: searching models(next release; another 5 min hack)var ontologyService = "http://apps.ideaconsult.net:8080/ontology/";js.clear();descriptors = opentox.searchModels( ontologyService, "ToxTree");js.say(descriptors); 17
  18. 18. OpenTox: running modelsmodels = opentox.listModels(ontologyService);model = models.get(3); // third modeljs.say( opentox.predictWithModel( service, model, molecules )); 18
  19. 19. Ontology development needed... … just saying ... 19
  20. 20. More OpenTox: man opentoxOr type: “opentox.” and hit TAB TAB ... 20
  21. 21. Under the hood...Some more theory...Internally, the opentox manager uses RDF and SPARQL for a lot of communication with the OpenTox network.For this, it uses the rdf manager. For example, directly to the ontology server:1. rdf.sparqlRemote(String url, String SPARQL)Or to a REST service:1. rdf.createInMemoryStore()2. rdf.importFromStream(IRDFStore store, InputStream stream, String format)3. rdf.sparql(IRDFStore store, String query) 21
  22. 22. Where to get more scripts ... 22
  23. 23. Future ...● Continued development● Computation without downloading data (pass by reference)● More ontology development for further standardizationPointers● Bug tracker: http://bugs.bioclipse.net/● Feature requests: http://wishes.bioclipse.net/ 23
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×