p' = \frac{w_{AA}p^2 + w_{Aa}pq}{w_{AA}p^2 + w_{Aa}pq + w_{aa}q^2}
 

This semester, one of my classes has required me to turn in all of my assignments in LaTeX. LaTeX (la-tek) is built on TeX, a typesetting language meant to produce beautiful documents reminiscent of the days when papers were printed from engraved plates. Typesetting was an art that got lost in the digital age.

When I first got the news that assignments were to be handed in using LaTeX, I admit I was a bit worried. The assignments were already going to be difficult enough since it is a bioinformatics class working with data types I have not been used to dealing with. On top of that, I’d have to learn a new system for typing up my homework. It has been a pain in the butt, but it has also been fun and pretty useful. One of the big advantages of LaTeX is its typesetting of mathematical formulas. It is easy and elegant, once you get used to the syntax. Anyone who has used the Microsoft equation editor that comes with Office knows it is a pain to work with. The point and click interface is slow and clumbsy. The LaTex looks ugly, but it also makes sense. The formula above reads as follows in LaTex:

p’ = \frac{w_{AA}p^2 + w_{Aa}pq}{w_{AA}p^2 + w_{Aa}pq + w_{aa}q^2}

The second advantage of LaTeX is that it can be completely integrated with R, the programming language that I use to analyze data. Natively, R outputs to plain text. But LaTeX integration with Sweave lets me run R code along with the TeX document and output data tables and graphics in a printable format, integrated with text. Plus, if I need to alter the R code, I can do so right in the Sweave document.

Lately, I discovered a LaTeX plugin for wordpress that allows me to make mathematical formulas in LaTeX’s math mode. There’s currently no math typesetting for html, yet the internet is a great resource for learning about math topics. Unfortunately, the LaTex doesn’t integrate as selectable text, but instead is output as an image, but it’s a good start for now. Perhaps I can make some future posts that involve some mathematical modeling of biological topics.

Since I have been using LaTeX for bioinformatics class, I have been using it to turn in assignments for other classes. It has been a useful medium for typing up Quantitative Genetics problem sets, and the presentation that I’ll be giving at Evo-Wibo in two weeks will be made using LaTeX. At some point, I’ll have to install Lilypond, a typesetting language for producing music notation.

I’m a nerd, and proud of it.

By the way, extra props if you understand the equation at the top of the page.