Thursday, November 10, 2016

The Loss of the Creature, Walker Percy, detailed commentary

I think the essay "The Loss of the Creature" by Walker Percy (from the book The Message in the Bottle) is well worth reading and thinking about. In this post I offer a detailed, paragraph-by-paragraph commentary of the essay. This post isn't really meant to be read from beginning to end (if you try that, it may get repetitive). It's meant more as a set of detailed footnotes for people who find the essay to be confusing. The way to follow this post is to print off Percy's essay, then number the paragraphs. By my numbering, there are 38 paragraphs in section I, and 24 paragraphs in section II (starting with #39, ending with #62). When reading, if you get stuck on a paragraph, look it up here, and maybe my comments will make it more clear (hopefully they won't make it even more confusing). For a more personalized discussion, please leave a comment. I'm well aware of the irony of writing an analysis of this essay as though I expect people to experience the essay through my interpretation (exactly opposite to how the essay encourages us to experience the world). I would encourage you to not think of my commentary as authoritative, but maybe just as a spark for your own thought.

(This is a work in progress, I got about half way through and then set it aside. It's been sitting unfinished for long enough that I feel I might as well just publish what I have. I hope to finish it eventually. In the mean time, if anybody else would like to contribute commentary for the remaining paragraphs, that would be nice.)

Wednesday, October 26, 2016

My dissertation is now available for download from ProQuest

My PhD dissertation is now available for free online at

I'm also making my laboratory notebooks from grad school available. They don't cover everything I did, they're pretty messy, and I'm not sure they will be useful or interesting to anyone, but here they are.

Here is the abstract to my dissertation:
Plant natural products are useful for many different applications, including medicines, flavors and fragrances, and industrial uses. Two important aspects of plant natural products research are the identification of compounds in their source plants, and the characterization of the processes involved in their biosynthesis. To aid in the identification of plant natural products, we developed the Spektraris family of databases. These databases include highperformance liquid chromatography mass spectrometry data, and 13C and 1H nuclear magnetic resonance data, which are searchable through an online interface. The utility of Spektraris was validated by using it to identify compounds in plant extracts and as part of a workflow to elucidate the structure of a previously undescribed compound.
Mints have a long history of use as model systems for studying the processes of terpene natural products biosynthesis in specialized plant tissues. The mint family (Lamiaceae), synthesizes and stores volatile terpenes in glandular trichomes. Using a comparative transcriptomic approach, we identified differences in gene expression of monoterpene biosynthetic genes among mint species with different oil profiles. We also assembled the genome of a mint species, Mentha longifolia. The genome assembly will be valuable for future mint research.
To further investigate biosynthetic processes in mint, I developed a detailed mathematical model of the metabolism of peppermint glandular trichomes. The model incorporates multiple sources of data, including transcriptome data, metabolite data, enzymatic data from the peppermint literature, and previously developed models of plant metabolism. The creation of a new metabolic modeling software package, called YASMEnv, facilitated construction of the model. Model-based simulated reaction knockouts using flux balance analysis revealed that fermentation may be important for ATP regeneration in secretory phase glandular trichomes. Follow up experiments confirmed high levels of alcohol dehydrogenase activity in secretory phase isolated trichomes. Simulations also supported an essential role for ferredoxin and ferredoxin-NADP reductase. Transcriptome analysis revealed the presence of an isoform of ferredoxin in trichomes distinct from the one expressed in root. The presence of a distinct ferredoxin isoform in trichomes supports the hypothesis that selection pressure for efficient natural products biosynthesis may also act on the enzymes of primary metabolism.

Thursday, October 13, 2016

rendering zdock server results using python and UCSF Chimera

I was interested in learning where the protein-protein interaction sites were on a particular protein (the receptor). I had pdb files for that protein, and for three proteins that it is known to bind to (the ligands). There are specific amino-acids of interest on the receptor protein, where there is variability among different species. For every combination of receptor and ligand, I want to perform a prediction of where the proteins interact, and then generate an image where the variable amino-acids are highlighted.

Gratefulness and Compassion meditation

Meditation is a way to slow down and appreciate life. For me, it is a way to relax, and prepare for the day, and to fight back against negative thoughts and attitudes that sometimes accumulate in my mind.

There's no one right way to meditate. You can try to empty your mind. You can focus intently on your breath, or on some mantra, or on different parts of your body. You can listen carefully and try to concentrate on perceiving your surroundings. The only rules are to be calm and to be positive. Meditation can sometimes veer into or negative thinking, or rumination: thinking about how other people owe you something, or how you've been mistreated or disrespected, or how you're somehow in an unfixable situation (you're not). Take care that your meditation does not become rumination.

I like to try out different kinds of meditation. Some I read about, some I invent on my own. I recently explained how I think that gratefulness and compassion are the two most important emotions. The rest of this post explains Gratefulness and Compassion Meditation, which is a way to cultivate those two emotions through practice.

Monday, July 11, 2016

Figuring out which adapters to trim in Illumina data

Often times it's difficult to know what adapter sequences should be trimmed from Illumina data. This can occur if you download public data, for example from SRA or if you send samples for sequencing to a company that doesn't communicate with you very well (not that I have any experience with that...).

Previously it's been a bit of a a struggle for me to figure out which adapters to trim when processing Illumina high-throughput sequencing data. With a little bit of time, and some thought about how Illumina sequencing works, adapters can be identified and removed even if we don't know beforehand what the sequences are.

Read on to see how I figured out the adapter sequences in my most recent RNAseq analysis.

Monday, July 4, 2016

Making a stoichiometric model of peppermint trichomes

Someday this work will be published with a more coherent and organized version of these methods. But maybe in the meantime, this will be useful to someone. Here's (more or less) my lab notebook for how I generated a stoichiometric model of metabolism in peppermint glandular trichomes.

A separate, complementary but more useful, guide for the same thing, including all of the code, can be found on in a bitbucket repository here

Conversion of the Arabidopsis model by Arnold and Nikoloski, 2014, into a model using MetaCyc metabolite names

I think the stoichiometric model of Arabidopsis thaliana by Anne Arnold and Zoran Nikoloski (2014) is a great model. However, they use idiosyncratic and non-standardized metabolite names. I translated these names into MetaCyc compatible names. Here I describe and link to the conversion. The whole conversion table is available on Google Sheets, here.

Future perspectives for stoichiometric modeling

These are a set of notes I wrote for a specific proposed stoichiometric modeling project. I've edited out some of the details because someone is actually working on this project, but I think what remains is still worth reading.

Things you need to know for writing a thesis or dissertation in Microsoft Word: Styles, Style breaks, Tables of Contents, and more!

In writing my dissertation, I've had to become more familiar with some of the more advanced features of Microsoft Word (I know, I know, I should be using LaTeX, but that's just not what people in my field use...). Here are a few of the most critical tricks I've learned. I hope this is helpful to other people as they write long documents like theses and dissertations. The screenshots here are from Word 2016, but all of these things are very similar on Word 2010 and 2013.

Sunday, July 3, 2016

Random discrete distributions (decks) in game development

Randomness plays an important role in many games. Enemies appear randomly, or events occur at randomly spaced intervals. A relatively easy way to think of random events in a game is as a deck of note cards. The probability of a particular word being drawn is a function of the number of cards in the deck with that word on them, and the total number of cards in the deck.

This approach is called a discrete distribution.

In the case of circle the aardvark, I used a discrete distribution to determine whether an aardvark or an enemy spawned, and how long each character should remain on the screen before timing out and going away.

The game is written in Monkey X, but the code in this post is in Python.
You can find the Monkey X version here.

Read on for details

Tuesday, June 21, 2016

Can compassion ever be powerful enough to stop terrorists?

Our country and our world keep experiencing devastating and seemingly senseless acts of mass violence. Some of the violence is committed by people who are clearly mentally ill. But a shocking amount of mass violence is committed by rational people who know exactly what they are doing. My ideological heroes, like L.L. Zamenhof, Amon Hennacy, and Leo Tolstoy, were strong proponents of non-violence, even to the point of pacifism.

In my life as a middle class American (that is: incredibly wealthy compared to the world-wide norm), I've never really experienced the threat of violence, so perhaps I'm a little rosy-eyed and unrealistically idealistic. But it seems to me that our strongest weapon against violence is, and will always be, compassion.

Here's a poem that kind of addresses these issues. I wrote it after reading the article “Young Lives, Lost in the Fog of War” by Rod Nordland in the Sept. 15 2012 New York Times.

I'd be remiss if I didn't also credit the inspiration of the Flaming Lips, and their performance at the Oklahoma City Zoo, and Bart Budwig for a line I stole from one of his songs.

Monday, June 20, 2016

Code Release: Circle the aardvark in the back of the pickup truck

A while ago I made a game called: Circle the aardvark in the back of the pickup truck. Now, by popular demand (or just because I felt like it...), I've posted the code and resources for public download. I think there's a lot of potential for using the core mechanic (circling things) for other games for touch devices. I intend to do a series of posts explaining some of the important or innovative aspects of the code.

In the meantime, the code can be found here.

Topics I hope to cover are:
Discrete random distributions
How to know when a circle (n-gon) is closed
How to know which objects are inside a closed circle.
Global timer control
High scores tracking with php and an sqlite database

Sunday, June 12, 2016

Assembling the Mentha Longifolia genome

A group of researchers, including myself, recently made a draft genome assembly for Mentha longifolia. The publication for which is currently under review. This post is my notes for my part of that effort. Basically that means that this is my lab notebook for part of the summer of 2014. It's pretty disorganized and may or may not be useful to anyone ever....

Long story short:
I was trying to figure out how to integrate PacBio reads with Illumina reads.
In the end, I used ECtools to correct the PacBio reads, and then used PBJelly to merge the PacBio reads with an assembly generated from the Illumina reads. It is my understanding that there may be better options for PacBio error correction today, but at the time ECtools seemed to be the best.

Read on for the juicy details....

Saturday, June 11, 2016

Musings on the meaning of meaning and the pursuit of happiness

This afternoon I intended to write a post about the phrase "be compassionate", which I think is the essence of morality. The intended title for the post was "Be compassionate: Morality in simplest terms".

It just so happened that my extremely thoughtful cousin wrote something about the meaning of "true happiness" on his Facebook wall, which prompted me to respond with the following 1000 word essay, which is kind of related to what was on my mind this morning.

So... this isn't quite the post I was meaning to write today, if you're looking for an in-depth analysis of the phrase "be compassionate" you'll have to wait for another week. If you're really into moral/existential meta-philosophy, this post may yet be worth reading for you. If you're a Christian (particularly one who isn't some kind of universalist) and have thought about these things more carefully than I have, leave a comment.

Sunday, May 8, 2016

building an interactive tree with d3.js php and sqlite: an annotated webliography

I want to make a tree with rectangular nodes containing text, such that I can add nodes or remove nodes on the fly. I want the tree to be "multiplayer": everybody who visits the site sees the same tree, and when one of them modifies it, it the updates are applied to everyone's view.
I know nothing about d3, and very little about PHP, but a bit about sqlite and Apache.
For this project I'm using a minimal number of libraries, and a very simple server setup, which leads to some inefficiencies. The server is Ubuntu 14.04 with Apache 2.4 with PHP 5.6. Client side the only library I'm using is d3.js 3.5.

A consequence of the simplicity is that I don't have a good way to push data to clients, so I can't use long polling or web sockets. Instead, I rely on repeated client requests for updates, which adds some latency, but hopefully not too much.

Requirements for graph:
Nodes are boxes that can contain about 50 words
terminal nodes can be added or removed (capability to add or remove internal nodes is not necessary)
root is on the left
subtrees can be expanded or collapsed
zoom-in zoom-out capability
pan capability
sort nodes with the older siblings above newer siblings

Let's get this figured out!

Wednesday, March 30, 2016

Linux shell notes

This is a post containing various assorted Bash scripts, and some explanations of how they work. Some don't rely on Bash specific features and will probably work on many other shells as well. I intend to keep adding to this list over time.

Sunday, March 6, 2016

Please stop writing dilution ratios as though they were fractions

Many biologists seem to not know how to write dilution notation properly. The colon ":" and the slash "/", both have distinct and well defined meanings. People (biologists, at least) usually use the slash properly, but in many situations use the colon as if it were a slash. Please, if you mean slash, write slash. If you mean colon, write colon. Do not write colon when you actually mean slash.

Let me explain the difference:

Sunday, January 31, 2016

Real Dennis Moore meals

Previously, I made a Dennis Moore memorial dinner using mostly just lupins as the ingredients. In the sketch there are actually a number of foods named those foods are: lupin soup, roast lupin, steamed lupin, braised lupin in lupin sauce, lupin in the basket with sauted lupins, lupin meringue pie, lupin sorbet.

At one time or another, I have all of those foods (except Lupin meringue pie, which I'm still working on) and present them to you here.

Highlights are the lupin sorbet (which is much better than my version of lupin ice-cream), and the lupin soup, which is also delicious.

Monday, January 25, 2016

How to cook lupins

The most important thing to remember when cooking with lupin is that lupin is a bean, and therefore behaves much like any other bean. I've written extensively about lupins in the past. In this post I summarize some of that knowledge, and give some general tips and tricks for cooking with lupins.

The Dennis Moore memorial dinner: a three course meal composed (almost) entirely of lupins

1 year, 8 months, and 16 days ago, I received my first shipment of lupins. I had a dream. That dream was to honor my hero Dennis Moore by making a three course meal composed in the greatest part possible by lupins. Today that journey has come to a successful conclusion.

Monday, January 18, 2016

Lupin chocolate chip cookies

I'm still occasionally experimenting with cooking with lupins. Today I made lupin cookies. Which, I'm happy to say, turned out fantastic! In fact after I made the first batch, I liked it so much I went ahead and immediately made another batch.