2014 redux

The year of 2014 is almost over, so it’s time to write the summary. The year started by taking a few unexpected turns that I could not have predicted, but things turned out well, and a lot got done.

The original game plan for 2014 was to buckle down and finish building some of the technologies and products that had been on the roadmap for a little too long for my liking. Since the previous year had involved a great deal of travel and activities other than sitting down and building scientific software, I found myself in the unfamiliar scenario of having promised more than I delivered. Perhaps I will get used to this someday, but I still find it rather disconcerting.

One of the first new pieces of functionality for the year resulted from discussions with some of the OpenPHACTS team at the NETTAB meeting in Venice several months previous, where I found out that the project has an open API that allows searching of marked up assay data for compounds. It is now possible to use the MetaSearch feature of the Mobile Molecular DataSheet app to fetch this data, for specific molecules or collections of molecules. The interface is slightly unwieldy in cases where there is a lot of information (e.g. looking up all the data for an ancient drug like aspirin), but it is quite functional.

Following up from a project with Collaborative Drug Discovery, I finished the delivery of an implementation of the “circular fingerprints” commonly referred to by names such as “ECFP_6” or “FCFP_6”. This was made available for use in the Chemical Development Kit, and so is now in the hands of everyone who uses this open source toolkit. This is not the first open implementation of this fingerprint type, but it is novel in that the algorithm is self-contained within a single code module, which means it is quite easy to port it to a different platform or toolkit and have it produce the exact same results. This kind of portability is a major and understated feature, because it means that models built with one software stack can be evaluated and applied with a variety of different software packages.

Following up the release of the fingerprint implementation, the algorithm was promptly ported to Objective-C and delivered as part of v2 of the TB Mobile app. This major release included a user interface overhaul (for iOS 7), a fair bit more curated data, and a similarity ordering system that uses the portable ECFP6 fingerprints. Furthermore, the data preparation stage for the app includes building a Bayesian model for each of the TB targets. The user can draw or import structures and view the predicted likelihood of activity against the various known targets. Also, a novelty feature was added to the app: dynamic clustering, in which a selected compound is represented graphically in the middle of a 2D cluster. Needless to say the similarity metric uses ECFP6 fingerprints.

Having delivered these tools, as well as the basis for the Bayesian modelling feature in CDD Vault, we wrote up a paper for the Journal of Cheminformatics, which describes the underlying technology and its uses. This is an open access journal, so no need to worry about getting stopped at a paywall.

Not long afterward, I skipped out on the last weeks of the Montreal winter and headed for San Francisco for a sabbatical with Collaborative Drug Discovery, who had a research project that needed to be executed with a certain degree of urgency, involving analysis of biological assay data of the textual variety being marked up in an ontological form. While it has been a few years since I last did any natural language analysis, it’s always good to sharpen up some old skills/try something out of one’s familiar comfort zone every once in awhile, and access to more biological assay data is quite germane to my usual activities. The project went rather well: using a prepackaged open source library took care of the lexical parsing, and since I had been working with Bayesian models recently, that’s what I tried feeding it into first. To a man with a hammer every problem looks like a nail, and in this case it paid off. You can read all about it in the paper we published in PeerJ.

Speaking of PeerJ, it was my pleasure to contribute to this journal, which I have been watching for awhile. They are a company that is trying to disrupt the scientific publishing industry by operating with low overheads, so scientists are not presented with a choice between two evils: expensive author-pays vs. all readers pay. Instead, authors pay a nominal fee, readers pay nothing, and the process has a higher degree of automation than most journals. Because the journal is mainly focused on biology, this one was able to squeeze in because it could be described as bioinformatics.

In 2014 I only attended one scientific conference, the American Chemical Society meeting in Dallas. I gave two talks, one being about cloud computing with mobile apps, and the other describing my Green Lab Notebook (GLN) app, which was at the time still vapourware. Once I returned from California, finishing the app was a high priority, and it was released shortly after. The GLN app has two main notable capabilities: it can represent multistep reactions in an informatically pure way that has a very high degree of machine readability, and it has always-on calculation of green chemistry metrics (process mass intensity, E-factor, atom economy) which should ideally become as important to chemists as characteristics like yield and scale. The GLN app is currently quite powerful, but the list of functionality still yet to implement is rather long.

Unfortunately I returned from San Francisco a week too soon to be able to attend the autumn American Chemical Society meeting which was in town. The reason I couldn’t make that is due to the timing of my birthday, and this year was important, because I turned 40. Since I had not been back to my home country of New Zealand for a long time, and because the west coast is closer to the south Pacific, I figured it was time to make the pilgrimage.

Prior to my sabbatical, I had agreed to write a book chapter about green chemistry in drug discovery informatics. The deadline being what it was, I essentially had a month to write the whole thing, in between working on a major new research project, and figuring out the logistics of living in San Francisco for several months. The chapter is finished and revised, and it should be coming out sometime next year, published by the Royal Society of Chemistry (RSC).

Speaking of the RSC, the organisation commissioned an overhaul of the popular ChemSpider Mobile app, which I built for them some years ago. The original 1.0 version erred on the side of being quite simple: nobody whether it would take off, so we assembled it quickly just to get something out there. A portion of the summer was spent re-skinning the app to make it look nice on iOS 7, and to give it the degree of functionality it deserves: advanced searches, result saving, detailed previews, etc. Also during the upgrading of the app, we uncovered a few glitches with the underlying API which were fixed, and so the searching process is much faster and way more reliable than it was. All things considered, I’m very happy with the way it turned out.

And speaking of the RSC once again, there is another project that I have contributed to: the Medicinal Chemistry Toolkit app. This product is currently on the iTunes AppStore, supporting a physical textbook, and there will be a new version coming out soon that has chemical structure capabilities. This will allow the user to sketch out a structure and observe properties being calculated, like logP, ligand efficiency, lipophilic efficiency, and a graphical rendition of the Astra-Zeneca “ugly structure” filters. While the sketcher tools are taken straight out of my preexisting libraries, some of the calculations required technology to be ported from my serverside (Java) libraries into Objective-C, so they could be used to create cheminformatics calculations that are disallowed from using a webservice. This took most of the time, but now it is done, and apps just got a fair bit more sophisticated: my core libraries now include substructure query searches, as well as the aforementioned circular fingerprint generation and Bayesian modelling.

Another project that got started before my sabbatical, and had to be finished after it was over, is the Valence app. This is co-designed with TouchText LLC, and is my first attempt to create an app that is designed exclusively for the education market, as opposed to dual purpose efforts to interest students and professionals both. The Valence app introduces students of any age to the concepts of the Lewis octet rule (no relation to Lisa Lewis, my partner in crime for this project). The app was announced at the International Conference on Chemistry Education (ICCE) in Toronto, which I was originally intending to present in person, but was on the other side of the continent. The Green Lab Notebook app was also preannounced, by proxy.

Halfway through 2014, Apple announced two technologies that caught my attention: Swift and iCloud Drive. Normally I tend not to be an early adopter of Apple’s latest [not necessarily greatest], and wait at least a few months to start updating tools and products. There are always plenty of other eager beavers out there with nothing better to do than break their teeth on the newest of the new, but this time around I joined them, and unfortunately regretted it. The Swift programming language looked like it would be rather awesome, and replace Objective-C, which is rather the opposite of awesome. It turns out that it needs to go back in the oven for quite awhile. Same with iCloud Drive: it was promised to be basically Dropbox integrated into all of Apple’s products, but it seems to have some undocumented limitations (like not working, for example). I suspect both of these technologies will be long term winners, but that’s for the future, not the present.

In order to test the Swift language, I at least had the sense to refrain from updating my main codebase, and instead created a novelty new app, called the Beer Lab Notebook. The name is a tongue-in-cheek suggestion that it’s a companion to the Green Lab Notebook app, to the extent that these days the closest I get to my practical laboratory roots is by practicing my hobby of zymurgy.

After checking off some of the major projects that I had intended to release much sooner, I turned my attention to the first and most fundamental technology that my company created: the gesture-based chemical structure sketcher that is the basis of all the mobile products that I have created. Since the beginning I have struggled with the paradox of needing to redesign the familiar user interface paradigm in order to make sketching molecules excellent on a touchscreen. If you try to reproduce the standard toolbox from the desktop era, the result will be unusable on a phone and mediocre on a tablet. If you accept the redesigned approach that I came up with in 2010, it will be great on any form factor, but requires learning some new ideas. And even though I was under no illusions about peoples’ resistance to learning new software interfaces, the mobile space is even less forgiving than one might think. Over the years I’ve tried various ways to inject tips, tutorials, training modes, etc., but never been very satisfied with the way they worked. And so these concepts (tips/tutorials/training) have been integrated more gracefully into the sketcher interface, in order to better ease the discordance of being thrown into a different way of doing things. This will no doubt be an ongoing process.

On the subject of sketchers, I have been finding myself using a Mac more regularly as my desktop of choice, and I regularly use my own open source sketcher (SketchEl) for method development. After much procrastination, I put in some work to make it behave better with Apple’s dissenting approach to things like keyboard shortcuts, and various other issues that make Java almost (but not quite) platform independent.

While working at CDD earlier in the year, I helped out with and was included as a co-author on a paper with Sean Ekins & Chris Lipinski. One of the discussion points was regarding a collection of “probe molecules” that came out of a major NIH research effort. This paper recently got mentioned on In The Pipeline. I have made the curated probe compounds available as part of the Approved Drugs app, which now has two built-in collections of molecules (drugs and probes).

The Approved Drugs app is slated for a number of new functionalities, which will appear early next year. For one, the fingerprints have been switched over to use ECFP6, and soon there will be a 3rd collection for custom-defined molecules, similar to the way this is currently done with TB Mobile. The intention is to include a number of Bayesian models for common medicinally relevant properties, such as structure “ugliness”, toxicity, ADME, etc., and make it incredibly easy to evaluate and visualise the disagreeable molecular features. This is part of a general trend toward distilling data that requires an expert to curate, fix and model, and repackaging it as part of an easy to use mobile app.

As per usual, the year of 2015 includes a long list of projects that are in progress, or are just ideas. Expect mobile apps to provide more calculations, and to a large extent these will be carried out locally on the devices, using models and datasets that were prepared using powerful hardware. Interfaces will continue to improve, and the percentage of chemistry tasks that can be done without using a desktop/laptop computer will continue to increase. Expect Apple technology to be a wildcard, as with each passing year more of the deliberate restrictions on what apps can or can’t do are lifted, along with the hardware becoming more powerful at an incredible pace.