<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Depth-First: Tag osra</title>
    <link>http://depth-first.com/articles/tag/osra</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Testing Automatic Chemical Structure Recognition with OSRA</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/jspad/375980619/"&gt;&lt;img src="http://depth-first.com/demo/20080207/books.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Countless chemical structures exist only in a raster image format such as JPG, GIF, BMP, or on a printed page or PDF. While perfectly readable to humans, they are very difficult for machines to read. Given the sheer number of these structures that have been produced over the last few decades, the only hope of excavating them from their current &lt;a href="http://depth-first.com/articles/2008/02/04/raiding-chemistrys-data-tombs"&gt;data tombs&lt;/a&gt; is with computer recognition of some kind. This article discusses &lt;a href="http://cactus.nci.nih.gov/osra/"&gt;OSRA&lt;/a&gt;, an open source software package designed to do for chemical structures what Optical Character Recognition did for the printed word.&lt;/p&gt;

&lt;p&gt;An &lt;a href="http://cactus.nci.nih.gov/cgi-bin/osra/index.cgi"&gt;online version of OSRA&lt;/a&gt; was used to read PNG images of chemical structures produced by an application based on &lt;a href="http://depth-first.com/articles/2007/11/27/chemwriter-chemical-structures-and-the-web"&gt;ChemWriter&lt;/a&gt;. Both aliased and antialiased images were used and atom coloring was disabled:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20080207/image.png"&gt;&lt;/img&gt;&lt;img src="http://depth-first.com/demo/20080207/image_no_antialias.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;Structure interpretation failed for the antialiased image at both 300 and 72 DPI resolution. &lt;a href="http://www.daylight.com/daycgi/depict?4343434328432943284f2943363d432843353d43434328434331434328434343293d43432843432943344328433129434328433343432843432943323d4343434343324333293d4343344329433d4335294343434336"&gt;This&lt;/a&gt; was the SMILES that was produced at 72 DPI; the one produced at the 300 DPI setting was not much more encouraging.&lt;/p&gt;

&lt;p&gt;However, using the aliased imaged at 72 DPI produced the correct structure.&lt;/p&gt;

&lt;p&gt;Could the failure to recognize the antialiased image be due to a problem with the ChemWriter application's rasterization method? Apparently, not. When a screen capture utility was used to produce the image from the ChemWriter application window, the wrong structure was again produced. Here, the PNG encoding was not through a Java program but rather the underlying operating system (Linux) using a standard screen capture utility.&lt;/p&gt;

&lt;p&gt;To test the idea that line thickness might play a role in determining the quality of OSRA's interpretation, the antialiased image below was submitted:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20080207/image_thin_lines.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;Still, the &lt;a href="http://www.daylight.com/daycgi/depict?43434343363d4328432943333d43284329433d432843323d434343313d4328433d43433d4331294328432943324329433d4333434328434343353d43433d432843343d432843283d4f294e283d4f293d4f29433d43433d433429433d4335294336"&gt;incorrect structure&lt;/a&gt; was produced.&lt;/p&gt;

&lt;p&gt;Apparently, images of 2D structures in which antialiasing has been applied cause difficulties for OSRA.&lt;/p&gt;

&lt;p&gt;Fortunately, the ChemWriter-based application &lt;a href="http://depth-first.com/articles/2007/08/01/never-draw-the-same-molecule-twice-image-metadata-for-cheminformatics"&gt;embedded the full connection table of the molecule into all of its images as metadata&lt;/a&gt;, so an optical recognition step is unnecessary.&lt;/p&gt;

&lt;p&gt;Provided that no antialiasing has been applied to images, OSRA would seem to be a capable tool for converting rasterized 2D chemical structures into machine-readable format.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/jspad/"&gt;jspad&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:45:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8d105d2e-2550-4ab8-be8b-5dec6c80a9f0</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/02/07/testing-automatic-chemical-structure-recognition-with-osra</link>
      <category>Tools</category>
      <category>osra</category>
      <category>chemwriter</category>
      <category>png</category>
      <category>rasterimage</category>
      <category>2d</category>
      <category>chemicalstructure</category>
      <category>antialias</category>
    </item>
  </channel>
</rss>
