mPartsRegistry : small update

I just made a small update to mPartsRegistry, the mobile interface I wrote to make browsing the Registry of Standard Biological Parts a little easier on smartphones.

This update adds a “Random Part” button – it’s mostly just so people who want to play with it without actually knowing a part ID can get some instant gratification. This is in addition to the quiet update I made a few months ago to replace jQTouch with JQuery Mobile, since jQTouch development stagnated for a while and never really properly supported most mobile browsers.

Wiider postmortem

I always intended to write this postmortem earlier … now three years after development ceased, I’m finally getting around to it. Warning – retrospective rambling ahead.

In mid 2007, Nintendo released the Opera-powered browser for their Wii gaming console which they called the Internet Channel. For many people, including myself, this was the first time they had been able to use “Internet on the TV”. Because of the typical viewing distance, low resolution for CRT-based televisions, and the unique navigation interface using the Wiimote, many web sites were functional but not particularly comfortable to use. Many sites targeted at desktop PCs were too complex and heavyweight for the Internet Channel, fonts were often too small such that cumbersome zooming and scrolling was required. I felt this was a good opportunity to write a Wii-browser specific app – in particular, I wanted a news reader that was comfortable to use in a lounge room setting, controlled via the Wiimote.

I started the Wiider project around Dec 2007, as the successor to a Wii-specific news aggregator service I had set up called WiiRSS. The last SVN commit for Wiider was in Dec 2008.

The goal of the Wiider project was to create a web-based news feed reader optimized for the Nintendo Wii Internet Channel. Features included:

  • Wii-friendly user interface – large TV friendly fonts, simple navigation
  • Cookie-less view-only access for a personal feed list (via ?key=xxx, bookmarked on the Wii once you’ve logged in)
  • Wiimote navigation controls, beyond what the browser provides
  • Painless image zooming (eg Lightbox)
  • RSS and ATOM feed support
  • Easy feed discovery using the Google Feed API
While I’ve since retired the project, I felt it would be good to document some of the insights I gained as a result of developing it.

Running a local JABAWS server for Jalview on Ubuntu (11.04 Natty)

The excellent Jalview sequence alignment visualization and editing tool has the ability to send a set of sequences to a multiple sequence alignment web service (“JABAWS”) and receive the results in a new alignment window. This is really convenient when you are doing lots of sequence analysis, and Geoff Barton’s group at the University of Dundee provide a JABAWS server that Jalview will use by default.

But maybe the Dundee server is down. Or maybe you think your local machine will do things faster. Or maybe you work on über secret sequences in some Faraday cage bunker with no permanent network connection. In each of these cases, you may want to run your own local JABAWS server and use that instead. In this case, read on.

Continue reading

A mobile interface to the Registry of Standard Biological Parts

Recently I developed a simple mobile interface to the Registry of Standard Biological Parts – the database that is currently the focal point for parts-based synthetic biology. I’ve called this mobile interface mPartsRegistry and I thought it would be worth outlining it’s features and sharing some notes about the project, in case someone else finds it useful.

mPartsRegistry is a simple interface to the Registry of Standard Biological Parts aimed at mobile smartphone browsers. It’s powered by the Parts Registry API, which provides a simple RESTful interface to key metadata about parts in the database. It features:

  • A simple interface tailored for mobile WebKit browsers (Android browser, mobile Safari, probably others). Web-based, zero-installation required.
  • Basic search of the Registry by part name.
  • “Favorite parts” to locally bookmark parts on your device.
  • Provides basic metadata associated with parts, including size, description, authors, DNA sequence, categories and availability.
  • Freely available and recyclable source code, released under the MIT License (fork it on GitHub).

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 “How many basepairs is that part again ?”. I’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’d create it.

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.

The project consists of two main parts: the web frontend, build using jQTouch and Django templates hosted on Google App Engine, and the parser backend (partsregistry.py) that deals with directly querying the Registry API.

The application uses BeautifulSoup on the server side to parse the XML served by the Registry’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 probably could have been done in straight clientside Javascript if I’d used some type of cross-domain AJAX hack, parsing on the server side also opens the possibility in the future to ‘value-add’ to the data in some way, potentially incorporating extra data not served directly by the Registry API, before it’s sent to the client.

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. jQTouch 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’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 ‘pages’ 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 ‘search’, we don’t yet know what the results page will be, so this nice feature of jQTouch is barely used.

Searching for the same part all the time can get annoying, so mPartsRegistry provides a simple ‘bookmarking’ feature where a list of favorite parts can be managed and stored on the device. This is implemented via HTML5 localStorage – if there was demand then this could easily be turned into server side storage, but I doubt it’s necessary. In the future, it might make sense to pre-cache the metadata for any of these “favorite parts” so that the fast page switching features in jQTouch can be used to full advantage.

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.

Okay, that’s all kids .. and remember .. take off your gloves before using your smartphone in the lab !

Stack Exchange sites for science

Recently I’ve noticed the emergence of several Stack Overflow-style sites for science-related questions and answers. For those unfamiliar with Stack Overflow – it’s a question and answer ‘forum’ for computer programmers that keeps the signal-to-noise ratio very high through a carefully refined reputation system. Late last year the creators of Stack Overflow launched a hosted service called Stack Exchange, which allows anyone to start their own “Stack Overflow” based around any topic.

2363694735_507a4eea3b_o

http://www.flickr.com/photos/alicebartlett/ / CC BY-NC 2.0

The service is was a little pricey ($129+/month), and I suspect this is one reason why a few open source clones inspired by Stack Overflow also exist. Since then, Stack Exchange sites (or clones) have proliferated – and those working as scientists (or those interested in science) haven’t been neglected. Here are my favorites:
  • MajorGroove.org pitches itself as a ‘forum for biologists’, which it is, however most of the content currently focuses on X-ray crystallography and associated techniques. It is currently in ‘bootstrap mode’, which means that reputation requirements are a little less strict until the userbase and site activity has grown to a critical size. Is there even a need for a Stack Exchange forum for biological crystallography ? Macromolecular crystallography already has a single, central, de facto standard forum – the CCP4BB mailing list. While it may be antiquated by Web2.0 standards, CCP4BB works well for a lot of people, and there is a huge amount of useful and important information buried in it’s archives. For many crystallographers, it seems CCP4BB would only be extracted from their “cold dead hands”. Despite this, I think the Stack Overflow format will be very beneficial for people new to the field.  As a side note - I discovered MajorGroove via Graeme Winters XIA2 blog right around the time when I was considering kickstarting a “Stack Overflow for crystallography”. At the moment it seems that a small userbase of crystallographers is already established on MajorGroove and there would be no purpose for another near identical forum. Even if questions about other techniques in the biosciences start to dilute out the structural biology, one click on the ‘crystallography‘ tag or the ‘ccp4‘ tag, and you can get straight to the good stuff. (In fact this feature was deemed useful enough by Google that they decided to bless the ‘android‘ tag on Stack Overflow as the official Android Q&A forum).
  • NMRWiki Q&A (http://qa.nmrwiki.org/) is a StackExchange-clone for magnetic resonances, mostly focused on NMR, but also open to EPR/ESR and MRI users. It’s not actually running on the StackExchange platform, but uses the open source OSQA / CNPROG clone, built on top of Django. As far as I know, there is no “CCP4BB for NMR”, which makes the NMRWiki Q&A site potentially even more valuable to structural biologists than it’s crystallography centric cousin, MajorGroove. Back when I was doing my PhD using protein NMR spectroscopy as my primary technique, there were very few good resources like this online – I do less NMR these days, but you can bet that I’ll be using the NMRWiki Q&A and it’s associated wiki to refresh my memory and catch up on need methodological developments in the future.
  • BioStar (http://biostar.stackexchange.com/), a StackExchange for bioinformatics, computational genomics and systems biology questions and answers. This one is busier and better established than the above mentioned forums, probably by virtue of the fact the bioinformaticians spend more time in front of the computer than your average molecular biologist or structural biologist.
  • And, for a bit of fun: Skeptic Exchange (http://exchange.bristolskeptics.co.uk/), which covers rational questions and answers to various topics including pseudoscience, faith healing, the supernatural and alternative medicine.

Want more ? There are a bunch of science related StackExchanges listed under “Science” here: http://meta.stackexchange.com/questions/4/list-of-stackexchange-sites .. and digging back through the FriendFeed archives I see Matt Todd initiated a concise listing (which if I’d seen, I probably never would have started this post).

And now, the latest* news Stack Exchange 2.0 will be ‘free‘. It looks like they are trying to structure the new Stack Exchange ecosystem a bit like the Usenet hierarchy (comp.*, rec.* etc), with a fairly involved discussion, proposal and acceptance process for new sites – it’s unclear yet whether this approach is going to work out better than just open sourcing the whole shebang, but time will tell. My guess is that BioStar, MajorGroove and probably even an incarnation of NMRWiki Q&A will eventually become part of this formalized ecosystem.

On one hand making StackExchange sites free to run is great – it lowers the barrier to entry to allow many more sites to emerge and operate. On the other hand, as we have seen with the acquisition of FriendFeed by Facebook, not having a clear revenue stream can ultimately leave communities  (such as The Life Scientists) without any certainty in a sites future, potentially impacting growth and participation. Personally I’m much more inclined to invest time in a site if it is something like Wikipedia, where I know my contributions are very likely to live on, in some form, for decades (centuries ?) to come. Ideally the archives of these new Stack Exchange sites could become useful online resources for decades to come – but with a single company at the helm and a “Web 2.0 business model”, continued operation for even a decade seems unlikely. The one saving grace: all content on the new Stack Exchange sites will be licensed under a Creative Commons license – so if Stack Exchange itself is acquired and shut down, we will always be able to preemptively leech the archives and provide them online elsewhere. Maybe it’s strange that I’m already thinking about archiving the new Stack Exchange upon it’s demise before it’s even begun, but I think it’s important to take the long term view with our data and recorded wisdom. Unlike when in 1994 when GeoCities (R.I.P) was started, teh Internets is no longer a fad – the hard disks connected to it are fast becoming the sum of all accessible human knowledge, so we’d better make sure we can retain the good bits for a little longer than 10 years.

* – as all too common these days .. I’m a little behind the curve on this one. I meant to finish this post a month ago, but with a busy time pre-holiday, then the actual holiday, a month has gone by.