<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>
<channel>
	<title>Your bones got a little machine &#187; code</title>
	<atom:link href="http://blog.pansapiens.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pansapiens.com</link>
	<description>Ideas are cheap, implementation is expensive; act accordingly.</description>
	<lastBuildDate>Sat, 28 Jan 2012 03:00:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
		<item>
		<title>A mobile interface to the Registry of Standard Biological Parts</title>
		<link>http://blog.pansapiens.com/2010/10/24/a-mobile-interface-to-the-registry-of-standard-biological-parts/</link>
		<comments>http://blog.pansapiens.com/2010/10/24/a-mobile-interface-to-the-registry-of-standard-biological-parts/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 08:37:47 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[synthetic biology]]></category>
		<category><![CDATA[app engine]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[igem]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[jQTouch]]></category>
		<category><![CDATA[mobile]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=241</guid>
		<description><![CDATA[Recently I developed a simple mobile interface to the Registry of Standard Biological Parts &#8211; the database that is currently the focal point for parts-based synthetic biology. I&#8217;ve called this mobile interface mPartsRegistry and I thought it would be worth outlining it&#8217;s features and sharing some notes about the project, in case someone else finds [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I developed a simple mobile interface to the <a href="http://partsregistry.org/">Registry of Standard Biological Parts</a> &#8211; the database that is currently the focal point for parts-based synthetic biology. I&#8217;ve called this mobile interface <a href="http://mpartsregistry.appspot.com/">mPartsRegistry</a> and I thought it would be worth outlining it&#8217;s features and sharing some notes about the project, in case someone else finds it useful.</p>
<p><a href="http://mpartsregistry.appspot.com/">mPartsRegistry</a> is a simple interface to the Registry of Standard Biological Parts aimed at mobile smartphone browsers. It&#8217;s powered by the <a href="http://partsregistry.org/Registry_API">Parts Registry API</a>, which provides a simple RESTful interface to key metadata about parts in the database. It features:</p>
<ul>
<li>. A simple interface tailored for mobile WebKit browsers (Android browser, mobile Safari, probably others). Web-based, zero-installation required.</li>
<li>. Basic search of the Registry by part name.</li>
<li>. &#8220;Favorite parts&#8221; to locally bookmark parts on your device.</li>
<li>. Provides basic metadata associated with parts, including size, description, authors, DNA sequence, categories and availability.</li>
<li>. Freely available and recyclable source code, released under the MIT License (<a href="http://github.com/pansapiens/mPartsRegistry">fork it on GitHub</a>).</li>
</ul>
<p><img class="alignleft" style="border: 2px solid black;" src="http://mpartsregistry.appspot.com/img/screenshot1.png" alt="" width="224" height="336" /></p>
<p>The idea for a mobile interface to the Registry came out of a moment in the wet lab, where I was supervising the Monash iGEM team, and someone asked &#8220;How many basepairs is that part again ?&#8221;. I&#8217;ve found most ideas for smartphone apps in the lab a little contrived; nothing more than an excuse to jump on the Android or iOS app bandwagon, with limited practical utility. This was a situation where I could genuinely see a use for a simple mobile interface to look up some reference information, so I thought I&#8217;d create it.</p>
<p>The goal is not to completely replicate the functionality of the Registry (at this stage the API would not allow that anyhow), but to provide simple mobile-friendly interface to quickly look up important data about a Biobrick(tm) parts in a laboratory setting, where accessing a desktop computer is often less convenient. In this context, you generally know the part name (eg B0034) that is written on a tube, but would like to quickly lookup some details.</p>
<p>The project consists of two main parts: the web frontend, build using <a href="http://jqtouch.com/">jQTouch</a> and Django templates hosted on <a href="http://code.google.com/appengine/">Google App Engine</a>, and the parser backend (<em>partsregistry.py</em>) that deals with directly querying the Registry API.</p>
<p><img class="alignright" style="border: 2px solid black;" src="http://mpartsregistry.appspot.com/img/screenshot2.png" alt="" width="224" height="336" /></p>
<p>The application uses <a href="http://www.crummy.com/software/BeautifulSoup/">BeautifulSoup</a> on the server side to parse the XML served by the Registry&#8217;s API. This parser may be useful as a generic Python interface to the Registry API for other projects, although it is not yet feature complete. Why parse the XML on the server rather than the client ? The Registry API does not offer JSONP callbacks, making direct client-to-API queries by a web app served from another domain tricky (Same Origin Policy, yadda yadda). While this <em>probably</em> could have been done in straight clientside Javascript if I&#8217;d used some type of cross-domain AJAX hack, parsing on the server side also opens the possibility in the future to &#8216;value-add&#8217; to the data in some way, potentially incorporating extra data not served directly by the Registry API, before it&#8217;s sent to the client.</p>
<p>Google App Engine works as a cheap hosting solution for a low traffic app like this, which is likely to stay within the free quotas. Also, GAE supports Python, and I like Python. <a href="http://jqtouch.com/">jQTouch</a> makes for a reasonable cross-platform mobile web interface, since it is optimized for WebKit-based browsers. While officially jQTouch supports iPhone/iPod Touch and doesn&#8217;t have official Android support, in my hands it works well enough on Android (and in fact displayed some minor bugs on Mobile Safari that were not evident on Android). Typically when using jQTouch you are expected to load multiple &#8216;pages&#8217; all into several div-sections, lumped into a single HTML document. jQTouch then does the Javascript+CSS magic to render fast page switching, which actually working within a single HTML document. Since the main action of this app is to &#8216;search&#8217;, we don&#8217;t yet know what the results page will be, so this nice feature of jQTouch is barely used.</p>
<p>Searching for the same part all the time can get annoying, so mPartsRegistry provides a simple &#8216;bookmarking&#8217; feature where a list of favorite parts can be managed and stored on the device. This is implemented via HTML5 localStorage &#8211; if there was demand then this could easily be turned into server side storage, but I doubt it&#8217;s necessary. In the future, it might make sense to pre-cache the metadata for any of these &#8220;favorite parts&#8221; so that the fast page switching features in jQTouch can be used to full advantage.</p>
<p>Currently, the interface does not show information about sequence features, subparts and twins, however I plan to implement these at some point. The Registry API currently does not provide information about samples, literature references or lab groups, but once these are enabled I plan to support this metadata within mPartsRegistry too.</p>
<p>Okay, that&#8217;s all kids .. and remember .. take off your gloves before using your smartphone in the lab !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2010/10/24/a-mobile-interface-to-the-registry-of-standard-biological-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>The Great Australian Internet Blackout WordPress Plugin</title>
		<link>http://blog.pansapiens.com/2010/01/22/great-australian-internet-blackout-wordpress-plugin/</link>
		<comments>http://blog.pansapiens.com/2010/01/22/great-australian-internet-blackout-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 00:28:49 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[censorship]]></category>
		<category><![CDATA[nocleanfeed]]></category>
		<category><![CDATA[plugin]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=193</guid>
		<description><![CDATA[Normally I stick to posts about science and technology on this blog. Like most Australians, I vote in elections, try to remain informed, but otherwise stay away from getting involved in politics. However, occasionally certain things become important enough issues that they need to be advertised more widely. As you may know, the Australian Federal [...]]]></description>
			<content:encoded><![CDATA[<p>Normally I stick to posts about science and technology on this blog. Like most Australians, I vote in elections, try to remain informed, but otherwise stay away from getting involved in politics. However, occasionally certain things become important enough issues that they need to be advertised more widely.</p>
<p>As you may know, the Australian Federal Government is attempting to censor the Internet within Australia by forcing ISPs to block a list of websites. This <strong>proposed internet filter will not be optional</strong>; it will effect all Australians, and the blocklist will compiled by a small group of people. The<strong> list of blocked sites will remain secret</strong>, so the Australian public will find it difficult to determine if this power is being abused. It <strong>will not prevent the spread of illegal material</strong>, which is typically shared via peer-to-peer networks that will not be blocked by the internet filter. If it is not already self evident why this approach to internet censorship is both an <strong>ineffective, a waste of resources</strong> and a potential threat to the freedom of information flow required for a healthy democracy, you can read more at the <a href="http://www.internetblackout.com.au/">Great Australian Internet Blackout site</a> and the <a href="http://www.efa.org.au/">Electronic Frontiers Australia</a> site.</p>
<p>The Great Australian Internet Blackout is a combined online and offline demonstration against this imposed online censorship. For one week – January 25-29th – Aussie websites will &#8220;black out&#8221; to inform an even wider audience about the threat of imposed censorship.</p>
<div id="attachment_194" class="wp-caption aligncenter" style="width: 302px"><img class="size-medium wp-image-194" title="The Great Australian Internet Blackout popup" src="http://blog.pansapiens.com/wp-content/uploads/2010/01/tgib_popup-292x300.png" alt="This is what it looks like right now. I'm guessing that on January 25th something exciting will appear inside that popup box !" width="292" height="300" /><p class="wp-caption-text">This is what it looks like right now. I&#39;m guessing that on January 25th something exciting (or educational) will appear inside that popup box !</p></div>
<p><span id="more-193"></span></p>
<p>I&#8217;ve created a simple WordPress plugin that makes it a little easier to participate in the demonstration and spread the word. It uses the &#8216;blackout.js&#8217; script written by <a href="http://inodes.org/">John Ferlito</a> to display a popup box that tells the user about the Great Australian Internet Blackout, while &#8220;blacking out&#8221; (significantly darkening) your website in the background. Once the user closes the box things go back to normal &#8211; it uses cookies so they only see the popup once.</p>
<h3 style="text-align: center;"><strong><a href="/wp-content/uploads/internet-blackout-wordpress-plugin/internet-blackout-wordpress-plugin_0.9.zip">Download the Internet Blackout WordPress Plugin</a></strong></h3>
<p style="text-align: center;"><span style="font-weight: normal;">(version 0.9, md5: 16522abb4d492f445a4c5ffccd845c73 )</span></p>
<h3 style="text-align: center;">
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 204px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-weight: normal;">{{{</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 204px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-weight: normal;">git rm path-of-file-to-kill</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 204px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-weight: normal;">}}</span></div>
</h3>
<p><a href="http://codex.wordpress.org/Managing_Plugins">Install it as you would any other simple WordPress plugin</a> &#8211; eg, unzip the archive in your <em>wp-content/plugins/</em> directory on the server. Also, online demonstrations are all well and good, but that shouldn&#8217;t be where it ends. Finish the installation by <a href="http://nocleanfeed.com/action.html">Contacting your Member of Parliament</a>.</p>
<p>This is my first WordPress plugin, so it may be sub-optimal (or even contain bugs !). I&#8217;ve put the <a href="http://github.com/pansapiens/internet-blackout-wordpress-plugin">Internet Blackout plugin  source on Github</a> so that programmer-types can fix it, if need be.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2010/01/22/great-australian-internet-blackout-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>Occyd : tagging for locations</title>
		<link>http://blog.pansapiens.com/2009/02/14/occyd-tagging-for-locations/</link>
		<comments>http://blog.pansapiens.com/2009/02/14/occyd-tagging-for-locations/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 02:08:16 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[occyd]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=109</guid>
		<description><![CDATA[Those who have been watching may have noticed I quietly started developing an Android application in the last month or so. It&#8217;s still super-buggy and far from feature complete, but I thought it was time to announce it here (&#8220;release early, release often&#8221;). It&#8217;s not ready for real users yet, but developers may like to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-113" title="Occyd Map View (search results)" src="http://blog.pansapiens.com/wp-content/uploads/2009/02/occyd_mapview.png" alt="Occyd Map View (search results)" width="320" height="480" /></p>
<p>Those who have been watching may have noticed I quietly started developing an Android application in the last month or so. <strong>It&#8217;s still super-buggy and far from feature complete</strong>, but I thought it was time to announce it here (&#8220;release early, release often&#8221;). It&#8217;s not ready for real users yet, but developers may like to take a little look.</p>
<p><span id="more-109"></span></p>
<p>Occyd (<a href="http://www.bartleby.com/61/12.html"><img src="http://www.bartleby.com/images/pronunciation/obreve.gif" alt="" align="absbottom" />-k <img src="http://www.bartleby.com/images/pronunciation/emacr.gif" alt="" align="absbottom" />d</a> <em>.. sounds like rockied or oggied</em>) is an application for tagging geolocations, aimed at GPS-enabled network-connected devices. It currently consists of an Android client, and a server backend running on Google App Engine. The (evolving) API is simple enough that it should be easy to write clients (or servers) for various platforms. The idea is to enable people to tag locations on the surface of the planet with a list of keywords, just like they can tag web pages with <a href="http://delicious.com/">delicious</a>. They should also be able to search for tagged locations, based on tag(s), on distance from their current location and recency of the post.</p>
<p><img class="alignright size-full wp-image-111" title="Occyd posting screen" src="http://blog.pansapiens.com/wp-content/uploads/2009/02/occyd_post.png" alt="Occyd posting screen" width="320" height="480" /></p>
<p>Here&#8217;s one possible elevator pitch (for a very long, slow elevator ride):</p>
<blockquote><p>&#8220;You are a member of a large bird watching club. Your members like to record where they have spotted various species, and use Occyd to share the locations at which they have sighted various birds. You are out in the park, when you spot the rare Orange Bellied Parrot. You pull out your Android phone, fire up the Occyd client which automatically knows your location via GPS, and tag that current location &#8216;orangebelliedparrot parrot birds&#8217;. You then decide to see if others have spotted parrots in the area. You search for &#8216;parrot&#8217; in the Occyd client; a map appears showing the locations of all the other sightings tagged &#8216;parrot&#8217; in your vacinity. You tweak the search settings to show only &#8216;parrot&#8217; sightings within 100 metres and 14 days &#8230; on the map you see that your friend <em>RobHill</em> spotted an Orange Bellied Parrot here last week &#8211; looks like the numbers of this population are recovering !&#8221;</p>
<p><img class="alignright size-full wp-image-112" title="Occyd searching screen" src="http://blog.pansapiens.com/wp-content/uploads/2009/02/occyd_search.png" alt="Occyd searching screen" width="320" height="480" /></p></blockquote>
<p>Ponder for a bit, and I&#8217;m sure you can think up at least a handful of other great uses (tagging good fishing spots, favorite cafes, or maybe even sightings of parking inspectors <img src='http://blog.pansapiens.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>As with any new project, there are lots more ideas than time to implement them (and I have a day job that doesn&#8217;t involve Occyd &#8230;). The <a href="http://github.com/pansapiens/occyd-android/tree/master">Occyd Android client</a> and <a href="http://github.com/pansapiens/occyd-gae-server/tree/master">Occyd GAE server</a> source is currently available under the GPL v3 on GitHub, and I&#8217;m keeping all my documentation and notes on the <a href="http://wiki.github.com/pansapiens/occyd-android">Occyd Android client wiki</a> provided at GitHub. Watch this space &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2009/02/14/occyd-tagging-for-locations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>QR-code bookmarklets</title>
		<link>http://blog.pansapiens.com/2009/01/02/qr-code-bookmarklets/</link>
		<comments>http://blog.pansapiens.com/2009/01/02/qr-code-bookmarklets/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 01:09:48 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[qrcode]]></category>
		<category><![CDATA[tips]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=95</guid>
		<description><![CDATA[A quick post to share some bookmarklets I made. I&#8217;ve found QR-code &#8220;2D barcodes&#8221; really handy when playing with my Android phone. Sometimes, I have a web page open on my desktop PC, and I want to quickly load it in the Android Chrome browser to see what it looks like. Rather than re-typing it [...]]]></description>
			<content:encoded><![CDATA[<p><em>A quick post to share some bookmarklets I made.</em></p>
<p>I&#8217;ve found <a href="http://en.wikipedia.org/wiki/QRcode">QR-code</a> &#8220;2D barcodes&#8221; really handy when playing with my Android phone.</p>
<p><img class="alignright size-full wp-image-96" title="qrcode" src="http://blog.pansapiens.com/wp-content/uploads/2009/01/qrcode.png" alt="qrcode" width="245" height="245" /></p>
<p>Sometimes, I have a web page open on my desktop PC, and I want to quickly load it in the Android Chrome browser to see what it looks like. Rather than re-typing it with my thumbs, the Barcode Scanner application allows me to scan a QR-code from the screen of my computer, and if the decoded text contains a URL, open it in the Android browser.</p>
<p>These two bookmarklets turn the URL of the current page that is open in your browser into a scannable QR-code:</p>
<p><strong>Google Charts API based bookmarklet:</strong> Drag this link &#8211;&gt;<a href="javascript: location.href='http://chart.apis.google.com/chart?cht=qr&amp;chs=350x350&amp;chl='+escape(location.href);">Current URL to QR-code</a> to your bookmarks toolbar.</p>
<pre>The code is:
javascript:location.href='http://chart.apis.google.com/chart?cht=qr&amp;chs=350x350&amp;chl='+escape(location.href);</pre>
<p>Alternatively, I made a <a href="http://qrcode.kaywa.com">Kaywa QR-code generator</a> version. Drag this link &#8211;&gt;<a href="javascript: location.href='http://qrcode.kaywa.com/img.php?s=8&amp;d='+escape(location.href);">Current URL to QR-code</a> to your bookmarks toolbar.</p>
<pre>The code is:
javascript:location.href='http://qrcode.kaywa.com/img.php?s=8&amp;d='+escape(location.href);</pre>
<p>They both do the same thing, so you probably only want one. Only tested on Firefox.</p>
<p><em>(Update:  seemed WordPress ate the javascript in the bookmarklet links &#8230; should be okay now)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2009/01/02/qr-code-bookmarklets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>A Greasemonkey script: Library Ezproxy Forwarder</title>
		<link>http://blog.pansapiens.com/2008/07/18/a-greasemonkey-script-library-ezproxy-forwarder/</link>
		<comments>http://blog.pansapiens.com/2008/07/18/a-greasemonkey-script-library-ezproxy-forwarder/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 06:05:35 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[publication]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[pubmed]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=76</guid>
		<description><![CDATA[Update: I&#8217;m typically using Google Chrome or Chromium these days, so it&#8217;s unlikely I&#8217;ll update this script in the future. For a similar extension for Chrome, try the EZProxy Redirect extension. Many University libraries use some server software called Ezproxy to do authentication and arbitrate access to full-text online journal subscriptions. Essentially, Ezproxy uses some [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> I&#8217;m typically using Google Chrome or Chromium these days, so it&#8217;s unlikely I&#8217;ll update this script in the future. For a similar extension for Chrome, try the <a href="https://chrome.google.com/webstore/detail/gfhnhcbpnnnlefhobdnmhenofhfnnfhi">EZProxy Redirect extension</a>.</em></p>
<p>Many University libraries use some server software called <a href="http://www.oclc.org/us/en/ezproxy/">Ezproxy</a> to do authentication and arbitrate access to full-text online journal subscriptions. Essentially, Ezproxy uses some URL mangling, rewriting all hyperlinks, to pass traffic via the proxy (rather than using a conventional browser proxy setting). For example, <a href="http://www.sciencemag.org/cgi/content/full/313/5785/314"><strong>http://www.sciencemag.org/cgi/content/full/313/5785/314</strong></a> is changed to <a href="http://www.sciencemag.org.ezproxy.lib.unimelb.edu.au/cgi/content/full/313/5785/314"><strong>http://www.sciencemag.org<em><span style="color: #ff0000;">.ezproxy.lib.unimelb.edu.au</span></em>/cgi/content/full/313/5785/314</strong></a> .  If the user is not logged in to the proxy (ie has no fresh &amp; valid cookie), a login screen is given before being forwarded to the journal site.</p>
<p>This plugin helps mangle URLs to add the proxy domain to outgoing links from various journal sites as well as NCBI PubMed (eg, like .ezproxy.lib.unimelb.edu.au), meaning that the user doesn&#8217;t actively have to go to their library site to follow &#8220;ezproxy-fied&#8221; links. It makes getting full-text articles via the institutional library proxy a more seamless experience (assuming that your library subscribes to the journal).</p>
<p>The plugin contains a list of journal and publisher sites at which it is active, plus some &#8220;special case&#8221; code for making sure only fulltext links outgoing from NCBI PubMed are handled. You can add your own journal sites as needed.</p>
<p>The user needs to edit the variable <em>proxyname</em> to make the script use their institutions EZproxy &#8230; I can&#8217;t really help you with that part, since I only know that my workplace (The University of Melbourne) uses <span style="color: #000000;"><em>.ezproxy.lib.unimelb.edu.au ..</em> beyond that, you are on your own <img src='http://blog.pansapiens.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  !<br />
</span></p>
<p>I&#8217;ve uploaded the <a href="http://userscripts.org/scripts/show/30220">Library Ezproxy Forwarder script to Userscripts.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/07/18/a-greasemonkey-script-library-ezproxy-forwarder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>Software review: producing two dimensional diagrams of membrane proteins</title>
		<link>http://blog.pansapiens.com/2008/06/26/software-review-producing-two-dimensional-diagrams-of-membrane-proteins/</link>
		<comments>http://blog.pansapiens.com/2008/06/26/software-review-producing-two-dimensional-diagrams-of-membrane-proteins/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 20:30:22 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[bioinformatics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[publication]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[structural biology]]></category>
		<category><![CDATA[two-point-oh]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[beta-barrels]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[structure]]></category>
		<category><![CDATA[visualization]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=60</guid>
		<description><![CDATA[I recently needed to make a simple, two dimensional figure of a beta-barrel membrane protein. I went hunting for programs that might take a sequence and/or structure and produce a pretty looking diagram to save me constructing everything by hand. Here are two I found and tried. TMRPres2D Ioannis C. Spyropoulos, Theodore D. Liakopoulos, Pantelis [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/tmrpres2d_lamb_ecoli.png" rel="lightbox[60]"><img class="alignright size-medium wp-image-61" title="TMRPres2D LAMB_ECOLI" src="http://blog.pansapiens.com/wp-content/uploads/2008/06/tmrpres2d_lamb_ecoli-300x250.png" alt="E. coli LamB, presented using TMRPres2D. Not that the cytoplasmic/extracellular labels are incorrect, and should say extracellular/periplasmic." width="300" height="250" /></a><strong><a href="http://bioinformatics.biol.uoa.gr/TMRPres2D/"></a></strong></p>
<p>I recently needed to make a simple, two dimensional figure of a beta-barrel membrane protein. I went hunting for programs that might take a sequence and/or structure and produce a pretty looking diagram to save me constructing everything by hand. Here are two I found and tried.</p>
<p><span id="more-60"></span></p>
<p><strong><a href="http://bioinformatics.biol.uoa.gr/TMRPres2D/">TMRPres2D</a></strong></p>
<p><span>Ioannis C. Spyropoulos, Theodore D. Liakopoulos, Pantelis G. Bagos and Stavros J. Hamodrakas</span><span><strong> TMRPres2D: high quality visual representation of transmembrane protein models</strong><span style="text-decoration: underline;"> Bioinformatics</span>. 2004;  20: 3258-3260. (<a href="http://resolveref.appspot.com/ref/Bioinformatics/2004/20/3258">link</a>)<br />
</span><br />
<strong>Pros:</strong></p>
<ul>
<li> Cross-platform (Java)</li>
<li> Simple interface, GUI (zero learning curve)</li>
<li> Lots of input options (defines transmembrane regions directly from SwissP<a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/tmrpres2d_secy_bucai.png" rel="lightbox[60]"><img class="alignright size-medium wp-image-62" title="TMRPres2D SECY_BUCAI" src="http://blog.pansapiens.com/wp-content/uploads/2008/06/tmrpres2d_secy_bucai-300x197.png" alt="TMRPres2D diagram of SECY_BUCAI. Labels \" width="300" height="197" /></a>rot or PIR annotations online, takes input from several transmembrane region predictors)</li>
<li> Lots of output formats and options (Postscript, gif, jpg, png, svg, bmp)</li>
<li> Various colouring options (hydrophobicity, charge, &#8220;printer friendly&#8221;)</li>
<li> Makes reasonable looking diagrams of helical transmembrane proteins</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li> Doesn&#8217;t handle beta-barrel membrane proteins gracefully (strand drawing is overlapped, messy).</li>
<li>The membrane is assumed to be a eukaryotic plasma membrane, with labels &#8220;cytoplasmic/extracellular&#8221; (which should be, for instance, &#8220;extracellular/periplasm&#8221; for a bacterial outer membrane protein). This is easily changed on the diagram with external editing.</li>
</ul>
<p><strong><a href="http://www.pharmazie.uni-kiel.de/chem/Prof_Beitz/textopo.htm">TeXtopo</a></strong></p>
<p>Beitz, E. (2000), <strong>TeXtopo: shaded membrane protein topology  	plots in LaTeX2e</strong>. <em>Bioinformatics</em> <strong>16</strong>: 1050-1051. (<a href="http://resolveref.appspot.com/ref/Bioinformatics/2000/16/1050">link</a>). See the <a href="http://resolveref.appspot.com/ref/Bioinformatics/2000/16/1050">original publication</a> or <a href="http://www.uni-kiel.de/Pharmazie/chem/Prof_Beitz/biotex.html">Professor Eric Beitz&#8217;s site</a> for a better example than my image.</p>
<p><a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/secy_textopo.png" rel="lightbox[60]"><img class="alignright size-medium wp-image-64" title="SecY textopo diagram" src="http://blog.pansapiens.com/wp-content/uploads/2008/06/secy_textopo-300x214.png" alt="" width="300" height="214" /></a></p>
<p><strong>Pros:</strong></p>
<ul>
<li>Beautiful, clean, publication quality diagrams, courtesy of LaTeX</li>
<li>Multiple input options (Swissprot format, PHD, HMMTOP, user defined)</li>
<li>Multiple sequence annotation options including colouring by various physiochemical properties (hydrophobicity, charge), sequence conservation or user defined schemes.</li>
<li>Will depict membrane embedded half-loops and lipid anchors.</li>
<li>Versatile output (Postscript, pdf, dvi, basically anything that LaTex can be rendered as)</li>
<li>Also can generate attractive looking helical wheel plots</li>
<li>Did I mention the output is clean and looks great &#8230; ?</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Steep learning curve for the uninitiated, despite extensive documentation (ie LaTeX code, no GUI)</li>
<li>No support for beta-barrel membrane proteins</li>
</ul>
<p>If I ever need to make a 2D diagram of a helical membrane protein for a publication, TeXtopo would be my first choice. For quickly getting an overview of some transmembrane prediction results or a protein with defined tranmembrane regions in Uniprot, TMRPres2D is the quickest and easiest method.</p>
<p>In the end, since neither program would do a decent job at cleanly depicting the strands of a beta-barrel in a simple 2D plot, I ended up coding my own hackish solution (<a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/svg_barrel.tar.gz">svg_barrel.tar.gz</a> or <a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/svg_barrel_gui_win32.zip">svg_barrel_gui_win32.zip</a>) using Python and a tweaked version of <em>SVGdraw.py</em>. This allowed me to generate some SVG graphics to use as a starting point, and then hand edit the result in Inkscape to align strands to loosely match the real hydrogen bonding patterns. I also added some simple beizer curves for the loops, since neat placement of loop residues was the tricky part that I decided I didn&#8217;t have time to tackle.</p>
<p>Here&#8217;s the end result, after hand editing:<br />
    <object type="image/svg+xml" width="400" height="400" data="http://blog.pansapiens.com/wp-content/uploads/2008/06/lamb_2d_barrel.svg"><br />
      <img src="http://blog.pansapiens.com/wp-content/uploads/2008/06/lamb_2d_barrel.jpg" alt="SVG barrel diagram"><br />
    </object></p>
<p>And here is the 3D version, as a point of reference:</p>
<p><a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/lamb_ray.jpg" rel="lightbox[60]"><img class="aligncenter size-medium wp-image-69" title="LamB (1MPQ)" src="http://blog.pansapiens.com/wp-content/uploads/2008/06/lamb_ray.jpg" alt="generated using PyMol (raytraced)" width="272" height="300" /></a></p>
<p>The 2D vector diagram could do with some work to aid in a more accurate representation (unfortunately &#8216;flat&#8217; views of a 3D barrel always have to make some compromises), but it does the job. The goal was to keep it simple &#8230; simple it is. One day I may extend this code to actually use known structure coordinates to automatically align the strands (saving tedious manual alignment), and write some code that properly lays out the loops.</p>
<p>Anyone know any other programs of similar functionality I&#8217;ve missed ?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/06/26/software-review-producing-two-dimensional-diagrams-of-membrane-proteins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>Mako templates in Google App Engine:  seems to work for me</title>
		<link>http://blog.pansapiens.com/2008/06/24/mako-templates-in-google-app-engine-seems-to-work-for-me/</link>
		<comments>http://blog.pansapiens.com/2008/06/24/mako-templates-in-google-app-engine-seems-to-work-for-me/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 01:31:33 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mako]]></category>
		<category><![CDATA[templates]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=63</guid>
		<description><![CDATA[For some reason which I can&#8217;t really articulate, I&#8217;m not a huge fan of Django templating. I&#8217;d actually prefer to use Genshi with Google App Engine, but I need to wait until all the kinks are ironed out, since as far as I can tell it&#8217;s not quite working painlessly yet. Another templating option is [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason which I can&#8217;t really articulate, I&#8217;m not a huge fan of Django templating. I&#8217;d actually prefer to use Genshi with Google App Engine, but I need to wait until all the kinks are ironed out, since as far as I can tell it&#8217;s not quite working painlessly yet. Another templating option is <a href="http://www.makotemplates.org/">Mako</a>, which I&#8217;ve barely used, but I still prefer to Django templates. One nice thing about <a href="http://genshi.edgewall.org/wiki/GenshiPerformance">Mako: it&#8217;s faster than most Python templating engines out there</a>. So, here&#8217;s a quickie on how I got Mako working with Google App Engine. It wasn&#8217;t tricky at all, but I thought I&#8217;d document it anyway.</p>
<p>Checkout <a href="http://www.makotemplates.org/download.html">Mako from SVN</a> and copy the directory <em>mako/lib/mako</em> to the path of your application, eg, on Linux:</p>
<blockquote><p><strong>$ cp -r mako/lib/mako myapp</strong></p></blockquote>
<p>(where myapp is the directory that your GAE app lives in).</p>
<p>In your app, obviously you&#8217;ll need to import some parts of mako:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">from</span> mako.<span class="me1">template</span> <span class="kw1">import</span> Template<br />
&nbsp;</div>
<p>Then, whenever you want to render a template as output (say, at the end of a &#8216;get&#8217; or &#8216;post&#8217; method .. see the <a href="http://code.google.com/appengine/docs/gettingstarted/templates.html">GAE templating example</a> for some context), call something like:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="co1"># a dictionary of variables to send to the template namespace</span><br />
foo, bar = <span class="st0">&quot;some&quot;</span>, <span class="st0">&quot;enthralling text&quot;</span><br />
template_values = <span class="br0">&#123;</span><br />
&nbsp; <span class="st0">&#8216;some_foo&#8217;</span>: foo,<br />
&nbsp; <span class="st0">&#8216;some_bar&#8217;</span>: bar<br />
<span class="br0">&#125;</span></p>
<p><span class="co1"># index.mako is the template file in our GAE app directory</span><br />
path = <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">dirname</span><span class="br0">&#40;</span>__file__<span class="br0">&#41;</span>, <span class="st0">&#8216;index.mako&#8217;</span><span class="br0">&#41;</span><br />
<span class="co1"># make a new template instance</span><br />
templ = Template<span class="br0">&#40;</span>filename=path<span class="br0">&#41;</span><br />
<span class="co1"># unpack the dictionary to become keyword arguments and render</span><br />
<span class="kw2">self</span>.<span class="me1">response</span>.<span class="me1">out</span>.<span class="me1">write</span><span class="br0">&#40;</span>templ.<span class="me1">render</span><span class="br0">&#40;</span>**template_values<span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp;</div>
<p>An example of some template text that could go into index.mako could be:</p>
<div class="dean_ch" style="white-space: wrap;">&lt;html&gt;&lt;body&gt;${some_foo} likes the ${some_bar}&lt;br/&gt;&lt;/body&gt;&lt;/html&gt;</div>
<p>One possible modification: I need to look into it, but defining your Template class (eg <em>templ</em> in the example above) in the <em>main()</em> function (maybe as a global) rather than instantiating it every time it is rendered would probably give better performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/06/24/mako-templates-in-google-app-engine-seems-to-work-for-me/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>ResolveRef updated : now with auto-suggest and source code</title>
		<link>http://blog.pansapiens.com/2008/06/06/resolveref-updated-now-with-auto-suggest-and-source-code/</link>
		<comments>http://blog.pansapiens.com/2008/06/06/resolveref-updated-now-with-auto-suggest-and-source-code/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 00:26:37 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[bioinformatics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[two-point-oh]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[resolveref]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=56</guid>
		<description><![CDATA[I updated ResolveRef last night and checked in the most current sourcecode to svn at Google Code. New features include: Suggest/autocomplete for journal title field, using the journal title lists provided by PubMed. A &#8220;Verify&#8221; button. Allows a ResolveRef URL to be constructed with the web form and verified as working and valid without actually [...]]]></description>
			<content:encoded><![CDATA[<p>I updated <a href="http://resolveref.appspot.com/">ResolveRef</a> last night and checked in the most current sourcecode to svn <a href="http://code.google.com/p/resolveref/">at Google Code</a>.</p>
<p>New features include:</p>
<p><a href="http://blog.pansapiens.com/wp-content/uploads/2008/06/resolveref1.png" rel="lightbox[56]"><img class="alignright size-medium wp-image-58" title="ResolveRef" src="http://blog.pansapiens.com/wp-content/uploads/2008/06/resolveref1-230x300.png" alt="ResolveRef, now prettier, with comments box by disqus." width="230" height="300" /></a></p>
<ul>
<li>Suggest/autocomplete for journal title field, using the journal title lists provided by PubMed.</li>
<li>A &#8220;Verify&#8221; button. Allows a ResolveRef URL to be constructed with the web form and verified as working and valid without actually forwarding the user to the article.</li>
<li>Some bugfixes (handled the case where there is no DOI in the PubMed record, handled network timeouts to PubMed)</li>
<li>Refreshed visuals</li>
<li>Disqus comments box for feedback</li>
</ul>
<p>In the interest of just getting something working quickly, I implemented the suggest feature in the laziest, possibly most RAM and CPU hungry way possible (the &#8220;JQuery Suggest&#8221; code queries the web app with substrings as you type each character. At the server side, the app uses a regex to scan a ~1.5 Mb list of journal titles held in RAM). I&#8217;ve already noticed a few &#8220;<em>This request used a high amount of CPU</em>&#8221; warnings in the logs, with the threat &#8220;<em>High CPU requests have a small quota, and if you exceed this quota, your app will be temporarily disabled</em>&#8220;. If my nasty hack starts heating up Google&#8217;s datacentre too much, I might have to disable the &#8216;suggest&#8217; feature until I can implement it &#8220;properly&#8221;.</p>
<p><span id="more-56"></span></p>
<h3>Reflections, discoveries</h3>
<p>This idea of implementing Openref-style article identifiers has been an fun experiment, and a nice way to learn more about the ins-and-outs of PubMed. When working on implementing the &#8216;suggest&#8217; feature, a major drawback became even more apparent &#8230; journal titles (the <em>[TA]</em> field) used by PubMed are not always easily guessable, and many common abbreviations used in reference lists do not appear to exist in <a href="http://www.ncbi.nlm.nih.gov/entrez/citmatch_help.html#JournalLists">PubMed&#8217;s downloadable flat-file journal title lists</a>. This is the list that ResolveRef uses to make the &#8216;suggestions&#8217;, so having &#8216;missing&#8217; journal titles presents a problem if I want users to be able to painlessly construct ResolveRef URLs.</p>
<p><em>Proc. Natl. Acad. Sci. U.S.A. </em>is a perfect example. Many article bibliographies use <em>PNAS</em> &#8211; that would be my guess if I were trying to create a ResolveRef URL for a <em>PNAS</em> paper &#8211; and yet this journal title does not exist as far as PubMed&#8217;s official journal list is concerned. Issues surrounding this problem were <a href="http://baoilleach.blogspot.com/2008/01/doi-or-doh-proposal-for-restful-unique.html">discussed on Noel&#8217;s original OpenRef post</a>. The odd thing, is that if I search the <a href="http://www.ncbi.nlm.nih.gov/sites/entrez?db=journals">PubMed Journals database</a>, for &#8220;PNAS&#8221;, <a href="http://www.ncbi.nlm.nih.gov/sites/entrez?Db=nlmcatalog&amp;doptcmdl=Expanded&amp;cmd=search&amp;Term=7505876[NlmId]">it finds it</a>, and gives me a record where <em>PNAS</em> is listed under &#8220;Other titles(s)&#8221;. If someone could point me to where I can get these extra fields containing additional names for a journal that are not provided in the the downloadable flat-files, it would be much appreciated (I bet Alf knows the answer. Or maybe I should email the folks at PubMed). If I can get a better list of titles the &#8216;suggest&#8217; feature in ResolveRef would suddenly become a whole lot more useful. Another way around this may be to use CrossRef, and I&#8217;m looking int<span style="color: #000000;">o tha</span><span style="color: #000000;">t, </span><span style="color: #000000;"><a href="http://depth-first.com/articles/2008/05/06/hacking-doi-interconvert-bibliographic-references-and-dois-with-crossref-and-openurl">but I get the feeling that usage of the CrossRef API is more restricted</a>, so I haven&#8217;t bothered with it so far.<br />
</span></p>
<h3>Thoughts about the future of ResolveRef / OpenRef</h3>
<p>At this stage, ResolveRef URLs are not actually identifiers. They simply act like a frontend to a single-hit PubMed search, and several <em>different</em> ResolveRef URLs can return the <em>same</em> DOI URL (and hence the same journal article). A proper identifier would have a one-to-one mapping between the human-readable ResolveRef URLs and a DOI. In the future, I may attempt to get ResolveRef to &#8216;normalize&#8217; URLs by allowing only a single journal title for each journal and forcing the use of volume numbers if present. The user could use the web interface to enter the values, and ResolveRef will return a normalized URL. Only normalized URLs would successfully forward to the DOI URL, others will return an error with &#8220;Did you mean ..<em>insert normalized URL ..?</em>&#8220;. One drawback is that this would reduce the guessablity of ResolveRef URLs, but the advantage is that they could be treated like identifiers: one article would have one and only one valid ResolveRef URL. By requiring a tool (like the ResolveRef web form) to help users build a vaild URL, and removing some of the guessability, ResolveRef would move a little closer to a <a href="http://hublog.hubmed.org/archives/001601.html">reinvention of OpenURL</a> (although I think OpenRef/ResolveRef URLs are still more readable and cleaner than OpenURLs, and are much more guessable if you have a bibliography in front of you).</p>
<p>A key cosmetic (and philosophical) difference between OpenURL and OpenRef/ResolveRef URLs is that OpenURL uses HTTP GET fields, eg <em>?title=bla&amp;issn=12345</em>, while OpenRef/ResolveRef uses the URL path itself eg, <em>somejournalname/2008/4/1996</em>. It&#8217;s a bit like one scheme was designed in the age of CGI scripts, while the other was designed for web applications capable of more RESTful behaviour. In my mind OpenURL is more versatile but much uglier, while OpenRef is cleaner and simpler but can only reference journal articles. OpenRef-style URLs will never be able to reference the breadth of resources that an OpenURL can theoretically handle. Maybe hybrid solution could work &#8230; some kind of OpenURL server that could &#8220;speak OpenRef&#8221; &#8230; accepting OpenRef-style URLs where possible, while still dealing with regular OpenURL style &#8220;<em>?bla=blarg&amp;</em>&#8221; query strings for everything else.</p>
<p>As far as I can tell OpenURLs are not <em>identifiers</em> with a one-to-one URL-to-article mapping &#8211; this is a drawback since you could not do a Google search to reliably find sites that reference an article via it&#8217;s OpenURL &#8230; you theoretically could do this with a normalized OpenRef/ResolveRef URL, since there will only be one unique string used to reference any one article (as Noel pointed out, OpenRef strings have some properites akin to InChi strings). Obviously to do this cleanly, ResolveRef would need a nicer domain (something akin to dx.doi.org).</p>
<p>Anyhow, I&#8217;m not expecting ResolveRef / OpenRef to make any impact on anything anywhere anytime soon. I&#8217;m not a librarian, I don&#8217;t sit on an <a href="http://listserv.oclc.org/scripts/wa.exe?A0=OPENURL">NISO/ANSI committee</a>, and I don&#8217;t see publishers seeing a need to adopt anything beyond the DOI. But it&#8217;s been nice to play around with, and I&#8217;m likely to continue doing so.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/06/06/resolveref-updated-now-with-auto-suggest-and-source-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>ResolveRef : looking at the logs</title>
		<link>http://blog.pansapiens.com/2008/06/01/resolveref-looking-at-the-logs/</link>
		<comments>http://blog.pansapiens.com/2008/06/01/resolveref-looking-at-the-logs/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 08:29:24 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[bioinformatics]]></category>
		<category><![CDATA[biopython]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[two-point-oh]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[resolveref]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=54</guid>
		<description><![CDATA[One of the nice features of Google App Engine is you can easily view logs for your application to quickly see requests generating errors. Browsing the logs of ResolveRef, I&#8217;ve been able to identify an few classes of query which for one reason or another, weren&#8217;t working. Firstly, there is the &#8220;just testing and don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice features of <a href="http://code.google.com/appengine/">Google App Engine</a> is you can easily view logs for your application to quickly see requests generating errors. Browsing the logs of <a href="http://resolveref.appspot.com/">ResolveRef</a>, I&#8217;ve been able to identify an few classes of query which for one reason or another, weren&#8217;t working.</p>
<p><span id="more-54"></span></p>
<p>Firstly, there is the &#8220;just testing and don&#8217;t actually have a citation on hand to key-in&#8221; class of users, that tried requests something like:</p>
<blockquote>
<h5><span class="file">/ref/xx/2007//</span></h5>
</blockquote>
<p>Not much sympathy here &#8230; it&#8217;s pretty much like dialing a random phone number and hoping it someone will pick up.</p>
<p>Then there is a class of users who appear to have sensible intentions, but provide incomplete ResolveRef URLs, eg:</p>
<blockquote>
<h5><span class="file">/ref/Organic%20Letters/2000//</span></h5>
</blockquote>
<p>Maybe I poorly described ResolveRef in the initial announcement, maybe the documentation in the &#8220;About&#8221; box on the ResolveRef site is unclear or maybe these users just didn&#8217;t read the docs in the first place. When I described the service as &#8220;A RESTful way to do PubMed searches&#8221;, maybe it would have been more accurate to say &#8220;A simple, RESTful way to resolve a <em><strong>single</strong></em> journal article using only the human-readble citation information&#8221;. ResolveRef does not give a <em>list</em> of results to a PubMed search; it forwards to a <em>single hit</em> (ideally the requested article), or gives an error if it can&#8217;t be found. By the looks of it, many users seem to want to use ResolveRef as a way to retrieve a list of results. While this goes against the original spirit of ResolveRef being a resolver for an [almost] <em>unique identifier</em> for journal articles (akin to <a href="http://baoilleach.blogspot.com/2008/01/doi-or-doh-proposal-for-restful-unique.html">Noel&#8217;s OpenRef proposa</a>l), I may be tempted to update ResolveRef to return a list of hits in the future (or just forward to the <a href="http://hubmed.org">HubMed</a> or PubMed results page).</p>
<p>There are also some <em>actual</em> bugs which throw nasty python backtraces (I think this one was actually me trying to use ResolveRef to look up a reference at work ):</p>
<blockquote><p><strong><br />
/ref/Protein%20Sci/1999/8/689</strong></p></blockquote>
<p>This threw an error since ResolveRef (stupidly) assumed that every PubMed record has an associated DOI &#8230; however for some reason this Protein Science article does not have a DOI recorded in PubMed, so it fails to resolve with ResolveRef. This is (yet another) drawback to using PubMed as a backend. I&#8217;m thinking I may need to make ResolveRef <a href="http://depth-first.com/articles/2008/05/06/hacking-doi-interconvert-bibliographic-references-and-dois-with-crossref-and-openurl">interface with CrossRef</a> somehow too, since that may act as a backup (or complete replacement) for these cases.</p>
<p>There also seem to be occasional errors generated when the HTTP connection from the Google App servers to PubMed fails; my fault entirely &#8230; that type of exception should always be anticipated and caught in a networked application.</p>
<p>Apart from guessing how people may like to use the application by examining the logs, <span class="gray"><a href="http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chMLEgxBcHBsaWNhdGlvbnMYnAcM"><em>edoardo.marcora</em> also suggested that autocomplete/suggest</a> for the journal field would be nice. I agree &#8230; this was a feature I was working on prior to the initial release, but it was taking too long so I just launched ResolveRef without it.</span></p>
<p>There is a new version in the pipeline, and will be ready for release soon. I&#8217;ll also put it on Google Code, warts and all. I already have the &#8220;suggest&#8221; functionality working, and once I resolve the few bugs discussed above, I&#8217;ll push out an update. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/06/01/resolveref-looking-at-the-logs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
		<item>
		<title>Announcing ResolveRef on Google App Engine</title>
		<link>http://blog.pansapiens.com/2008/04/23/announcing-resolveref-on-google-app-engine/</link>
		<comments>http://blog.pansapiens.com/2008/04/23/announcing-resolveref-on-google-app-engine/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 00:29:21 +0000</pubDate>
		<dc:creator>Andrew Perry</dc:creator>
				<category><![CDATA[bioinformatics]]></category>
		<category><![CDATA[biopython]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[app engine]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[openref]]></category>
		<category><![CDATA[resolveref]]></category>
		<category><![CDATA[turbogears]]></category>
		<guid isPermaLink="false">http://blog.pansapiens.com/?p=48</guid>
		<description><![CDATA[About two weeks ago, tipped off by Neil, I heard about Google App Engine. I managed to get a beta account, and I&#8217;ve finally had a chance to do something (hopefully) useful with it. In the absence of any quickly achievable ideas for a bioinformatics app, I ported over the OpenRef application I wrote on [...]]]></description>
			<content:encoded><![CDATA[<p>About two weeks ago, <a href="http://nsaunders.wordpress.com/2008/04/08/googles-appengine/">tipped off by Neil</a>, I heard about Google App Engine. I managed to get a beta account, and I&#8217;ve finally had a chance to do something (hopefully) useful with it.</p>
<p>In the absence of any <em>quickly achievable</em> ideas for a bioinformatics app, I ported over the <a href="http://blog.pansapiens.com/2008/01/18/an-openref-implementation/">OpenRef application I wrote on top of TurboGears</a> a few months back.</p>
<p>Just like the original, the new app, <a href="http://resolveref.appspot.com/">ResolveRef</a>, is essentially a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful</a> way of doing PubMed queries.<br />
<span id="more-48"></span><br />
A query like:</p>
<p>http://resolveref.appspot.com/ref/<strong>journal</strong>/<strong>year</strong>/<strong>volume</strong>/<strong>page</strong></p>
<p>or when there is no volume number, like:</p>
<p>http://resolveref.appspot.com/ref/<strong>journal</strong>/<strong>year</strong>/<strong>page</strong></p>
<p>will query PubMed and forward you to the DOI. Usually this means you will be forwarded to the electronic version of the article at the publishers site. The nice thing about these OpenRef style URLs is that unlike the DOI (eg <span>doi:10.1093/molbev/msm031)</span> or PubMed ID (eg PMID:17329230), they are easily guessable if you have the biblographic reference in front of you. See <a href="http://baoilleach.blogspot.com/2008/01/doi-or-doh-proposal-for-restful-unique.html">Noel&#8217;s original OpenRef post</a> and the &#8220;About&#8221; box at <a href="http://resolveref.appspot.com/">ResolveRef</a> for more details.</p>
<p>Here&#8217;s a reference and the corresponding ResolveRef URL you can click on to test it out:</p>
<div class="journ container"><span class="creator vcard"><span class="url n"><abbr class="fn" title="Ian E Gentle"><span class="family-name"> </span></abbr></span></span>Gentle IE, Perry AJ, Alcock FH, Likić VA, Dolezal P, Ng ET, Purcell AW, McConnville M, Naderer T, Chanez AL, Charrière F, Aschinger C, Schneider A, Tokatlidis K, Lithgow T<em>, &#8220;Conserved motifs reveal details of ancestry and structure in the small TIM chaperones of the mitochondrial intermembrane space</em>&#8220;,<strong><abbr class="title" title="Molecular biology and evolution"> <span style="#ff0000;">Mol Biol Evol</span></abbr></strong>.<abbr class="date-published" title="2007-May"> <span style="#ff0000;"><strong>2007</strong></span>, </abbr><span style="#ff0000;"><strong><span class="volume">24</span></strong></span>(<span class="issue">5</span>): <abbr class="uri" title="issn/0737-4038"><span class="pages"><span style="#ff0000;"><strong>1149</strong></span>-60</span></abbr></div>
<p><a href="http://resolveref.appspot.com/ref/Mol Biol Evol/2007/24/1149">http://resolveref.appspot.com/ref/Mol Biol Evol/2007/24/1149</a></p>
<p><em>(wow &#8230; I really should have chosen one without such a large forest of authors <img src='http://blog.pansapiens.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  )</em></p>
<p>I&#8217;ve called it ResolveRef  rather than OpenRef, since based on <a href="http://baoilleach.blogspot.com/2008/01/doi-or-doh-proposal-for-restful-unique.html">the discussion on Noel&#8217;s blog</a>, it became clear that this method of mapping PubMed queries to URLs doesn&#8217;t completely fulfill Noel&#8217;s vision of what an OpenRef resolver is meant to be. It looks like this discussion is on-going (and has been had before) &#8230; in some ways it looks like this style of reference location by URL has missed the boat since DOIs and the <a href="http://www.crossref.org" target="_blank">CrossRef</a> database are already well established and prevalent.</p>
<p>As far as how difficult the porting from Turbogears was &#8230; well, for an app like this with no database access, and essentially no web interface templates (I only added the front page with a form for the ResolveRef version, the original app served no actual html pages) &#8230; it was pretty straightforward, and I nice way to learn some of the ins-and-outs of App Engine. The biggest trick was hacking the <a href="http://biopython.org">Biopython</a> <strong>Bio.EUtils.ThinClient</strong> class to use Google App Engines <strong>urlfetch</strong> rather than <strong>urllib2</strong>, which amounted to changing something like:</p>
<pre>
import urllib2
return urllib2.open(url)
</pre>
<p>to</p>
<pre>
from google.appengine.api import urlfetch
fetched = urlfetch.fetch(url)
return cStringIO.StringIO(fetched.content)
</pre>
<p>Bugs and feature requests are welcome &#8230; but I don&#8217;t make any promises about fixing/adding them. I&#8217;ll release the code soon, when I get some time to clean it up for public consumption <img src='http://blog.pansapiens.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pansapiens.com/2008/04/23/announcing-resolveref-on-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/publicdomain/zero/1.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

