Squiggle: visualise cave surveys in 3D

I wrote Squiggle, a little set of scripts that produces animated 3D views of cave surveys natively in web browsers. Squiggle is based on the javascript library three.js.

Check out this small survey or this cave system (this one might crash browsers on older machines). The controls are as usual: drag for rotating, scroll for zoom. The surveys were made by the Cambridge University Caving Club (CUCC)‘s Austria expeditions, and over time, Squiggle will be used to preview them. Thanks to Wookey for his help in making and testing Squiggle.

Let me know if you would like to use Squiggle to visualise your data.

A complete mitochondrial chromosome in Drosophila chrU

The latest Drosophila melanogaster 5 genome has a complete copy of the mitochondrial chromosome embedded in chrU, which makes it a trap for mitochondrial RNAseq reads. If the aligner randomly distributes reads between all matching sites, half of the mitochondrial reads will go to chrU. All reads will be lost if ambiguous alignments are discarded.

Peak: mitochondrial reads aligned to chrU. (UCSC genome browser)

ChrU is not a real chromosome, but a 10 Mb mixed bag of 34,630 small scaffolds, that didn’t seem to fit anywhere during shotgun genome assembly. My best guess is, that the 19.5 kb mitochondrial scaffold seemed far too small to be anything real during genome assembly, so the Celera shotgun assembler just lumped it into chrU with all the other loose fragments. According to this paper, the fragment is the true y1, cn1, bw1, sp1 strain mitochondrial genome, in contrast to the reference chrM, which is a composite of several genomes.

Leaving out all, or parts of chrU during alignment is an obvious solution. The coordinates of the mitochondrial bit are (roughly) chrU:5288508-5303826, and turning this stretch into N’s preserves the remainder of chrU, without trapping mitochondrial reads. Another option is to leave out chrU altogether. This is probably justifiable given that most of chrU are just duplicated fragments from other parts of the genome, only sequenced in much worse quality and thus not fitting into their original place.

[Update] I heard BDGP will remove this snag in the release 6 genome.

Guides for Barplots

Regular lines in the background of barplots are useful, but  they are never where they need to be. Then the guessing begins: how far is that bar from the guide?

In the comparisons below the regular lines look more Zen peaceful, but the lines at bar levels are much more useful in comparing bar heights. In the first graphs the guides show that some bars with similar heights are not quite equal, and in the second graph it becomes immediately apparent, that there are three distinct groups of values.

This little R snippet does the job:

prettybarplot <- function(yvalues, labels=NULL){
barplot(height=yvalues, names.arg=labels, axes=FALSE)
abline(h=yvalues)
barplot(height=yvalues, names.arg=labels, add=TRUE, axes=FALSE)
axis(side=2, col="white", col.ticks="black", line = 1, xpd=TRUE )
}

A modest proposal for improving formal hall ticketing

The way of allocating tickets to formal dinners is flawed at St Edmund’s. Currently, hoarding tickets is the self-reinforcing rational behaviour. A minimal proposed change in ticket allocation can align public and private interests at no additional cost.

Loading dyes for DNA agarose gels are traditionally xylene cyanol and bromphenol blue. In a slightly whimsical weekend experiment I tested some food dyes whether they would work as replacements in DIY Bio DNA electrophoresis. These dyes are supposedly non-toxic (which is sometimes debated but without a final verdict yet) and easy to obtain. Thanks to Jelena Aleksic for donations from her Sugarflair food colours box.

The genetic network of Drosophila tracheal development

Gene regulatory network of trachea formation, distilled from all relevant reviews up to 2011. The fully sized zoomable network is here.

For the first year progress report of my PhD project I was asked to summarise the genetics of tracheal tube formation in the fruit fly embryo (trachea are the insect equivalent of  lungs). Tubes are one of the favourite building blocks of animal development, and are used ubiquitously. Though not always obvious, tube formation is the first step in forming the digestive tract, the branches of the trachea in the lung, kidney nephrons, blood vessels, various glands, and feathers. Tracheal development in fly embryos is a prime example of branched tubule formation. In short, cells decide that they are going to be trachea, and organise themselves into a single-layered hollow tube. Branches form as groups of cells follow various chemical signals, and break away from the main mass of cells.

Struggling with putting a highly complex and interwoven process into words, I eventually realised that a graphical representation would be more adequate. After all, we don’t use long descriptions such as “Here is a large building X, in street Y. Next to it is building Z, opposite is lengthy square A, and on the left side of it is round building B…” It would be very hard to use, compared to a map. We have also long stopped expressing mathematical relationships through prose, instead using diagrams, and a highly compact notation. Similarly, the causality relationships in electronic circuit designs are either expressed through formalised diagrams, or, the inherent logic is expressed in a formalised (and executable!) hardware description language.

It seems genetic networks are the last very complex systems where the prevailing opinion is that they are best expressed in beautiful and creative prose. There are several problems with this:  Continue reading

Creatures of Light – American Museum of Natural History

Recently, I had the opportunity to visit the exhibition on bioluminescence at the Natural History Museum in New York. While the exhibition seems to be fairly well received (see for example http://www.newscientist.com/blogs/culturelab/2012/04/luminous-life-on-show.html with only very tame criticism), I think the exhibition has done a terrible job in presenting nature, in every single room of it.

The first room of the exhibition is about fungal bioluminescence, and as every other room it is very tasteful. There is soft atmospheric music that fills the twilight around the well-sculpted objects. In the centre of the room is a group of old fallen trees on forest ground. Yellow-blue light filters from the fibres of the old logs, mushrooms grow with shining caps. A step closer however, little LEDs under paint become obvious, because all there is plastic. This sets the general theme of exhibition. Mock nature. Continue reading

Controlling an Ettan Spot Picker lab robot with custom software

I believe many lab robots are scrapped purely because the control computer and the control software become obsolete. With the ability to write new software such robots can become useful again, and not only in DIY-bio settings. There is however very little documentation as far as I can see. I had opportunity to experiment for a weekend with an Ettan Spot Picker lab robot, and found that reverse engineering its communication protocol was not very hard. Unfortunately most of my documentation in text files and programs were eventually lost together with the old command computer of the robot, as I forgot to move them off. I hope what is left can be still of some help in starting, if someone is in a similar situation.

An Ettan Spot Picker (Wikimedia Commons).

Some robot drawings

Some drawings made by a repurposed lab robot (an old Ettan Spot Picker to be disposed of), using a mechanical pencil. It became a universal robot arm (and thus an able draughtsman) after some reverse engineering of the communication protocol.

Pencil lead run out at some point . . .

Having freshly drawn XKCD comics instead of having to view them on a screen is of course luxurious. Never shall there be a shortage of mazes to fill out either. With the recursive division algorithm the robot can draw an infinite number of different mazes.

Many thanks to the Proteomics group for offering their old machine for some experimenting.

Some enjoyable historic papers

The Royal Society celebrated its 350th anniversary last year. Trailblazing is a collection of historic papers, which the society published in her Philosophical Transactions. Here some favourites. Each is a very early paper of its field, so everything has to be explored, new things need to be named, nobody knows which are the relevant parameters.

• … New Theory about Light and Colours… (1672) Isaac Newton at his best: buys a prism, uses the sun, his window curtains and a ruler to deduce the corpuscle theory of light, a theory of the nature of colours, of mixture of colours, of white light, the mechanism of colour vision, the inner workings of rainbows, and the limitation of refractive telescopes due to colour dispersion. He also invents the reflective telescope to overcome the problem. He does not waste time with a splendid introduction: To perform my late promise to you, I shall without further ceremony acquaint you, that in the beginning of the year 1666 I procured me a Triangular glass-Prisme to try herewith the celebrated phenomena of colours. and comes to his experiments right away. A very enjoyable reading. Continue reading