Pharyngula

Pharyngula has moved to http://scienceblogs.com/pharyngula/

Wednesday, September 29, 2004

PZ Myers' Own Original, Cosmic, and Eccentric Analogy for How the Genome Works -OR- High Geekology

I'm teaching my developmental biology course this afternoon, and I have a slightly peculiar approach to the teaching the subject. One of the difficulties with introducing undergraduates to an immense and complicated topic like development is that there is a continual war between making sure they're introduced to the all-important details, and stepping back and giving them the big picture of the process. I do this explicitly by dividing my week; Mondays are lecture days where I stand up and talk about Molecule X interacting with Molecule Y in Tissue Z, and we go over textbook stuff. I'm probably going too fast, but I want students to come out of the class having at least heard of Sonic Hedgehog and β-catenin and fasciclins and induction and cis regulatory elements and so forth.

On Wednesdays, I try to get simultaneously more conceptual and more pragmatic about how science is done. I've got the students reading two non-textbookish books, Brown's In the Beginning Was the Worm and Zimmer's At the Water's Edge, because they both talk about how scientists actually work, and because they do such a good job of explaining how development produces an organism or influences the evolution of a lineage. The idea is that they'll do a better job of prompting thinking (dangerous stuff, that, but I suppose it's what a university is supposed to do) than the dryer and more abstract material they're subjected to in Wolpert's Principles of Development.

Today we're going to be discussing the concept of analogies for how development works. It's prompted by the third chapter in Brown's book, titled "The Programme", where they learn all about Sidney Brenner's long infatuation with the idea that the activity of the genome can be compared to the workings of a computer program. We'll also be talking about Richard Dawkins' analogy of the genome as a recipe, from How do you wear your genes? and Richard Harter's rather better and more amusing analogy for the genome as a village of idiots. I'm also going to show them this diagram from Lewontin's The Triple Helix, to remind them that there's more to development than just gene sequences.

genes and environment and noise

But I'm not going to write about any of that right now. Analogies have a troubling effect on developmental biology because the fundamental processes are so different from what we experience in day-to-day life that they are always flawed and misleading. My main message is going to be that while they may help us grasp what's going on, we have to also recognize where the analogies fail (like, everywhere!) and be mentally prepared to leap elsewhere.

That said, what I'm writing about here is my favorite analogy for development. It's flawed, as they all are, but it just happens to fit my personal interests and history, and after all, that's what analogies are—attempts to map the strange unto the familiar. And, unfortunately, my experience is a wee bit esoteric, so it's not really something I can talk about in this class unless I want to lecture for an hour or so to give all the background, violating the spirit of my Wednesday high-concept days. I can do it here, though!

I'm a long-time microscopy and image processing geek, and you know what that means: Fourier transforms (and if you don't know what it means, I'm telling you now: Fourier transforms). I'm going to be kind and spare you all mathematics of any kind and do a simplified, operational summary of what they're all about, but if bizarre transformations of images aren't your thing, you can bail out now.

A Fourier transform is an operation based on Fourier's theorem, which states that any harmonic function can be represented by a series of sine and cosine functions, which differ only in frequency, amplitude, and phase. That is, you can build any complex waveform from a series of sine and cosine waves stacked together in such a way as to cancel out and sum with one another. The variations in intensity across a complex image can be treated as a harmonic function, which can be decomposed into a series of simpler waves—a set ranging from low frequency waves that change slowly across the width of the image, to high frequency waves that oscillate many times across it. We can think of an image as a set of spatial frequencies. If there is a slight gradient of intensity, where the left edge is a little bit darker than the right edge, that may be represented by a sine wave with a very long wavelength. If the image contains very sharp edges, where we have rapid transitions from dark to light in the space of a few pixels, that has to be represented by sine waves with a very short wavelength, or we say that the image contains high spatial frequencies.

One fun thing to do (for extraordinarily geeky values of "fun") is to decompose an image into all of the spatial frequencies present in it and map those frequencies onto another image, called the power spectrum. All of the low spatial frequencies are represented as pixels near the center of the image, while the high spatial frequencies are pixels farther and farther away from the center. And the fun doesn't stop there! You can then take the power spectrum, apply a Fourier transform to it, which basically takes all the waves defined in it and sums them up, and reconstruct the original image.

I know, this all sounds very abstract and pointless. Fourier transforms are used in image processing, though, and one can do some very nifty things with them; it also turns out that one useful way to think of a microscope objective lens is as an object that carries out a Fourier transform on an image, producing a power spectrum at its back focal plane, which the second lens than transforms back into the original at the image plane.

Still lost? Check out this extremely spiffy online tutorial in Fourier imaging, then. It'll show you visually what I'm talking about.

You can select from a series of images, and here I've picked the human epithelial cell, seen on the left and labeled "specimen image":

power spectrum

It's not very pretty. It has a bunch of diagonal stripes imposed on it, which is something you might get if there were annoying rhythmic power line noise interfering with the video signal on your TV. Those stripes, though, represent an intensely well represented, specific spatial frequency imposed on the image, so they'll be easy to pick up in the power spectrum.

The second image is the power spectrum, the result of a Fourier transform applied to the first image. Each dot represents a wavelength present in the Fourier series for that image, with low frequencies, or slow changes in intensity, mapped to the center, and sharp-edged stuff way out on the edges. Those diagonal lines in the original are regularities that will be represented by a prominent frequency at some distance from the center; you can probably pick them out, the two bright stars in the top left and bottom right quadrant. All the speckles all over the place represent different spatial frequencies that are required to reconstitute the image.

Important consideration: the power spectrum is showing you the spatial frequency domain, not the image. A speckle in the top right corner, for instance, does not represent a single spot on the top right side of our epithelial cell; it represents a wavelength that has to be applied to the entire image. Similarly, that bright star in the lower right is saying that there is a strongly represented sine wave with a particular orientation that has to be represented over everything, just as we see in the original.

The third image is the result if we apply another transform to the power spectrum, to restore the original image.

How is this useful? In image processing, we sometimes want to filter the power spectrum, to do things like remove annoying repetitive elements, like that diagonal hash splattered all over our epithelial cell. The Fourier tutorial lets you do that, as shown below.

power spectrum

You can use the mouse to draw ovals over the power spectrum, and the software will then filter out all of those spatial frequencies that have been highlighted in red. I told you that those two stars were the spatial representation of the diagonal lines all over the image, so here I've gone and blotted them out of existence. Then we reconstruct the image by applying a Fourier transform to the filtered power spectrum, and voila…we get our epithelial cell back, with the superimposed noise mostly gone. It's like magic!

Try it yourself. You can wipe out speckles all over the place and see what effect they have. If you blot out the edges of the power spectrum, what you'll be doing is deleting the higher spatial frequencies, which represent the sharp edges in the image, so you'll be effectively blurring the reconstructed image (which, to all you microscopists, is what stopping down the aperture at the focal plane does, chopping out high spatial frequencies and blurring your image). Notice that blotting out some particular set of speckles may not have much of a detectable effect at all, while others may cause dramatic changes. Notice also that a filter in one place on the power spectrum won't typically have an affect on one discrete place on the reconstructed image, but will affect it virtually everywhere.

I don't know about you, but I find that playing with power spectrums is good for hours of fun. I really wish I'd had this page available years ago, when I was teaching a course in image processing!

Before everyone vanishes to play with Fourier transforms, though, let me get back to my original point—which was to make an analogy with how the genome works.

Think of the genome as analogous to the power spectrum; we'll call it the genomic spectrum. The organism is like the reconstructed image; we'll call that the phenotypic image. A mutation is like the filters applied to the power spectrum. Most discrete mutations will have small effects, and they will be expressed in every cell, while some mutations will affect prominent aspects of the phenotype and will be readily visible. Genes don't directly map to parts of the morphology, but to some abstract component that will contribute to many parts of the form to varying degrees. There is no gene for the tip of your nose, just as there is no speckle in the power spectrum responsible one of the folds in the membrane of the epithelial cell image.

And what is development? It isn't represented in any of the pictures. Development is the Fourier transform itself, or the lens of the microscope; it's the complex operation that turns an abstraction into a manifest form. What results is dependent on the pattern in the genome, but it's also dependent on the process that extracts it.

And now that I've gotten that cosmic philosophizing off of my chest, I can go teach my class without being tempted into confusing the students by explaining one novel idea with which they are unfamiliar by using an analogy to another novel idea with which I am certain they are completely unfamiliar.


Trackback url: http://pharyngula.org/index/trackback/1318/X9gV46om/

Comments:
#6575: — 09/29  at  01:40 PM
A Fourier transform is an operation based on Fourier’s theorem, which states that any harmonic function can be represented by a series of sine and cosine functions, which differ only in frequency, amplitude, and phase. That is, you can build any complex waveform from a series of sine and cosine waves stacked together in such a way as to cancel out and sum with one another.

PZ I'm impressed!

Allow me to add for those of you who are wondering "why in the hell would anyone possibly want to take a single, simple, wave ... and break it into an infinite series of sine waves?"

The answer is that most waves are very messy. They're not like sine waves or the classic cross section of the two dimensional ocean-like wave one visualizes.
They're irregular screwy squiggles with little to no symmetry. Sine waves on the other hand are easy to take derivatives of and to integrate. And because the result of a Fourier Transform is a series, you can go out as far on each term as the accuracy of the given problem requires.

This is extremely useful in Quantum Mechanics for example; where the results of an experiment are often values which are interrelated via differential equalities. In such situations you need to go backwards to find the function which fits the relation and trying to do that with a wave form you can’t integrate of differentiate is pretty damn futile.



's avatar #6576: PZ Myers — 09/29  at  02:38 PM
It's also a useful explanation for why we can't get infinite resolution on a microscope: if the lens is dissecting an image into its component wave forms in a power spectrum, and if the higher frequencies are mapped far off the axis of the lens, we'd need an aperture of infinite width in order to capture those distant terms in the series.

(see, even us biologists sometimes have to understand a few math concepts)

PZ Myers
Division of Science and Math
University of Minnesota, Morris



#6577: — 09/29  at  03:41 PM
Great explanation! I'm impressed.

I've learned a little about everything you described, but never brought it all together the way you did.

More evo-devo, please smile



#6578: — 09/29  at  03:51 PM
PZ - I love your analogy!

DS - I knew Fourier series were used in sound and image processing, but I didn't realize they were good for data analysis too. Is there anything they can't do? smile



#6581: — 09/29  at  06:21 PM
All the stuff the "cool" folks have is the result of geeks being curious. I'll take geeks over "cool" anytime. Thanks for the wonderful information and the great links.



#6582: — 09/29  at  06:46 PM
So, why is it that you're not going to use this amazingly cool analogy with your students? I wish one of my biology professors had talked about this kind of thing. Now I'm just trying to figure out how to use this concept in a much simpler way for my own students. (I'm working on a Masters in teaching, secondary grades bio, chem, and physics.) Thanks for posting this - I love to hear your teaching ideas.



#6584: Prashant — 09/29  at  07:34 PM
Whatever others might say, that was the coolest demonstration of Fourier Transforms I have seen in a long time.... grin

Don't they rock!



's avatar #6585: PZ Myers — 09/29  at  07:52 PM
I'm working my students hard as it is, and I think that if I threw a bunch of stuff that required a lot of background it would be too much. This is a class where I could lecture for a few hundred hours, so I've got to cut somewhere.

PZ Myers
Division of Science and Math
University of Minnesota, Morris



#6589: — 09/29  at  10:30 PM
PZ, you are in a very small, select group that finds the fourier transform as an analogy to embryonic development useful smile. No offense meant (I hope that is obvious). As a fellow math/physics/imaging geek/biologist, I sympathise. I got all kinds of shit from my lab mates for reading books on neural networks and complexity theory when I was supposed to be cloning stuff! Good luck selling that Fourier transform analogy to your students!



#6590: Wesley R. Elsberry — 09/29  at  10:45 PM
OK, that's a basically very nice article, but I'm gonna pick some nits anyway. Errant pedantry in progress...

I've worked with several types of photomicroscopes, but I've yet to work with one that has an aperture at the focal plane, the focal plane being where the image is formed.

For, usually, adjusting an aperture means that I'm working with the light apparatus. This is typically an optical system of its own, and tweaking its adjustment is a skill of its own. The tried and true method for many light microscopes is "Kohler" illumination, and an aperture is involved in achieving the highest possible resolution. An aperture too wide or too narrow will degrade resolving power (reduce those high frequency components in the image). On the too narrow side of things, this would be due to diffraction introducing artifacts.



#6591: Steve Bates — 09/29  at  11:13 PM
PZ, I'm mightily impressed. You mean all that time I spent in engineering classes studying Fourier transforms was not wasted? Many years after college, I worked as a programmer for a genetics department for five years, and no one ever even hinted at that particular broad-analogy interpretation of the genome, but I have to admit it makes a lot of sense. It's regrettable that most of your students won't have the physics or engineering or image-processing background to follow your argument above, but for those of us who do, it induces one of those experiences of sudden understanding. Where were you in my college days? If only I could answer, "in my classrooms"!



#6592: Andrew Brown — 09/30  at  01:18 AM
I can't tell you how flattered I am to have my book taught in a class that has so many ideas bubbling through it.

Even though I still don't understand what a fourier transform does -- yes, I could repeat the definition; yes, I can see thanks to your illustration what happens -- but the process of transformation is as mysterious as development to me.



#6593: — 09/30  at  02:15 AM
The Fourier example relies on harmonic system's linearity - so a solution can be any linear sum of any valid solutions - maybe like pulling threads from woven fabrics - each warp or weft thread is independant.
The computer program analogy is a non-linear system, maybe like a knitted fabric where things are coupled together.
Do the Lindenmayer System pretty pictures figure among your analogies?

Speaking mostly through my hat ...



#6594: Mrs Tilton — 09/30  at  03:36 AM
Forget about the Porno For Proteostomes; stuff like this is why you deserve a monthly susbscription fee.



#6636: — 09/30  at  07:44 PM
OK, that is really cool, and makes a lot of sense to me as a Photoshop-using graphic designer (that is the deconstructed images does)... but how the heck do you reconstruct the spatial info? Where do the coordinates of a particular pixel in the unreconstructed image correspond in the reconstructed image?

I feel so lost...



#6640: Nomen Nescio — 09/30  at  08:48 PM
TikiGod, each pixel in the frequency-domain image (the unreconstructed one) corresponds to every pixel in the reconstructed one. (or in the original, for that matter.)

think of it this way: the "reconstruction" is just the mathemathical inverse of the "deconstruction", which latter is a fully reversible process. the pixels in the frequency-domain image each represent parameter inputs to the reconstruction function; all the inputs are necessary for a complete reconstruction, since the process doesn't discard any data, it just rearranges the information.

it's simply that the rearranging process works such that changing a single pixel in the frequency domain can have a large, and surprisingly enough very useful, effect on the reconstructed image. it isn't "deconstructing" or "reconstructing" anything, really, just shifting around the information needed to make up the image; sometimes the one arrangement is more useful or more sensible, sometimes the other.



#6655: — 10/01  at  09:17 AM
BTW on a side note, I want to thank PZ for the serendipitous inspiration the above article provided me. I'd been wanting to write an essay critiquing the IDC attacks on epistemology of science for some time but lacked a format. Fourier Series reminded me of Quantum Mechanics, and the state of consternation over Quantum Reality gave me an workable analogy to illustrate my misgivings over the IDC philosophical attacks on science.



#6656: — 10/01  at  09:27 AM
Nomen:

Thanks, but I was really wanting to know how the image mapped back and forth.

Is the Fourier image map a polar plot of some kind? It's acually 3D, isn't it: angle, radius and intensity? It's interesting that the noise spikes are usually arranged symmmetrically, 180º apart -- but I guess that makes sense for sine/cosine type wave functions?



's avatar #6657: PZ Myers — 10/01  at  09:34 AM
Reconstruction is done by applying a Fourier to the power spectrum; it's a bit mind-bending, but that's all it takes to convert it.

PZ Myers
Division of Science and Math
University of Minnesota, Morris



#6658: — 10/01  at  09:39 AM
I realize a 'normal' raster image could be seen as 3D as well: X, Y and intensity.



#6659: — 10/01  at  10:01 AM
i found an introduction to Fourier Theory which is quite explicit about the mathemathics involved -- unless you're good to go on multidimensional integration, that one's going to be tricky. the treatment in MathWorld is even more rigorous.

i also found an overview of how to apply it to images, but it seems to presuppose a lot of image processing theory which i don't have. another one has more examples and walks you through the process more, but still seems to expect you know how to decompose an image into wave frequencies first. you can, of course, google for more on your own.



#6660: — 10/01  at  10:44 AM
Thanks Nomen!



Page 1 of 1 pages

Next entry: Dilemmas in labeling

Previous entry: Let's all jump on Matthew Yglesias!

<< Back to main

Info

email PZ Myers
Search
Archives
UMM—America's best public liberal arts college