GSoC 2017 - Google Summer of Code 2017 Wrapup

Posted on August 25, 2017 by Christian Fischer

This summer, I’ve written the start of a Genetics Browser in Purescript. The code can be found on the GitHub repo: https://github.com/chfi/purescript-genetics-browser

Instructions on how to build and use it can be found in the readme.

In conjunction with the browser, I’ve also started work on an InterPlanetary File System package for Purescript, which can be found on this repo: https://github.com/chfi/purescript-ipfs-api

As of now, it is compatible with Biodalliance (BD) track configurations, and can also display Cytoscape.js (Cy.js) graphs. The beginnings of interactions between tracks and graphs are also there, though it is still very much WIP, and cannot be configured by the user, which is the ultimate goal.

Purescript BD/Cy.js APIs

First I wrote Purescript modules wrapping subsets of the Biodalliance and Cytoscape.js Javascript APIs, which was made easy thanks to Purescript’s FFI. Besides the basic functionality of initializing the browsers and attaching event handlers, I also wrote some higher level functions for working with Cytoscape’s Collections.

I go into more detail in this blog post: https://chfi.se/posts/2017-07-06-gsoc2017-ps-js-interop.html

Wrapping BD & Cy.js in Halogen

With the PS APIs, the next step was to write an app using them. I chose Halogen as my frontend library, and wrote a Halogen component each for BD and Cy.js, wrapping the browsers and letting the main component do things like attach event handlers to the underlying (JS) browser instances.

See this blog post for more details: https://chfi.se/posts/2017-07-27-gsoc2017-bd-halogen.html

Events between tracks and graphs

One of the goals of this browser is enabling exploratory interaction of multi-dimensional data sets, and doing this by connecting different tracks and browsers so that, for example, the data shown in one track can be updated based on interactions with data points in another track.

Currently, track sinks and sources can be constructed and piped together manually, performing actions on tracks based on events received from other tracks.

More details can be found in the blog post I wrote about it: https://chfi.se/posts/2017-08-24-gsoc2017-events.html

InterPlanetary File System

I started a Purescript API wrapper for the InterPlanetary File System (IPFS), wrapping the Javascript API; the genetics browser will support tracks served from IPFS. Currently files can be read from and written to IPFS using the Purescript module.

I wrote a blog post describing the work so far: https://chfi.se/posts/2017-08-25-gsoc2017-ipfs.html

Future work

The events and inter-track interaction need more work, as described in the corresponding blog post linked above.

We also want a native all-Purescript genome browser, with similar features as Biodalliance, so as to be easier to extend and work with from Purescript.