Accessing and scripting CDK from Bioclipse


Published on

Presentation held at the CDK workshop 2009.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Major bug: JCP
  • JAX x 2006 Trophees du libre 2007
  • Accessing and scripting CDK from Bioclipse

    1. 1. Accessing and scripting CDK from Bioclipse Ola Spjuth [email_address] Dept. Pharmaceutical Biosciences Uppsala University, Sweden
    2. 2. Contents <ul><li>Introduction to Bioclipse </li></ul><ul><li>The use of CDK in Bioclipse </li></ul><ul><li>Scripting CDK in Bioclipse </li></ul><ul><li>Calculating CDK properties </li></ul><ul><li>Some ongoing Bioclipse projects </li></ul>
    3. 3. Before we start <ul><li>Download latest Bioclipse now from Sourceforge </li></ul><ul><li>(see for link) </li></ul><ul><li>Installation on lab computers does not work. </li></ul><ul><li>Please note: </li></ul><ul><li>We will be using a Beta in the workshop. Bioclipse 2.0 is scheduled for release in late May. </li></ul>
    4. 4. Bioclipse history <ul><li>Prof. Wikberg’s group performed Proteochemometrics analyses: </li></ul><ul><li>Heterogeneous data, many different software, incompatible file formats </li></ul><ul><li>At the CDK workshop 2005 in Cologne, teamed up with Steinbeck et. al. to form the Bioclipse project. </li></ul><ul><li>Internationally awarded 3 times </li></ul>
    5. 5. Introduction to Bioclipse <ul><li>Bioclipse is a Rich Client </li></ul><ul><ul><li>Standalone app, not run in a browser </li></ul></ul><ul><ul><li>Today’s desktop computers and laptops are powerful </li></ul></ul><ul><ul><li>Also take advantage of online resources (e.g. data, services, HPC) </li></ul></ul><ul><li>> Intuitive, native, responsive GUI </li></ul><ul><li>> Full integration with operating system </li></ul>
    6. 6. Introduction to Bioclipse <ul><li>Bioclipse is a built on Eclipse Rich Client Platform </li></ul><ul><ul><li>Previously an IBM project, now an Open Source project managed by the Eclipse Foundation ( </li></ul></ul><ul><li>Every application is a set of plugins </li></ul><ul><ul><li>Even core modules </li></ul></ul><ul><li>Can be extended by adding more plugins </li></ul>
    7. 7. Component based architecture Bioclipse Proteochemometrics 2D 3D Data analysis Spectra Molecular dynamics
    8. 8. Getting Bioclipse <ul><li>Download latest from Sourceforge (see for link) </li></ul><ul><li>Unzip </li></ul><ul><li>Start </li></ul>Bioclipse welcome page contains tutorials and links
    9. 9. Software updates After installation and restart we have new functionality and more options!
    10. 10. Install Sample Data Menu: File > New… Use name: Sample Data
    11. 11. The Workspace <ul><li>Place on the local hard disk managed by Bioclipse </li></ul><ul><ul><li>Track changes </li></ul></ul><ul><ul><li>Drag and drop or cut and paste into it </li></ul></ul>Project Folder File(s)
    12. 12. Toolbar Perspective bar Stacked views Welcome Jmol Editor Outline Navigator Properties Javascript Console The Bioclipse Workbench
    13. 13. Bioclipse basics <ul><li>Open files in editors </li></ul><ul><ul><li>Double-click the file </li></ul></ul><ul><ul><li>Chose editor: Right-click file > Open with… </li></ul></ul><ul><li>Show views </li></ul><ul><ul><li>Menu: Window -> Show View > Other.. </li></ul></ul><ul><li>Customize workbench </li></ul><ul><ul><li>Change size and drag views and editors around </li></ul></ul><ul><ul><li>Edit preferences in menu: Window > Preferences </li></ul></ul><ul><li>Help system </li></ul><ul><ul><li>Menu: Help > Help contents </li></ul></ul>
    14. 14. Cheat Sheets Step by step tutorials inside the Workbench Interactive with actions to perform Menu: Help > Cheat Sheets
    15. 15. Bioclipse domain objects <ul><li>IBioObject All domain objects in Bioclipse (UID) </li></ul><ul><li>IMolecule All molecules implementations (must </li></ul><ul><li>provide SMILES and/or CML) </li></ul><ul><li>ICDKMolecule CDK implementation of IMolecule </li></ul>ISequence IBioJavaSequence
    16. 16. <ul><li>Enter commands in the Javascript Console </li></ul>Scripting Bioclipse Manager Method Parameter(s)
    17. 17. Scripting Bioclipse <ul><li>List available managers: </li></ul><ul><li>help (or press Tab key) </li></ul>
    18. 18. Scripting Bioclipse <ul><li>List methods in a manager: </li></ul><ul><li>help <manager name> </li></ul>
    19. 19. Scripting Bioclipse <ul><li>Get help for a method: </li></ul><ul><li>help <manager name>.<method name> </li></ul><ul><li>Example: help cdk.loadMolecule </li></ul>
    20. 20. Some basic CDK commands in Bioclipse Don’t forget tab-completion!
    21. 21. I/O and GUI interaction 1) Type 2) Drag and drop
    22. 22. Cheminformatics I/O <ul><li>Ways to load molecules: </li></ul><ul><li>cdk.loadMolecule(“/Project/file.mol”) </li></ul><ul><li>cdk.loadMolecule(“/full/path/to/file.mol”) </li></ul><ul><li>Load several molecules: </li></ul><ul><li>cdk.loadMolecules(“/Project/file.sdf”) </li></ul><ul><li>cdk.loadMolecules(“/full/path/to/file.sdf”) </li></ul>
    23. 23. Javascript Editor <ul><li>Edit and launch scripts with .js extension </li></ul>Script: /Sample Data/Javascripts/extractsmilesAndMass.js Execute script
    24. 24. Gists <ul><li>Gist = versioned script [ ] </li></ul><ul><ul><li>Ideal for sharing scripts online </li></ul></ul><ul><ul><li>Find gists for Bioclipse: </li></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><ul><li>Find gists for the workshop: </li></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><li>Bioclipse has Gist support built-in: </li></ul><ul><li> </li></ul><ul><li>,”/Virtual/glu.js”) </li></ul>
    25. 25. Example script: Download and visualize proteins Script: /Sample Data/Javascripts/dnaiso.js Gist: 95779
    26. 26. Multiple molecules Script: /Sample Data/Javascripts/multimol.js Gist: 95790
    27. 27. Scripting Jmol Jmol manager: jmol.spinOn() Run general Jmol script:“spin on”)
    28. 28. 2D coordinates
    29. 29. 3D coordinates
    30. 30. 2D/3D complete script Script: /Sample Data/Javascripts/gencoords.js Gist: 95755
    31. 31. Script JCP editing Script: /Sample Data/Javascripts/buildmol.js Gist: 96594
    32. 32. Balloon: Conformer generation <ul><li>Generate 3D coordinates </li></ul><ul><li>res=balloon.generate3Dcoordinates(&quot;/Sample Data/2D structures/ATP.mol&quot;) </li></ul><ul><li>Generate 10 conformations </li></ul><ul><li>res=balloon.generate3Dconformations(&quot;/Sample Data/2D structures/ATP.mol&quot;, 10) </li></ul><ul><li> </li></ul><ul><li>, &quot;jmol&quot;) </li></ul><ul><li> </li></ul>[ ]
    33. 33. Javascript in Javascript Console <ul><li>Use Javascript mixed with Manager code! </li></ul><ul><li>var mols = cdk.loadMolecules(&quot;/Sample Data/SDF/Fragments2.sdf&quot;); </li></ul><ul><li>for (var i = 0; i < mols.size(); i++) { </li></ul><ul><li>js.print(mols.get(i).getSMILES() + &quot; &quot;); </li></ul><ul><li>} </li></ul><ul><li>Plugins add new managers and new commands </li></ul>
    34. 34. Calculating CDK properties (descriptors) <ul><li>List descriptors: </li></ul><ul><li>qsar.getDescriptorIDs() </li></ul><ul><li>Calculate a descriptor: </li></ul><ul><li>qsar.calculate(IMolecule, descriptorID) </li></ul><ul><li>Descriptor IDs are from the Blue Obelisk Descriptor Ontology </li></ul><ul><li> </li></ul>
    35. 35. Calculating CDK properties Command: qsar.calculate( molecule, descriptor) Script: /Sample Data/Javascripts/qsar.js Gist: 95194
    36. 36. Calculating CDK properties: Multiple molecules, multiple descriptors Command: qsar.calculateNoParams( molecules, descriptors) Script: /Sample Data/Javascripts/qsar-multi.js Gist: 95189
    37. 37. Bridging JS to R <ul><li>Bioclipse has an R-console </li></ul><ul><ul><li>Menu: Window > Show View > Other > R-Console </li></ul></ul><ul><li>Access JS variables with `myJSvariable` </li></ul>
    38. 38. Calculating CDK properties: QSAR project <ul><li>Create New QSAR project </li></ul><ul><li>Menu: File > New… > QSAR Project </li></ul>QSAR Editor Cheat Sheet: QSAR Project
    39. 39. Use R on QSAR dataset
    40. 40. To sum up: What is Bioclipse? <ul><li>Bioclipse is an intuitive workbench for end users in life science </li></ul><ul><li>Bioclipse is an advanced scriptable framework for power users </li></ul><ul><li>Bioclipse is a platform for rapid development and provisioning </li></ul>
    41. 41. Some ongoing Bioclipse projects
    42. 42. Speclipse: Spectrum analysis in Bioclipse More information: Stefan Kuhn and Dr. Christoph Steinbeck, EBI, UK
    43. 43. MetaPrint2D: Site-of-metabolism prediction Collaboration with Dr. Lars Carlsson, AstraZeneca, SE and Prof. Robert Glenn, Cambridge University, UK
    44. 44. Pharmacophores Collaboration with Dr. John Van Drie (Van Drie Research LLC) and Dr . Rajarshi Guha (Indiana University)
    45. 45. Brunn: High Throughput Screening Collaboration with Prof. Rolf Larsson, Dept Clinical Pharmacology, Uppsala University, Sweden More information: Jonathan Alvarsson, Uppsala University, Sweden
    46. 46. Data analysis Collaboration with Genetta Soft AB, Sweden.
    47. 47. Bioclipse Licensing <ul><li>Bioclipse: EPL - Eclipse public license </li></ul><ul><ul><li>Flexible open source license </li></ul></ul><ul><li>Plugins: Any license, even commercial </li></ul><ul><ul><li>All plugins packaged with Bioclipse are free and open source </li></ul></ul>
    48. 48. Acknowledgements <ul><li>Dept. Pharmaceutical Biosciences, Uppsala University, Sweden </li></ul><ul><li>Prof. Jarl E. S. Wikberg </li></ul><ul><li>Dr. Egon Willighagen </li></ul><ul><li>Martin Eklund </li></ul><ul><li>Jonathan Alvarsson </li></ul><ul><li>Carl Mäsak </li></ul><ul><li>Eskil Anderssen </li></ul><ul><li>Annsofi Andersson </li></ul><ul><li>Arvid Berg </li></ul><ul><li>Bjarni Juliusson </li></ul><ul><li>Unilever Centre for Molecular Informatics, Univ. Cambridge, UK </li></ul><ul><li>Prof. Peter Murray-Rust </li></ul><ul><li>Prof. Robert Glen </li></ul><ul><li>Samuel Adams </li></ul><ul><li>Linnaeus Centre for Bioinformatics, Uppsala, Sweden </li></ul><ul><li>Dr. Erik Bongcam-Rudloff </li></ul><ul><li>Sofia Burvall </li></ul><ul><li>Eur opean Bioinformatics Institute, Hinxton, UK </li></ul><ul><li>Dr. Christoph Steinbeck </li></ul><ul><li>Stefan Kuhn </li></ul><ul><li>Dr. Gilleain Torrence </li></ul><ul><li>Cologne University Bioinformatics Centre (CUBIC), Germany </li></ul><ul><li>Dr. Tobias Helmus </li></ul><ul><li>Miguel Rojas </li></ul><ul><li>Thomas Kuhn </li></ul><ul><li>Dept Clinical Pharmacology, Uppsala University, Sweden </li></ul><ul><li>Prof. Rolf Larsson </li></ul><ul><li>Dr. Claes Andersson </li></ul><ul><li>Hanna Göransson </li></ul><ul><li>Ludwig-Maximilians-Universität, Munich, Germany </li></ul><ul><li>Dr. Johannes Wagener </li></ul><ul><li>Dept. Pharmaceutical Biosciences, Uppsala University, Sweden </li></ul><ul><li>Prof. Johan Åqvist </li></ul><ul><li>Dr. Martin Nervall </li></ul><ul><li>Göran Wallin </li></ul><ul><li>Global Safety Assessment, AstraZeneca, Mölndal Sweden </li></ul><ul><li>Dr. Scott Boyer </li></ul><ul><li>Dr. Lars Carlsson </li></ul><ul><li>Van Drie Research LLC, MA, US </li></ul><ul><li>Dr. John Van Drie </li></ul><ul><li>Indiana University, IN, USA </li></ul><ul><li>Dr. Rajarshi Guha </li></ul><ul><li>Others </li></ul><ul><li>Dr. Jerome Pansanel </li></ul><ul><li>… and all others for contributing code, feature requests, bug reports, proposals, and comments! </li></ul>
    49. 49. Thank you! <ul><li>Ola Spjuth </li></ul><ul><li>[email_address] </li></ul>