Archive for the ‘Ponderings’ Category

A footnote on novel H1N1

Friday, August 19th, 2011

A couple years ago, I wrote a post about the H1N1 “swine flu” outbreak, talking a bit about the mechanics of the virus and how it could be hacked. Today I read an interesting tidbit in Nature referencing this article in Science that is a silver lining on the H1N1 cloud.

You know how every flu season there’s a new flu vaccine, yet somehow for other diseases you only need to be vaccinated once? It’s because there’s no vaccine that can target all types of flu. Apparently, a patient who contracted “swine flu” during the pandemic created a novel antibody with the remarkable ability to confer immunity to all 16 subtypes of influenza A. A group of researchers sifted through the white blood cells of the patient and managed to isolate four B cells that contain the code to produce this antibody. These cells have been cloned and are producing antibodies facilitating further research into a potential broad-spectrum vaccine that could confer broad protection against the flu.

For some reason I find this really interesting. I think it’s because at a gut level it gives me hope that if a killer virus did arise that wipes out most of humanity, there’s some evidence that maybe a small group of people will survive it. Also, never getting the flu again? Yes, please! On the other hand, this vaccine will be a fun one to observe as it evolves, particularly around the IP and production rights that results from this. Who owns it, and who deserves credit for it? Does the patient that evolved the antibody deserve any credit? What will be the interplay between the researchers, the funding institutions, the health industry and the consumer market? Should/can the final result or process be patented so that ultimately, a corporation is granted a monopoly on the vaccine (maybe there’s already a ruling on this)? Should we administer the resulting vaccine to everyone, risking the forced evolution of a new “superstrain” of flu that could be even deadlier, or should we restrict it only to the old, weak, and young? While these questions have been asked and sometimes answered in other contexts, everyone can relate to suffering through the flu, so perhaps the public debate around such issues will be livelier.

A Time-Lapse Construction Video

Sunday, August 7th, 2011

Shortly after I moved into my flat in Singapore about a year ago, I found out that right in my “back yard” a 70-story skyscraper (Altez) was breaking ground. I guess most people would be a little put out that their view is getting blocked, but actually I was quite excited (although, it was also interesting to watch the formerly visible shipyard load ships). I find construction sites to be fascinating and educational. However, I don’t have the time to just stare out my window all day, so with a little help from xobs I modded a chumby One and added a USB camera to it, and created a script that snaps a 1280×1024 jpeg of the scene once every 15 minutes. All that data is collated on a NAS and finally encoded into a viewable video using mencoder.

The construction has finally progressed to a point where “interesting” things are in sight, and I’m sharing the video in case you are also fascinated by construction sites. I’ve learned a few things, such as what those dimples are for on the internal pillars of tall buildings (they hold the scaffold in place as the building goes up), and that red thing at the top of the building is for pumping concrete flooring. Also, toward the end of the video you get an idea of how much the crane’s mast flexes during normal operation.

Reverse Engineering Superbugs

Wednesday, June 8th, 2011

The outbreak of the EHEC O104:H4 E. coli “superbug” in Europe has got me thinking about biology again.

The rise of antibiotic-resistant superbugs are a product of our love of antibiotics. In the absence of antibiotics, a bug that has few resistances will grow faster and more efficiently than one that has to put on bullet-proof armor every morning and lug around heavy artillery. In other words, the biological machinery required to produce antibiotic resistance comes at a fitness cost for the bug. In antibiotic-free conditions, non-resistant strains grow faster than the resistant strains; and with as little as 20 minutes per generation, just a couple days can yield hundreds of generations. This is why, thankfully, not every bug out there has a full suite of drug resistance — a chief enemy of the superbug is the common bug.

According to this evolutionary theory for the acquisition and loss of drug resistance genes, a hospital is an ideal breeding environment for superbugs: they are asceptic (less competition from common bugs), and full of antibiotics (plenty of selective pressure to acquire resistance genes).

Thus it is curious to find superbugs in food. Farms are teeming with common bugs, creating a selective pressure to lose antibiotic resistance genes. While antibiotics are routinely put into farm animal feed, it’s probably not cost-effective to use broad-spectrum antibiotics on such a scale. Perhaps O104:H4 is just a spontaneous coincidence, a fluke — a bug had acquired a set of genes, got lucky and grew, and just as quickly got edged out by more competitive neighbors. This could explain why it’s been tough to find its origin.

Fortunately, the entire sequence of the O104:H4 bug is available for download on the internet. Our friends in China — BGI, located in Shenzhen — acquired a sample and in an unusual act released the sequence for public download. This is unusual because research organizations typically hold this kind of data close to the chest, partially for peer review to vet it before public release, and partially for competitive advantage in academic publications — proprietary access to data is a common method to reduce competition for high-profile publications, and thus ensure your academic reputation. Whatever their reasons are for sharing the data, I think it’s worth noting the contribution, because now everybody in the world can perform an analysis on the bug.

And that’s where the fun begins! Analyzing the sequence data requires a little know-how, but fortunately, my “perlfriend” is a noted bioinformaticist. The raw sequence data provided by BGI is a set oversampled sub-sequences, which have to be assembled based on matching up overlapping regions. Once you assemble the sequence, you get a set of contiguous reads, but there are still gaps. It’s a bit like trying to compose a large picture out of a number of small photos taken at random. With enough sampling you will eventually create a complete picture, but for various technical reasons there are still ambiguities and gaps.

After assembly, the genome of O104:H4 is stitched from over a half million short DNA samples into 513 contiguous fragments of DNA (“contigs” in bio-speak), with a total length of 5.3 million base pairs (notably, wikipedia cites E. coli as having only 4.6 million base pairs, so O104:H4 is probably at least 15% longer — and likewise takes more time to replicate than a non-drug resistant strain). Here’s contig 34 of the assembly:


AAATGGTATTCCTGTTCACGATACTATTGCCAGAGTTGTATCCTGTATCAGTCCTGC
AAAATTTCATGAGTGCTTTATTAACTGGATGCGTGACTGCCATTCTTCAGATGATAA
AGACGTCATTGCAATTGATGGAAAAACGCTCCGGCACTCTTATGACAAGAGTCGCCG
CAGGGGAGCGATTCATGTCATTAGTGCGTTCTCAACAATGCACAGTCTGGTCATCGG
ACAGATCAAGACGGATGAGAAATCTAATGAGATTACAGCTATCCCAGAACTTCTTAA
CATGCTGGATATTAAAGGAAAAATCATCACAACTGATGCGATGGGTTGCCAGAAAGA
TATTGCAGAGAAGATACAAAAACAGGGAGGTGATTATTTATTCGCGGTAAAAGGAAA
CCAGGGGCGGCTAAATAAAGCCTTTGAGGAAAAATTTCCGCTGAAAGAATTAAATAA
TCCAGAGCATGACAGTTACGCAATTAGTGAAAAGAGTCACGGCAGAGAAGAAA

(Fun fact: the word “Gattaca” occurs 252 times in the genome of O104:H4)

Aside from making gratuitous pop culture references, the raw DNA isn’t very useful to us — it’s as if we were staring at binary machine code. In order to analyze the data, you need to “decompile” the methods contained within the DNA. Fortunately, protein sequences are highly conserved. Thus, a function that has been determined through biological experiment (for example, snipping out the DNA and observing what happens to the cell, or transfecting/transforming the DNA into a new cell and seeing what new abilities are acquired) can be correlated with a sequence of DNA, which can then be pattern-matched over the entire record to determine what functions (genes) are inside the overall genome.

The pieces needed to do this reverse-engineering are a protein database, and a tool called “blastx”. All of these tools are available free for download.

The list of known proteins can be downloaded from uniprot.org. Searching for “drug resistance” restricted to E. coli organisms yields a nice list of proteins that have been identified by scientists over the years to confer upon E. coli parts of drug-resistance machinery. Overall, our query to the uniprot database returned 1,378 proteins that are described to confer drug resistance to E. coli.

Have a look at Multidrug transporter emrE [uniprot.org]. Inside the link, you’ll find a description of the biological mechanism for its function (it pumps antibiotics out of the cell), its secondary structure (a notion of the shape of the protein) and its 110-residue amino acid sequence.

Here’s another example of a snippet from the database for a drug you may recognize:

>sp|P0AD65|PBP2_ECOLI Penicillin-binding protein 2 OS=Escherichia coli (strain K12) GN=mrdA PE=3 SV=1
MKLQNSFRDYTAESALFVRRALVAFLGILLLTGVLIANLYNLQIVRFTDYQTRSNENRIK
LVPIAPSRGIIYDRNGIPLALNRTIYQIEMMPEKVDNVQQTLDALRSVVDLTDDDIAAFR
KERARSHRFTSIPVKTNLTEVQVARFAVNQYRFPGVEVKGYKRRYYPYGSALTHVIGYVS
KINDKDVERLNNDGKLANYAATHDIGKLGIERYYEDVLHGQTGYEEVEVNNRGRVIRQLK
EVPPQAGHDIYLTLDLKLQQYIETLLAGSRAAVVVTDPRTGGVLALVSTPSYDPNLFVDG
ISSKDYSALLNDPNTPLVNRATQGVYPPASTVKPYVAVSALSAGVITRNTTLFDPGWWQL
PGSEKRYRDWKKWGHGRLNVTRSLEESADTFFYQVAYDMGIDRLSEWMGKFGYGHYTGID
LAEERSGNMPTREWKQKRFKKPWYQGDTIPVGIGQGYWTATPIQMSKALMILINDGIVKV
PHLLMSTAEDGKQVPWVQPHEPPVGDIHSGYWELAKDGMYGVANRPNGTAHKYFASAPYK
IAAKSGTAQVFGLKANETYNAHKIAERLRDHKLMTAFAPYNNPQVAVAMILENGGAGPAV
GTLMRQILDHIMLGDNNTDLPAENPAVAAAEDH

(Incidentally, I find it amusing that the sequence for PBP2 is shorter than, for example, my PGP public key block)

PBP2_ECOLI is linked to penicillin resistance, and functions as a mutant of a gene that determines the shape of the bacteria. Reading through the bio-speak, it seems that this resistant variant is adapted to operate despite the presence of penicillin; bacteria with non-resistant forms of this gene are unable to form properly shaped cell walls and thus die. So, by browsing this database, we are getting a feel for the variety of countermeasures that bacteria has: sometimes they are active (pumping the antibiotic out of the cell) and sometimes they are passive (mutations that enable operation despite the presence of antibiotics).

Now, you need the actual decompiler itself. The program we used is called blast; specifically, a variant known as blastx. Blast stands for “basic local alignment search tool”. This analysis program computes all of the possible translations of the E. coli DNA to protein sequences (there are 6 overall: 5′->3′, 3′->5′, each multiplied by three possible framing positions of the codons), and then does a pattern-matching of the resulting amino acid sequences with the provided database of known drug-resistance sequences. The result is a sorted list of each known drug resistance protein along with the region of the E. coli genome that best matches the protein.

Here’s the output for the penicillin example:


# BLASTX 2.2.24 [Aug-08-2010]
# Query: 43 87880
# Database: uniprot-drug-resistance-AND-organism-coli.fasta
# Fields: Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value\
, bit score
43 sp|P0AD65|PBP2_ECOLI 100.00 632 0 0 29076 30971 1 632 0.0 1281
43 sp|P0AD68|FTSI_ECOLI 25.08 650 458 21 29064 30926 6 574 2e-33 142
43 sp|P60752|MSBA_ECOLI 32.80 186 120 6 12144 12686 378 558 6e-17 87.0
43 sp|P60752|MSBA_ECOLI 27.78 216 148 5 77054 77677 361 566 8e-14 76.6
43 sp|P77265|MDLA_ECOLI 27.98 193 133 6 12141 12701 370 555 2e-10 65.5

etc...

Here, you can see that the gene for PBP2_ECOLI has a 100% match inside the genome of O104:H4.

Now that we have this list, we can answer some interesting questions, such as “How many of the known drug resistance genes are inside O104:H4?” I find it fascinating that this question is answered with a shell script:


cat uniprot_search_m9 | awk '{if ($3 > 99) { print;}}' | cut -f2 |grep -v ^# | cut -f1 -d"_" | cut -f3 -d"|" | sort | uniq | wc -l

My perlfriend writes these so quickly and effortlessly it’s as if she’s tying IMs to friends — I half expect to see an “lol” at the end of the script. Anyways, the above script tells us that 1,138 genes are a 100% match against the database of 1,378 genes. If you loosen the criteria up to a 99% match, allowing for one or two mutations per gene — possibly a result of sequencing errors or just evolution — the list expands to 1,224 out of 1,378.

The inverse question is which drug-resistance genes are most definitely not in O104:H4. Maybe by looking at the resistance genes missing from O104:H4, we can gather clues as to which treatments could be effective against the bug.

In order to rule out a drug-resistance gene, we (arbitrarily) set a criteria of any gene with less than 70% best-case matching as “most likely not” a resistance that the bug has. The result of this query reveals that there are 116 genes that are known to confer drug resistance that are less than 70% matching in O104:H4. Here is the list:


A0SKI3 A2I604 A3RLX9 A3RLY0 A3RLY1 A5H8A5 B0FMU1 B1A3K9 B1LGD9 B3HN85 B3HN86 B3HP88 B5AG18 B6ECG5 B7MM15 B7MUI1 B7NQ58 B7NQ59 B7TR24 BLR CML D2I9F6 D5D1U9 D5D1Z3 D5KLY6 D6JAN9 D7XST0 D7Z7R4 D7Z7W9 D7ZDQ3 D7ZDQ4 D8BAY2 D8BEX8 D8BEX9 DYR21 DYR22 DYR23 E0QC79 E0QC80 E0QE33 E0QF09 E0QF10 E0QYN4 E1J2I1 E1S2P1 E1S2P2 E1S382 E3PYR0 E3UI84 E3XPK9 E3XPQ2 E4P490 E5ZP70 E6A4R5 E6A4R6 E6ASX0 E6AT17 E6B2K3 E6BS59 E7JQV0 E7JQZ4 E7U5T3 E9U1P2 E9UGM7 E9VGQ2 E9VX03 E9Y7L7 O85667 Q05172 Q08JA7 Q0PH37 Q0T948 Q0T949 Q0TI28 Q1R2Q2 Q1R2Q3 Q3HNE8 Q4HG53 Q4HG54 Q4HGV8 Q4HGV9 Q4HH67 Q4U1X2 Q4U1X5 Q50JE7 Q51348 Q56QZ5 Q56QZ8 Q5DUC3 Q5UNL3 Q6PMN4 Q6RGG1 Q6RGG2 Q75WM3 Q79CI3 Q79D79 Q79DQ2 Q79DX9 Q79IE6 Q79JG0 Q7BNC7 Q83TT7 Q83ZP7 Q8G9W6 Q8G9W7 Q8GJ08 Q8VNN1 Q93MZ2 Q99399 Q9F0D9 Q9F0S4 Q9F7C0 Q9F8W2 Q9L798

Again, you can plug any of these protein codes into the uniprot database and find out more about them. For example, BLR is the “Beta-lactam resistance protein”:

Has an effect on the susceptibiltiy to a number of antibiotics involved in peptidoglycan biosynthesis. Acts with beta lactams, D-cycloserine and bacitracin. Has no effect on the susceptibility to tetracycline, chloramphenicol, gentamicin, fosfomycin, vacomycin or quinolones. Might enhance drug exit by being part of multisubunit efflux pump. Might also be involved in cell wall biosynthesis.

Unfortunately, a cursory inspection reveals that most of the functions that O104:H4 lacks are just small, poorly understood fragments of machines involved in drug resistance. Which is actually an interesting lesson in itself: there is a popular notion that knowing a DNA sequence is the same as knowing what diseases or traits an organism may have. Even though we know the sequence and general properties of many proteins, it’s much, much harder to link them to a specific disease or trait. At some point, someone has to get their hands dirty and do the “wet biology” that assigns a biological significance to a given protein family. Pop culture references to DNA analysis are glibly unaware of this missing link, which leads to over-inflated expectations for genetic analysis, particularly in its utility for diagnosing and curing human disease and applications in eugenics.

While the result of this just-for-the-fun-of-it exercise isn’t a cure for the superbug, the neat thing about living here in The Future is that just a few days after an outbreak of a deadly disease halfway across the world, the sequence of the pathogen is available for download — and with free, open tools anyone can perform a simple analysis. This is a nascent, but promising, technology ecosystem.

On Earthquakes in Tokyo

Sunday, April 17th, 2011

These days, Tokyo experiences about four or five earthquakes a day. Before going to Tokyo, I had never really felt an earthquake — or rather, the ones in California were so brief and so small that usually I doubted my senses until I saw the news reports after the fact. In Tokyo, particularly in the very tall buildings, you are left with no doubt that the earth moved; your drink sloshes about, fixtures sway, and the wall panels squeak.

For those who are curious as to what an earthquake feels like, I have a bit of serendipity to share with you. The turbulence in a large plane like a 767 is a decent earthquake simulator. I happen to be sitting in such an airplane right now, flying from Tokyo to Singapore, and due to weather conditions there’s plenty of turbulence. I’d say a shallow magnitude 6.2 at a close range feels like strong turbulence, the kind that makes even a seasoned traveler a little bit disconcerted (and to think a 9.0 is almost a thousand times more powerful!); a magnitude 5.1 or so feels like the tiny shakes you get all the time at cruising altitude — the types you get annoyed at because it means your movie is about to be disrupted by a fasten-your-seatbelt announcement.

Aside from the physical experience of an earthquake, there is a definite sociological phenomenon that goes with it as well. Personal earthquake alarms are quite popular in Tokyo. Just as lightning precedes thunder, these alarms give you a few seconds warning to an incoming tremor. The alarm has a distinct sound, and this leads to a kind of pavlovian conditioning. All conversation stops, and everyone just waits in a state of heightened awareness, since the alarm can’t tell you how big it is — it just tells you one is coming. You can see the fight or flight gears turning in everyone’s heads. Some people cry; some people laugh; some people start texting furiously; others just sit and wait. Once the tremors die down, life resumes, usually with a joke and a bit of a laugh to shrug off the tension.

Tokyo, one month after

Monday, April 11th, 2011

I just arrived this morning in Tokyo. I’m here this week for business, and for the Digital Garage New Context Conference. I’m also participating in the RDTN.org project to help deploy a network of connected radiation sensors around Japan.

It’s been almost exactly one month since the devastating Tohoku earthquake and tsunami. The flight here was almost deserted, as many countries still have travel warnings about going to Tokyo (apparently, Singaporeans are actually disallowed travel to Tokyo at the moment). However, as I see it, the amount of radiation I get on the flight to Tokyo is about as much as I’ll get staying here for the week. The flight from Tokyo to Singapore (8 hours length) exposes you to ~33 uSv radiation (taking the measurement of LA-Tokyo as a proxy, which is also 8 hours length). Currently, the level of radiation in Tokyo is around 0.2 uSv/hr. Thus, I would have to spend over 300 hours in Tokyo (over 10 days) to get the same amount of radiation as I would get just getting there and back from Singapore.

We forget that ultimately, we are all nuclear powered. There is this massive, uncontrolled thermonuclear explosion going on right over our heads — we call it the Sun. Going closer to it and clearing earth’s protective atmospheric shield is 100x riskier than going within a hundred miles of the distressed Fukushima reactors. Personally, I’m more concerned about the X-ray machine at the airport — I find myself staring into the guts of the baggage X-ray machine with the red light on more often than I’d like, usually due to some bag stuck on the belt holding up the protective lead flaps that are supposed to shield me from that radiation. I get exposed to that about four or five times per trip.

Of course, the atmospheric readings don’t tell the whole story, there are long-lived isotopes that find their way into the water and food that are hazardous to health. Few people remember this, but Chernobyl covered the EU with Caesium-137, which with a half-life of 30 years, is still very much there; yet I don’t hesitate to go to the regions in the EU that have been covered with the very hazardous, and very much still in existence, isotope.

So all things tallied together, probably the biggest risk I have to my health here is second hand smoke and aftershocks. At the moment, it’s actually safer from the second hand smoke perspective, because there is an epic shortage of cigarettes in Tokyo. Who would have thought that the Fukushima disaster might have in net, a positive impact on the cancer risk of the average Tokyo citizen?

On the other hand, the earthquakes are a very real danger. As a former California resident for a decade, one would think I’ve felt my shakes. However, within a minute of deplaning in Narita, a 6.2 earthquake rocks Japan. That was the most earth-shaking Yokoso I’ve ever received! It definitely woke me up after my red-eye flight — the quake lasted about ten seconds or so, alarms going off, window panels rattling and my legs wobbling beneath me as they negotiate the shaking travellator. The quake triggered an automatic shutdown of the Shinkansen, so I had to take a bus to Shinjuku.

First thing I did when arriving in Shinjuku was buy some bottled water — imported from another country, since in my assessment there is a real risk of tapwater contamination. The shelves at the Family Mart were about half-bare at around 10AM. Certainly, goods are making their way in, but I can tell demand is high and the supply chain is drawn thin. Still, Tokyo people are scrappy and resilient, it’s business as usual here, and everyone is getting along with life.