Thursday, June 20, 2013

Signalling in intrinsically disordered proteins

I take a small interest in biology and biophysics because of its complexity and the large number of unsolved but important problems. Lately I've noticed an increase in the number of popular articles on intrinsically disordered proteins (IDP's). These proteins are shaking up conventional wisdom on how proteins work and the importance of their structures.

This interesting News & Views article in Nature summarizes some recent work on disordered proteins and how they respond to activators and inhibitors. While I don't understand much of the jargon in the article, the overall message is exciting. I found the following excerpts of interest:

The observation of striking differences in the crystal structures of haemoglobin in the presence and absence of oxygen seemed to validate the idea that allostery [the link is my own] can be rationalized, and possibly even quantitatively accounted for, by examining the structural distortions that connect the different oxygen-binding sites... This structural view of allostery has largely guided the field ever since. However, the realization that more than 30% of the proteome — the complete set of proteins found in a cell — consists of intrinsically disordered proteins (IDPs), and that intrinsic disorder is hyper-abundant in allosteric signalling proteins such as transcription factors, raises the possibility that a well-defined structure is neither necessary nor sufficient for signal transmission.
The take-home message of Ferreon and colleagues' work, and the reason that a switch is possible, is that proteins should not be thought of as multiple copies of identical structures that respond uniformly to a signal. Instead, proteins — especially IDPs — exist as ensembles of sometimes radically different structural states. This structural heterogeneity can produce ensembles that are functionally 'pluripotent', a property that endows IDPs with a unique repertoire of regulatory strategies.

I absolutely love that IDP's are currently rewriting the dogmas of much of molecular biology.

Wednesday, June 19, 2013

Fourier transforms are not good for analyzing nonstationary signals

I'm currently thumbing through parts of "Image Processing and Data Analysis: The Multiscale Approach." In Chapter 1, I found this enlightening comment on the Fourier transform:
The Fourier transform is well suited only to the study of stationary signals where all frequencies have an infinite coherence time, or – otherwise expressed – the signal’s statistical properties do not change over time. Fourier analysis is based on global information which is not adequate for the study of compact or local patterns.
You can find a free pdf of this book here:

Monday, June 10, 2013

Understanding the static structure factor

The structure factor \(S(q)\) is an important quantity for characterizing disordered systems of particles, like colloids. Its significance comes from the fact that it can be directly measured in a light scattering experiment and is related to other quantities that characterize a system's microscopic arrangement and inter-particle interactions. However, it's difficult to learn about it the context of disorder because it's primarily used in crystallography. Crystals are far from being disordered.

In this post, I'll explore the nature of the static structure factor, which is something of an average structure factor over many microscopic configurations of a material. A dynamic structure factor describes the statistics of a material in time as well as space.

The structure factor of a disordered material can be measured by illuminating the material with a beam of some type of radiation (usually X-rays, neutrons, or light). The choice of radiation depends on the material. It is also important that the material should not scatter the incident beam too strongly because the structure function is typically found in singly-scattered radiation (see the first Born approximation for a discussion about a related concept). If the material is multiply scattering, the information about the material's structure, which is largely carried by the singly scattered light, is washed out.

In a measurement, the sample is usually placed at the center of rotation of a long rotating arm. A detector for the radiation is placed at the opposite end of the arm. The arm is rotated about this axis and the intensity of the scattered radiation as determined by the detector is recorded as a function of the angle. This data set essentially contains the structure factor, but must be transformed and corrected for, accordingly.

First, the structure factor is usefully represented as a function of the scattering wave number, \(q\), and not as a function of the scattering angle. In optics, \(q\) is usually given by
\[ q = \frac{4 \pi n}{\lambda} \sin( \theta / 2) \]

where \(n\) is the refractive index of the background material (usually a solvent like water) and \(\lambda\) is the wavelength of the light. \(\theta\) is the scattering angle.

Additionally, the structure factor must be corrected for a large number of confounding factors, such as scattering from the sample cell and radiation frequency-dependent detectors. A classic paper that details all these corrections to find \(S(q)\) in a neutron scattering experiment is given here.

Once the structure factor is found in an experiment, it may be Fourier transformed numerically to give the radial distribution function, \(g(r)\) (see Ziman for the proper conditions for which this applies) of particles. This function gives the probability of finding a particle at a radial distance from another particle in the system. Many important thermodynamic properties are related to \(g(r)\). Importantly, the pair-wise interaction potential between any two particles is related to \(g(r)\), and the pair-wise interaction determines many macroscopic system properties.

The structure factor as \(q\) (or equivalently the scattering angle) goes to zero is also an important quantity in itself. \(S(0)\) is equal to the macroscopic density fluctuations of particles in the medium (see Ziman, Section 4.4, p. 130). But density fluctuations can be calculated from thermodynamics and leads to the isothermal compressibility of a material.

In the language of optics, which I'll stick to for the rest of this post, the density fluctuations would correspond to large regions of refractive index variations across the sample.

This leads to an interesting problem, the resolution of which reminds me of the fallibility in taking some models too literally: for a homogeneous and non-scattering optical material, like a very nice piece of glass, the value of the density fluctuations in the refractive index are essentially zero (this is true because the disorder in a glass is at a length scale that is much smaller than the wavelength of light). This means that \(S(0) = 0\). At the same time, the scattered intensity in the type of experiment measured above is directly proportional to the structure factor:
\[I(q) \sim S(q).\]
So, if I illuminate a nice piece of glass with a laser beam, and I know that \(S(0)\) is equal to zero, the above expression means that there should be no scattered intensity in the forward direction. But this is a silly conclusion, because when I do this experiment in the lab I see the laser beam shining straight through the glass! In other words, \(I(0)\) is not zero.

The problem is that this expression is for the scattered intensity. In random media, we often talk about the scattered light and the ballistic light. The latter of these two is not scattered but directly transmitted through the material as if the material were not there. So, even though no light is scattered into the forward direction, there is still the ballistic, unscattered beam, that is passing straight through the sample.

Most small angle light scattering experiments measure as close as they can to \(q=0\) and extrapolate to the structure function's limiting value. \(S(0)\) can't actually be measured. But, it's determination is important for materials with significant long-range order, such as those near a phase transition, because the small angles correspond to large distances, due to their inverse Fourier relationship.

One can also engineer a material to not transmit any light into the forward direction. To do this, \(S(q)\) must be zero AND there must be no ballistic light passing through the material. This can be achieved with a crystal that diffracts all the light into directions other than the forward direction, such as a blazed grating.

On a final note, the structure factor can sometimes be related to important material properties beyond the radial distribution function. Ziman says in section 4.1, pg. 126 that the direct correlation function (which measures interactions between pairs of particles) can be derived directly from the structure factor. This correlation function is related to the Percus-Yevick model for liquids.

Wednesday, June 5, 2013

Logical indexing with Numpy

I just discovered one nuance of Python's Numpy package which, given my Matlab background, is a bit unintuitive.

Suppose I have an array of numeric data and I would like to filter out only elements whose values lie between, say, 10 and 60, inclusive. In Matlab, I would do this:
filterData = data(data >= 10 & data <=60)

However, logical operations with Numpy sometimes require special functions. The equivalent expression in Python is
filterData = data[np.logical_and(data >= 10, data <= 60)].

np.logical_and() computes the element-wise truth values of (data >= 10) AND(data <= 60), allowing me to logical index (or fancy index, as pythonistas say) into data.

Sunday, June 2, 2013

IguanaTeX puts TeX equations into PowerPoint

As OSA's CLEO conference draws closer, I find myself drawn back into the deep, dark abyss of PowerPoint engineering for the design of my talk.

One constant disappointment I've had with PowerPoint is the lack of a good equation editor since 2007. It was in this year, I believe, that Microsoft chose to dump almost all of the useful features of its native equation editor. Most appalling was that they removed the option to change the color of equations. This is absolutely crucial if you're working with dark backgrounds to enhance the contrast of your text, but for some reason this disappeared.

To replace those lost features, a new piece of software called Math Type came about from Design Science. If you've seen the movie Looper, then I would equate the rise of Math Type with that of the Rainmaker, the mysterious, telepathic character who arose out of nowhere and is intent on killing off people he doesn't like and making everyone live by his rules.

What I don't like about Math Type is that they charge what I think is too much for incremental improvements to their software. For example, I bought a license for Math Type 6.6 before Office 2010 came out, but to get easy integration with 2010, I need to spend about $40 just to get a new version. There is a way to get 6.6 to work, but they make it very difficult to find this information. I also don't like that I've seen Design Science employees trolling PowerPoint forums telling people to buy Math Type to solve some issues and that it's very difficult to find older versions of their software on their website.

Now, to be fair, the software is quite nice and it does make it easy to type equations into PowerPoint and other Office software products. I just don't like how all the functionality that I enjoyed as a part of Office for free was moved into a separate, commercial product. And since I am required to use PowerPoint and Word at work, I'm stuck with this situation.

So you can imagine how happy I was to have found a wonderful alternative to Math Type called IguanaTeX. It's a plugin for PowerPoint 2003, 2007, and 2010 that let's you add LaTeX equations to slides as png files. You need to have MikTeX installed, and it's a bit finnicky getting the right packages at first, but once it's setup it works like a charm. AND you don't have to pay just to change the colors of your equations.

Check it out, especially if you know TeX.

Saturday, June 1, 2013

My latest LabVIEW code now up on GitHub

If anyone is curious to see my implementation of my LabVIEW code for the project I've been mentioning, I've now placed it in this GitHub respository: git:// There is a design document called program_design.html that should give you a good idea about what I was trying to do.

Now, it's not complete. I've only just managed to get it working. I need to clean it up A LOT, by creating more SubVI's and being more consistent with when I use global variables and when I pass data from the front panel. But if you have any ideas or comments, send them my way. I'd be happy to receive feedback from any LabVIEW pros out there.

---Update: November 6, 2013---

The code is no longer on GitHub, but you may e-mail me if you need it, as some of you have already done.