Wednesday, March 2, 2011

Nomograms for Synbio

I've always really liked nomograms. They're basically a set of axes drawn on a page in such a way that each axis represents one (or more) variables and by drawing lines between the various axes, it's possible to find unknown variables graphically.

One of the most basic nomograms possible simply adds two numbers:
From this simple beginning, it's possible to make other analog computation devices that are much more sophisticated. By using logarithmic axes, you can perform multiplication, since log(x) + log(y) = log(xy).

Nomograms are rather outdated, now that computers can perform numerical calculations much more easily and with far greater accuracy than anyone can measure by hand. The reason I'm looking into nomograms again is because they can be distributed on paper more easily than a computer program, they are relatively intuitive, and they allow very complex systems of equations to be solved by people who don't know math. There are also some iGEM outreach events coming up...

...so we'd like to be able to show people mathematical modelling stuff that's related to synthetic biology, but it's hard to come up with stuff that's interesting, learnable in minutes, and true. I think it's possible to condense some tricky work into a graph:


The above graph shows a setup that could calculate the concentration of a molecule and its isomers given a reaction rate constant (provided the axes were properly scaled). This is a fair amount of work (for the creator of the nomogram) when you could just plug "exp(-k*t)" into a calculator, but it's hard to beat the connect-the-dots simplicity of a nomograph. The other nice thing about this type of graph is that it really emphasizes the fact that it's easy to 'cheat' and start with the desired final answer and work backwards to get inputs... ie, design the system analytically.

Unfortunately, the irreversible isomerization reaction is still rather lame and even with an easy method of calculating it, it's still not particularly exciting. What would be cool would be to get a system of equations that describes an optimization problem and have a graph visually represent design trade-offs (like the triangular graph on this page), but that sounds like it might be too ambitious for me to tackle in a couple of spare hours.

Tuesday, December 21, 2010

Teleconference

It is not always easy to understand a large group of people speaking into a laptop microphone at the same time.

Sunday, October 31, 2010

Watermelon Carving

Exciting news everyone! I managed to grab the 'gingerich' username on Flickr (I tried for matt, but 210 people beat me to it... actually probably more than that, but matt211 was still available; also someone has majugi as well... grr).

Also, the reason I signed up for a Flickr account, after all this time, is because I don't want to put the entire series of awesome pictures I took of me carving a brain out of a watermelon on this blog. Here's one, though:

EDIT - Other crazy things I forgot to mention: I froze an egg while walking home from the grocery store today. I had noticed that one of my eggs was cracked, so I decided to fry it before it made a bigger mess but I ended up peeling away half the shell before I could 'pour' the egg into the pan. It is also now snowing (very lightly)!

...and the people I'm living with just filled four wine bottles with homemade apple cider (and I mean homemade in the fullest "pressed from apples grown on a friend's apple tree with an apple press built out of a car press and pieces of wood" sense — and the force required to press the apples was enough to shear the head of one of the screws clean off).

Wednesday, October 27, 2010

Voltage Dividers

Note: I found this post while deleting old drafts I never got around to finishing. I have no idea where I was going with it. I think I had some insightful analogy to make that related a voltage divider to life, music, minds, or some really esoteric projects that I have since forgotten. If you happen to think of what that analogy could have been, please let me know.

The sad thing is, I didn't even get around to explaining voltage dividers.

***

This is a voltage divider.

If the input voltage, V, provides a voltage of 5 volts, and resistors R1 and R2 are equal than Vout will be half of V, or 2.5 volts.

Thursday, October 7, 2010

Context-free grammar (Part 1 of 2)

What are context-free grammars? An abstract definition might say that they're a set of rules allowing for the construction of complex structures consisting of logical parts that can be arbitrarily nested, but I've found that nobody really likes my abstract definitions, so I'll try using an analogy instead.

Consider a freight train hauling three containers (containers A, B, and C):

Let's say that container A can only contain livestock, container B transports liquids, and container C contains manufactured goods. It doesn't matter what type of livestock, liquids, and manufactured goods are transported so long as they fit into their respective categories.

We have just defined a very simple grammar. Within this structure, it is possible to have 'phrases' such as "pigs milk computers" or "cows mercury needles".

A cow-mercury-needle train and pig-milk-computer train collision would be unfortunate.

Both the cow-mercury-needle train and the pig-milk-computer train are examples of the same model of train — an A-B-C train — that happen to be carrying different items in their identical containers. The model of the train can be thought of as one rule (or phrase structure) in the grammar, but it is certainly possible to have other rules.

The analogy gets a bit weird here (yes, weirder than the above image) because context free grammars also allow their containers to contain other trains.

Let's imagine a different model of train, the B-A-Weird train that has a B-container (which must, as before, contain a liquid), an A-container (holding livestock) and a weird container which holds either an A-B-C train or a B-A-Weird train. Now instead of a pig-milk-computer train, it would be possible to have a milk-pig-cow-mercury-needle train where the milk is in compartment B, the pigs are in compartment A and the cow-mercury-needle train from above is all in the weird compartment.

Okay, that's pretty weird, but that's not nearly as strange as being able to put a B-A-Weird train inside the Weird compartment. This could allow us to take the entire train we just discussed and stick it in the last compartment of another B-A-Weird train. Then we could take that train and do the same thing, over and over, as much as we would like. However, at this point the train analogy has lost almost all meaning and is likely confusing matters substantially.

Fortunately, there is a familiar application for context-free grammars that should make more sense now, namely language. By specifying containers in terms of parts of speech instead of cargo, we can construct sentences instead of trains. This is sort of reminiscent of Mad Libs: "the {noun} {past tense verb} the {noun}" would be one example of a sentence structure from a context-free grammar. Amusingly, this is also how Matlab's "why" function manages to produce output such as "The bald and not excessively bald and not excessively smart hamster obeyed a terrified and not excessively terrified hamster."

As before though, things get interesting when sentence structures get put inside of other sentence structures (just as trains... get... er, put inside of other trains). We can expand the definition of nouns to include phrases in the structure "{noun} the {noun} {past tense verb}". This allows phrases such as "man the hamster ate" to be used in place of the simple noun "man". And why not? Anywhere you can refer to a man, you can grammatically refer to a specific man who happened to be eaten by a hamster.

There is a slight problem with this setup in that, as before, things get complicated when structures are continually placed inside other structures. The phrase
"The dog the boy the man the hamster ate raised owned bit the boy the man the hamster ate raised."
is in fact valid using the two rules defined above and can be parsed as:
The (dog the (boy the (man the (hamster) ate) raised) owned) bit the (boy the (man the (hamster) ate) raised).
...meaning the hamster ate the man who raised the boy who owned the dog which bit the boy raised by the man eaten by the hamster.

So... yeah, people don't generally speak like that because of cognitive limits to how many nested levels of information we can keep track of at once. But maybe, you say, this idea of context-free grammar could still be useful for creating different kinds of structure. Some sort of really complex structure that can have parts embedded in other parts in ways that are hard for people to imagine. Perhaps, you hazard, some sort of biological structure.

In this last set of thoughts, you've outlined the general idea behind GenoCAD, a context-free grammar for synthetic biology. It seems to be a good fit at first but, as Andre from the UW iGEM team points out, there are quite a few properties of DNA sequences that it fails to capture. More on this later.

Tuesday, October 5, 2010

All the Way


I saw this rainbow as I was biking home today. The crummy cellphone panorama I took of it doesn't do it justice at all, because it was really quite vivid. In fact, looking closely at it revealed that it was a double rainbow with the second, very faint, rainbow surrounding the main one (slightly easier to see in the following picture - sadly this one's from the same cellphone camera).


Anyway, say what you will about guys sobbing hysterically over rainbows (or sing it, if you're so inclined), but know that they are much, much cooler looking live than in recordings.

Friday, September 24, 2010

Popular Neuroscience

This is a personal blog, it is not necessarily a reliable source of information.

I don't normally talk about the work I do on co-op terms, because I don't want to accidentally offend my employers by telling everyone how horribly nice they all are or making the similarly unfortunate error of posting confidential information. However, as I'm currently working for a neuroscience lab and it is pretty awesome I figure it couldn't hurt to write a series of posts about neuroscience stuff. Now, having said all that, here's a confidential training video:



Okay, so that video wasn't actually confidential, but I did steal the link from our lab forum. Now, Cleese's talk is pretty advanced (though quite entertaining), so I'm going to take a step back with a short Q&A (I'm not one to pass up an opportunity to talk to myself).

Q: What is neuroscience?

A: It's the study of the nervous system, nominally. In the long run, neuroscience, psychology, cognitive science, biology, and computer science are all intricately linked in a crazy quest to understand the way we think, the way intelligence and information processing in general works, and how it all somehow works with physical, biological components.

Q: Is neuroscience really that similar to cognitive science? Isn't it really just biology, but concentrating on the nervous system / brain?

A: I'm not very good with all the research classifications in the area, but it seems like most of what's being published under the label of neuroscience is neurobiology. From an experimental perspective this certainly makes sense: the brain is biological, after all, so obviously a substantial amount of the work being done in reverse-engineering it involves biology. Ultimately though, we're largely interested in the functionality of the brain and the way it gives rise to the interesting, complex interactions we all know and love: calling this functionality 'cognition' and attempting to understand said functionality is more or less what cognitive science is about. There is a big gap in understanding currently between neurobiology and cognitive science which is (to grossly and incorrectly simplify things) what theoretical neuroscience is puzzling over.

Q: tl;dr

A: Grr. Ok, look: biological understanding of brain = improving, but massively, insanely complex already and not capable of explaining brain function. Cognitive science = good at finding ways to do specific things; lacks general theories and can't compete with real brains. Gee, it sure would be nice to have people working on some combination of the above things! Those people would definitely deserve enough funding to pay their co-op students. Big time.

Q: I'm not convinced. What's the point of taking multiple different (and possibly conflicting) approaches?

A: First, which one's 'right'? I dunno. That's pretty much answer enough: they both provide more information, thus they're both valid approaches. If they happen to conflict, even better: there would then be an opportunity to investigate and fix problems that are found with the theories. That's pretty much how science works.

Q: Fine, fine. You can start at either the biology or psychological/cognitive levels, I get that. How could you possibly work from the midpoint between the two levels outwards?

A: This conversation makes more sense when it's less abstract. Instead of talking in terms of a 'midpoint' between two different research areas, I should really have framed this as a need to go beyond current empirical biological data to build more functionally complex models. Instead of making hypotheses based solely on raw data, you can start making predictive models constrained by assumptions, information processing requirements, simplifications required for tractability, and so on...

Q: Sorry to interupt, but isn't this post way too long already?

A: Yes.