Installing Table of Contents extension to Jupyter notebook

Table of contents 2 is a very useful extension to Jupyter notebook that allows you to have a nested outline with links to all the Markdown headings in a Jupyter notebook. This is basically essential when you’re working with a notebook of any real length. I don’t know why it isn’t just a standard feature in Jupyter.

Figuring out how to install it is a bit annoying as instructions are poorly written across several Github repos, but the process is actually very simple (if a little hacky). Assuming you followed my instructions on setting up a virtual environment in Python 3, activate it with (substitute your own path if needed): Continue reading

Posted in Data analysis, Not biology | Leave a comment

Installing Python 3 and Jupyter notebook on Mac OS

This is my preferred way to install Python and Jupyter notebook for doing scientific data analysis. There are many alternative ways of doing this that you can find on Google. I’m doing this on a MacBook Pro (Retina, 13-inch, Early 2015) with macOS High Sierra 10.13.3.

In the past, I used virtualenv to manage virtual environments with Python 2. Python3 has built-in handling of virtual environments, so I use that here instead. If you need to use Python 2, then you’ll want to install virtualenv (see first link at the bottom). Continue reading

Posted in Data analysis, Not biology | Leave a comment

Can a microbe grow faster later by growing slower now?

This question popped up a few years ago during a conversation with my PhD advisor. I think it makes a good riddle or exercise problem, so I’m posting it here, along with a solution I came up with. My solution doesn’t feel intuitive, even though the problem seems borderline trivial, so I’m curious if anyone has a less “technical” way of thinking about this.

Imagine a population of microbes that begins inducing a protein P needed for a newly encountered environment. The microbes grow more slowly at lower expression levels of P, and faster at higher P levels. Additionally, the microbes could “choose” (via regulatory circuits) to grow slower than is allowed by their current level of P. This, in turn, could allow P to induce faster, as the turnover of P due to dilution by growth will be decreased. Therefore, the question is, should microbes ever “choose” to grow slower than is possible in order to allow a beneficial gene/protein to induce faster?

Continue reading

Posted in Literature review, Quantitative principles | Leave a comment

Tasty tomatoes and biological tradeoffs

As part of my recent fascination with plant biology, I read a paper called “A chemical genetic roadmap to improved tomato flavor“, by Tieman et al. This led me down a rabbit hole of a surprisingly large literature on the topic of tomato flavor. Of course it’s obvious why crop breeders would want to make better tomatoes (some background on this from the extensive media coverage). What I find really interesting, though, are the broader lessons about genetics and bioengineering that come out of tomatoes as a model system.1

I’m particularly struck by the theme of tradeoffs. In some sense, this is the key challenge for all of modern crop genetics. Why do intensively bred crop varieties, which have undergone selection for yield and market appeal, often taste worse than their ancestor plants? Is it possible to make a convenient and attractive tomato that is also delicious? Or, is the tradeoff due to fundamental biological constraints and therefore can’t be overcome by breeding or genetic engineering?
Continue reading

Posted in Literature review, Plant biology | Leave a comment

Plant breeders were engineering biology before it was cool

Recently I’ve become fascinated1 by crop breeding and plant genetics, after realizing that these are, in a sense, the oldest fields of biological engineering. Even though we’ve only been able to manipulate genetic circuits and metabolic pathways for a few decades, we’ve been influencing whole-organism traits through selective breeding for a whole lot longer. You could say that humans were engineering plants hundreds of years before we even knew there were such things as genes!

Of course, this all applies to animal breeding as well, but I think plant science is particularly relevant right now as an applied field. In biology, at least, I’m not sure there are more important advances than those being made in crop genetics, photosynthesis, and carbon/nitrogen fixation for allowing human society to continue in its current material form in a future without fossil fuels.

I’m also just curious about plant biology because I was never taught (or even exposed to) it during my formal training — this still surprises me. Continue reading

Posted in Commentary, Plant biology | Leave a comment

The role of storytelling in scientific writing

I wrote this privately 2 years ago, reflecting on my first publication. Later I saw that others had already been having a similar discussion (see this piece by Yarden Katz), so I thought this would be good to share here.

My first first-author paper was recently accepted to a journal, a paper I’ve worked on, in some form, for almost 3 years. Writing this paper was my first experience writing a full-length scientific manuscript, and I knew it would be hard work from start to finish. However, what I thought would be challenging were the scientific or logical aspects of writing: framing the argument, explaining it clearly, and conveying the significance of the findings to the readers. These things were indeed challenging, but I was surprised to encounter another difficulty, the problem of “storytelling” during writing. This is a problem I wish I didn’t have to deal with, and I think one of the most stressful parts of doing science. I think the reason it is stressful, which I’m not sure many people could even articulate explicitly, is that it is in essence an ethical problem. Continue reading

Posted in Commentary, Life and science | Leave a comment

Tutorial: bulk segregant analysis in yeast

This is a tutorial on how to do Bulk Segregant Analysis (BSA) in yeast, a particular way of doing Quantitative Trait Locus (QTL) mapping. The general aim is to identify the mutations underlying a trait difference between individuals–in this case, different yeast strains. A large literature exists on this topic, but it’s still often time-consuming to figure out how to actually analyze data. BSA is quite simple in concept, so software packages like R/qtl are a bit overkill but the “homebrew” scripts you get from most papers are not quite commented enough to easily learn from. My hope with this tutorial is to fill the gap in between so you can get started, and provide a jumping off point to useful references.

Continue reading

Posted in Data analysis, Microbial physiology | 8 Comments