LaTeX

 

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.

Similar Posts

  • An update for 2018

    It’s occurred to me that I haven’t been good at writing posts recently. My last update was from May, and that was subsequently my last big hiking trip. Since then, I have been incredibly busy, and that means I haven’t had as much time for fun. I did get out a few times this summer with the family. But there’s a lot to talk about. So here’s what happened in 2017. I successfully defended my Ph.D. dissertation. On December 14, I defended my dissertation in front of my committee. This is why I haven’t been very active this year. I…

  • |

    Daffodils in the Snow

    Daffodils in the Snow, originally uploaded by Matthew Singer. I’ve heard of April showers bringing May flowers, but what do April snows bring? On Friday, I awoke to a white world with about an inch of snow covering everything. It was kind of a shock considering only a week before, there were promising signs of Spring. Of course, after the snow, the temperatures are back up and the weekend’s forecast is quite pleasant.

  • Elk Creek Falls

    I think I’ve mentioned Elk Creek Falls in passing, but haven’t actually written a featured post about it. Elk River is a small outdoor recreation town (read: hunting & fishing mostly) a little over an hour east of Moscow. This small community represents the “end of the road.” The paved road ends here and forest service roads pick up to take you into some remote places. While most people come back here to hunt, ride ATVs and snowmobile in the winter, there are some family-friendly hikes and other attractions that make Elk River worth a visit. There’s the giant cedar,…

  • What might the native prairie have looked like?

    It’s hard to imagine what America’s prairies looked like when they were unspoiled. Today, more than 95% of our prairies and grasslands have been repurposed for agriculture. The last remnants are so highly fragmented that it’s a fight to keep non-native invasive species from taking over. Prairies and grasslands were once thought to be ecological wastelands, a monoculture of grass with not much productivity. From a distance, the prairie might seem like a boring place. But up close, prairies have the capacity to harbor more diversity than some forests. To really appreciate all that these grasslands have to offer, it’s…

  • First Snow

    First Snow, originally uploaded by Matthew Singer. On Friday, I woke up to find a light layer of white on everything. At first, I thought it was a heavy frost, but when I put my glasses on, the truth was revealed. We had our first snowfall. It wasn’t much, less than an inch, and by late afternoon, all was gone. It wasn’t the first snow of the season either, but it was the first to stick on the ground, especially at our elevation. But Sunday night, it began to snow some more, and the accumulation was greater. It still wasn’t…

  • Perseoids

    Every summer at early-mid August, we enter a portion of the solar system rife with meteors, and ever year around this time, many of those chunks of rock and debris hit our atmosphere and burn up, giving us the Perseoid meteor shower. This year, the shower did not occur during a full moon, and so the skies were dark and the stars were bright. Some of the photo club folks wanted to have a camping trip this weekend, and that devolved into a fire and star photography night at our place. The meteor shower was pretty good Saturday night. There…