10.9.11

Functional Molecular Visualization

In the protein world, we look at proteins, spinn em around, and color them different ways.

This can be extremely useful : http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2764419
/figure/F2/

In the figure above, the integration of sequences and structures alone demonstrate the ability to detect the DNA binding, Myosin-homologous dimerizing, and specificity inducing regions of B-Zip transcription factors.

The VENN application for homology titration exemplifies the importance tools like JMol, an open source molecular visualization tool written in Java; for determining which parts of a molecular are, in fact, the important ones - from an evolutionary perspective.

However, JMol, like most java programs, requires alot of boiler plate to launch --- creating panels, catching exceptions, getting structures, parsing them , etc... Additionally, because of the fact that VENN uses so many different data sources, we had to integrate JMol, BioJava, and various 3rd party databases in order to build the application.

Of course, bioinformatics algorithms have alot to gain from a language like Clojure, which allows you to easily parellelize and modularize hot spots in your code...

And thanks to the JVM, we don't have to rewrite our molecular visualization or bioinformatics API's --- we can simply reuse them by adding them in Leiningan.


..... So --- here's how you can start doing some REALLY powerful bioinformatics visualizations using Clojure, BioJava, and Jmol.

But... the focus here is just how powerful the Clojure/Java interop can be

Here is a function that goes to biojava, downloads and caches a pdb file,
parses it into a structure object, andn then colors the chains blue.

(defn ex2 []

(let [ panel (new org.biojava.bio.structure.gui.BiojavaJmol)
atomToFloat atomColors
]
(.setStructure panel (getStructure "1WRP"))
(.evalString panel "select *; spacefill 200; wireframe off; backbone 0.4; color chain")
(fmap #(str "select atomno=" % ";" ) (atomColors (StructureTools/getNrAtoms (getStructure "1WRP") )))
)


Molecular visualization in 4 lines of code.

Now for those of you protein people in the audience .... imagine what you can do with map, fmap, and the biojava api methods for returning amino acid sequences, atom counts, etc.....

By the way : This code for your leiningan / biojava integration is in the jayunit100/BioClojure project on github.

No comments:

Post a Comment