Thioturbo danicus – The Sulfur Whirl of Denmark

Late last year, my colleague Silke W and I went to Denmark for a short field trip to collect ciliates, where we were hosted by Lasse Riemann of the University of Copenhagen. The site where we collected our material was Nivå Bay, which is famous among environmental microbiologists for the several decades of studies there on sulfur-cycling by microorganisms.


Nivå Bay (above, view from birdwatching tower on a sunny day) is a shallow, sheltered bay where the water is only knee- to waist-height at low tide. Scattered between the tufts of seaweed and seagrass were some off-white, slimy films on the surface of the sediment. These are actually bacterial “veils”, which are sheets of mucus produced by bacteria that embed themselves in them. Like a veil made of lace, each sheet is punctuated by many holes. Unlike a wedding veil, these veils are not meant to hide anything. Instead, you can think of them as a sort of natural-born environmental engineering – the holes allow water to flow through, and the bacteria actively circulate water by beating their flagella. By working together in these colonies, the bacteria can set up a continuous flow of water through the veil. This flow mixes sulfide-rich water coming from below with oxygenated water from above, bringing together the chemicals that they use to generate energy.

There are different species of bacteria that have such behavior. One of them has the wonderful name Thioturbo danicus – the sulfur whirl of Denmark. It has flagella on both poles of its rod-shaped cells. In this video you can see what happens when a single cell is detached from the mucus veil – it ends up tumbling like a propeller, which probably was the inspiration for its name!

Here is a somewhat degraded veil that had been sitting around in a Petri dish for too long. Taken from its natural environment, it soon becomes overgrown with grazing protists and small animals that methodically eat up the bacteria:

You can read more about the veil-forming bacteria from these publications from the microbiologists at Helsingør: Thar & Kühl 2002, Muyzer et al. 2005.

Bad consumer product ideas

More business ideas that will probably never get off the ground, following on my previous post. That said, if anyone needs a designer for a very reasonable price, do get in touch.



“Snalt – Banish winter from your driveway”

Snow salt – not for human consumption.



“Nature’s calling for a number two!”

All-natural laxatives.



“Where hipster Mexicans plot their next move”

Trendy taco restaurant.

Rising butt hinge

The office bathroom has an unusual hinge on the cubicle door, which I’ve often wondered about while ensconced behind that door.


What’s clever about that design is that the spiral shape of the joint makes the door close itself automatically, as the weight of the door pulling downwards is transformed into a torsional motion.

I finally learned today that such hinges are called rising butt hinges, and that one popular use of them is for doors in rooms with heavy carpeting – the door lifts upwards slightly as it opens, and in the process is able to clear the carpet layer.

What a simple, elegant design!

3D vision with the Pulfrich Effect

The Pulfrich Effect is an optical phenomenon where objects (or images) moving in a single plane can appear to be in 3D when the light reaching one eye is dimmed, e.g. with a filter. It also has a curious history – Carl Pulfrich (biography – pdf), who discovered the phenomenon, was blind in one eye and never observed it for himself, but nonetheless made many contributions to stereoscopy (the study of 3D vision) in both theory and the construction of apparatus.

Unlike other forms of stereoscopy, this only works with moving objects or animations; it does not work with still images! But what’s really cool is that you don’t need any special equipment to view it, beyond a piece of darkened glass or plastic to act as a filter. Videos exhibiting the Pulfrich effect can be viewed on a normal monitor or TV screen.

I’ve made my own Javascript animations as demos for the Pulfrich effect (posted as GitHub Gists and rendered by

Screen Shot 2017-01-10 at 00.57.42.png

Screenshot from my animated explanation of the Pulfrich Effect

Continue reading

Sinology with Python

I’m a bit late to the Jupyter Notebook bandwagon (and bandwagons in general), it seems… Now that I’ve started using it I’m seeing it everywhere.

The Chinese Text Project is one of my favorite websites, because it not only offers literally thousands of premodern Chinese texts online for free, but provides sophisticated search functions, a built-in dictionary, and other nifty features, many of which were added quite recently.

Among them is an API for accessing the text database programmatically, and a Python module which provides easy-to-use wrapper functions for it (the module is written for Python 3 and doesn’t work with Python 2, however it simply fails and doesn’t show an error message if you inadvertently try to use it with Python 2).

Donald Sturgeon, who is the author of these tools and also the maintainer of, has posted some online tutorials using Jupyter Notebooks to show how to access the database, and some simple data analyses that can be done on texts.

Saving R workspace in Jupyter Notebook

I’ve recently been trying out Jupyter Notebook to organize my work. I had been holding out against using Jupyter or its predecessor Ipython becuase I was under the impression that it was only for Python users, but after taking a closer look it seems that you can also use other languages with it if you install the appropriate “kernels”. I now have it on both my work computer (running Linux) and my laptop (running Mac OS X) and it was relatively painless in both cases to get everything running, because the installation can be handled from a package manager. I’ve been using it with R, and the kernel for Jupyter is simply a package that you install from within R, though you have to remember to install the package when running R from a terminal window and not in RStudio.

One problem I encountered with an R notebook in Jupyter, though, was saving my workspace. In a normal R session I’m used to saving my workspace at the end of the session and coming back to it later to pick up where I left off. However, with the Jupyter notebook I found that I had to rerun all the code to regenerate all the objects again! This appears to be an issue for Python notebook users too.

There’s a very simple fix for this: Just run the standard R command


Your workspace will then be saved to the usual hidden .RData file in the same folder as the Jupyter notebook. If you want to share the code and the workspace, you’ll have to make sure that you copy both the notebook file and the .RData file that goes along with it.

Likewise, if you start a notebook in a folder that already has an .RData file, you’ll find that you can access that workspace from the Jupyter notebook – just run ls() to see what’s there.

I wonder if I may have missed a ‘save workspace’ function that’s already built in, though…


Visualize metagenomes in a web browser

In my day job I work with metagenomes from animals and protists that have bacterial symbionts, and I’ve blogged here before about why visualizations are so useful to metagenomics (mostly to flog my own R package). However most existing tools, including my own, require that you install additional software and all the libraries that come with them, and also be familiar with the command line. That’s pretty standard these days for anyone who wants to do serious work with such data, but it can be a big hurdle for teaching. Time in the classroom is limited, and ideally we want to spend more time teaching biology than debugging package installation in R.

I’ve therefore written up a simple browser-based visualization for rendering coverage-GC% plots, called gbtlite. There’s no need to mess around with data structures in R, or worrying about how to install required packages for your operating system. The visualization uses the D3.js Javascript library, which is popular for web applications. If you’ve played with infographics on the New York Times website, then you’ve probably seen something built with D3.

Continue reading