(c) 2018 Justin Bois. With the exception of pasted graphics, where the source is noted, this work is licensed under a Creative Commons Attribution License CC-BY 4.0. All code contained herein is licensed under an MIT license.
This document was prepared at Caltech with financial support from the Donna and Benjamin M. Rosen Bioengineering Center.
This homework was generated from an Jupyter notebook. You can download the notebook here.
import skimage.io
Both problems in this homework set consist of the image processing portion of a greater inference problem. For this problem, you will perform image analysis of data from a fluorescence recovery after photobleaching (FRAP) experiment. The data set comes from Nate Goehring. The images are taken of a C. elegans one-cell embryo expressing a GFP fusion to the PH domain of Protein Lipase C delta 1 (PH-PLCd1). This domain binds PIP2, a lipid enriched in the plasma membrane. By using FRAP, we can investigate the dynamics of diffusion of the PH-PLCd1/PIP2 complex on the cell membrane, as well as the binding/unbinding dynamics of PH-PLCd1. The the FRAP experiment, a square patch of the membrane is exposed to intense light, thereby photobleaching the fluorescent molecules. If we quantify how the fluorescence returns to that region, we can infer the diffusion coefficient of the PH-PLCd1/PIP2 complex as well as the binding rate of the two molecules.
We will be taking a simplified approach, but there is more sophisticated analysis we can do to get better estimates for the phenomenological coefficients. To motivate why you are processing the images, I will work through a physical model connecting the diffusion coefficient and binding constats to fluorescence recorvey.
If $c$ is the concentration of the PH-PLDd1/PIP2 complex on the membrane and $c_\mathrm{cyto}$ is the concentration of PH-PLCd1 in the cytoplasm (assumed to be spatially uniform since diffusion in the cytoplasm is very fast), the dynamics are described by a reaction-diffusion equation.
\begin{align} \frac{\partial c}{\partial t} = D\left(\frac{\partial^2 c}{\partial x^2} + \frac{\partial^2 c}{\partial y^2}\right) + k_\mathrm{on} c_\mathrm{cyto} - k_\mathrm{off} c. \end{align}
Here, $k_\mathrm{on}$ and $k_\mathrm{off}$ are the phenomenological rate constants for binding and unbinding to PIP2 on the membrane, and $D$ is the diffusion coefficient for the PH-PLCd1/PIP2 complex on the membrane.
In their paper, the authors discuss techniques for analyzing the data taking into account the fluorescence recovery of the bleached region in time and space. For simplicity here, we will only consider recovery of the normalized mean fluorescence. If $I(t)$ is the mean fluorescence of the bleached region and $I_0$ is the mean fluorescence of the bleached region immediately before photobleaching, we have, as derived in the paper,
\begin{align} I_\mathrm{norm}(t) \equiv \frac{I(t)}{I_0} &= 1 - f_b\,\frac{4 \mathrm{e}^{-k_\mathrm{off}t}}{d_x d_y}\,\psi_x(t)\,\psi_y(t),\\[1mm] \text{where } \psi_i(t) &= \frac{d_i}{2}\,\mathrm{erf}\left(\frac{d_i}{\sqrt{4Dt}}\right) -\sqrt{\frac{D t}{\pi}}\left(1 - \mathrm{e}^{-d_i^2/4Dt}\right), \end{align}
where $d_x$ and $d_y$ are the extent of the photobleached box in the $x$- and $y$-directions, $f_b$ is the fraction of fluorophores that were bleached, and $\mathrm{erf}(x)$ is the error function. Note that this function is defined such that the photobleaching event occurs at time $t = 0$.
We measure $I(t)$, $d_x$, and $d_y$. We can also measure $f_b$ as
\begin{align} f_b \approx 1 - \frac{I(0^+)}{I_0}, \end{align}
though we will consider this a parameter to estimate. In practice, the normalized fluorescent recovery does not go all the way to unity. This is because the FRAP area is a significant portion of the membrane, and we have depleted fluorescent molecules. We should thus adjust our equation to be
\begin{align} I_\mathrm{norm}(t) \equiv \frac{I(t)}{I_0} &= f_f\left(1 - f_b\,\frac{4 \mathrm{e}^{-k_\mathrm{off}t}}{d_x d_y}\,\psi_x(t)\,\psi_y(t)\right), \end{align}
where $f_f$ is the fraction of fluorescent species left. So, we have four parameters to use in regression, the physical parameters of interest, $D$ and $k_\mathrm{off}$, and $f_f$ and $f_b$.
The FRAP images come in a TIFF stack, which is a single TIFF file containing multiple frames. You can load these with the skimage.io.ImageCollection
class. Note that for this TIFF stack, the image collection is a list that contains a single image, which has all 149 frames.
# Load in TIFF stack
fname = '../data/goehring_FRAP_data/PH_138_A.tif'
ic = skimage.io.ImageCollection(fname, conserve_memory=False)[0]
# How long is it?
print('There are {0:d} frames.'.format(len(ic)))
Your task in this problem is to extract the mean normalized fluorescence versus time from each of the TIFF stacks for the experimental repeats. Note that important information is contained in the associated README file. You can download the data set here.
The rest of the inference will be tackled in a subsequent homework. Be sure to store the results of your analysis in a CSV file so you can use it in future homework. (This is a good idea, anyway.)
In this problem, we will study the growth and division of Caulobacter crescentus over time. The lab of Norbert Scherer at the University of Chicago acquired these data and published the work in PNAS, which you can download here.
The clever experimental set-up allows imaging of single dividing cells in conditions that are identical through time. This is accomplished by taking advantage of a unique morphological feature of Caulobacter. The mother cell is adherent to the a surface through its stalk. Upon division, one of the daughter cells does not have a stalk and is mobile. The system is part of a microfluidic device that gives a constant flow. So, every time a mother cell divides, the un-stalked daughter cell gets washed away. In such a way, the dividing cells are never in a crowded environment and the buffer is always fresh. This also allows for easier segmentation.
The data are available here. They were kindly provided by Charlie Wright in the Scherer lab. The frame rate is 1 frame per minute. The interpixel spacing is 0.052 µm. All images were acquired at 24 $^\circ$C.
As with any of the problems in this class, you are encouraged to explore the data beyond what is asked for specifically in the problems statements. The paper is also a very interesting read.
a) The directory sequential_full_field
contains 10 sequential frames of a full field of bacteria in the microfluidic device. From these frames, choose which bacteria would be good to use to gather long time course imaging. I.e., choose those that you think will give minimal errors in segmentation. Give your reasoning, including images demonstrating segmentation.
b) The files bacterium_1.tif
and bacterium_2.tif
are TIFF stacks of time courses for specific cells in from the full field images. From these time courses, determine the bacterial area for each time point. Assign each time point with an identifier for which division it is. This means you need to determine when divisions happen.
c) Make an informative plot of the time between divisions for each cell and plot the results. Comment on any interesting aspects of these data.
In a subsequent homework, we will use these results to investigate if individual bacterial cells experience exponential growth. Be sure you save your results from part (b) as a CSV file for future use.