Posts Tagged ‘lab book’

LaTeX is amazing

Tuesday, April 2nd, 2013

I’ve long been a convert to the wonderful typesetting engine LaTeX, but it wasn’t until very recently that I fully understood its power. Given my very untidy handwriting, I keep my entire lab book in LaTeX. It includes many images of gels, such as the one below.

Biologists will recognise what this means – it is basically a slab of jelly which I’ve run some fragments of DNA through, from top to bottom. The smaller fragments run faster and represent the bands near the bottom. The middle ‘ladder’ is a mixture of fragments of known sizes. The lanes outside it contain unknowns which I want to measure in comparison to the ladder. So far, so standard.

What is special about this gel is the clean image above it. This is a simulation – what do I expect a gel to look like if it has certain band sizes? It just makes it very simple to see if we have what we expect, without looking up the exact details of the ladder. There are a number of tools for making these by hand, but this simulation was created in the typesetting engine itself, with just a few custom macros. This is the underlying Tex:

\begin{gelsim}
\gelscale{40} \geloffset{3}
\lane[Digestion A] \band{3500} \band{600}
\lane[Digestion B] \band{3500} \band{600}
\lane[Digestion C] \band{1400}
\lane[Digestion D] \band{1400}
\end{gelsim}