Archive for the ‘Ponderings’ Category

The Immune System of Red Algae vs. Ebola

Wednesday, October 7th, 2009

Saw an article that I found particularly interesting in my perusal of Science this week…”Sugary Achilles’ Heel Raises Hope For Broad-Acting Antiviral Drugs” by Robert F. Service (Science 4 September 2009 325: 1200 [DOI: 10.1126/science.325_1200a]).

I had always wondered how the immune systems of plants and simple creatures worked. Sure, our immune system is adaptive and has all those macrophages and T-cells and B-cells, but would a plant or a lobster do the same thing? Turns out they don’t. I can’t say I really understand how these work, but from what I can tell many organisms have passive immune systems that simply emit toxins and broad-spectrum antiviral compounds to protect themselves when they come under attack by bugs. Innate social behavior is also part of the immune response of certain simple animals; sick ones may instinctively isolate themselves from the group, for example, to prevent the further spread of disease.

Apparently, researchers at the US National Cancer Institute have discovered that red algae emit a compound called griffithsin (GRFT). GRFT targets mannose sugars commonly attached to viral protein particles that are also not commonly attached to human proteins. The article dives a little bit into the mechanism for the specificity, but what I found most interesting were the results of early studies:

For nearly all HIV strains, it takes less than 0.23 billionths of a mole, or nanomoles, of GRFT to inhibit half the viruses in vitro—a standard measure of drug effectiveness known as the compound’s IC50, in which the lower the number the more potent the compound. For SARS, GRFT’s IC50 is about 50 nanomoles, and for Ebola it is 380 nanomoles. That makes all three mannose binders some of the most powerful antivirals around.

In mice infected with SARS, 70% of the animals that received no antivirals died. By contrast, among those that received an intranasal dose of 5 milligrams per kilogram per day of GRFT for 4 days, 100% lived. With mice exposed to Ebola, one of nature’s most lethal viruses, all of the 10 control animals that didn’t receive GRFT died within 12 days. In the five groups of 10 animals that each received different injected doses of GRFT, up to 90% survived. Even when they were injected with the antiviral 2 days after being exposed to Ebola, 30% still lived.

That’s pretty remarkable. It’s also effective against H1N1. Of course, it’s only a matter of time before viruses manage to adapt, but until then this could cure a lot of very sick people. Hurray for red algae!

Nokia Schematics!

Sunday, July 26th, 2009

I was wandering around on a rainy Saturday afternoon in the mobile phone market in Shenzhen and I spied a stall keeper working on a phone motherboard. Unlike most of the other folks in the market, he was working from a set of schematics — that got my attention. I asked him where he got his schematics from and he kindly dispatched his young son to walk me over to the small tool shop on the other side of the market where, buried underneath a pile of single-use BGA SMT stencils, was a collection of mobile phone schematics for just about every phone made.

I don’t know about you, but getting my hands on schematics gets me really excited. This is like, the Ultimate Hardware Geek Pr0n. Sure, undressing a mobile phone and revealing its tender innards to my gaze — the sweet perfume of flux residue unleashed, curling into my nostrils — is one level of hardware voyeurism. But, getting the schematics for the phone and peering into its very circuit diagrams — that’s a whole new level, like tearing off the undergarments and ravaging the bosom of the phone. I was excited. I brought the manuals to the clerk and asked how much…wincing at the price I may have to pay to bring these prized morsels back to my hotel room. I breathed a sigh of relief when he asked for only 75 quai — a little over $10 US — for the whole three-book collection. I didn’t even haggle. I grabbed my booty and ran for the nearest taxi.

Alright. Don’t take my double entendre too literally; it’s just fun to write that way. Anyways, on to the manuals…

As you can see, these are sold as service manuals.

A sample index entry.

Each phone has a scan of the circuit board that is annotated to call out the position and function of all the components. This helps with the repair process.

A detail of the schematic for the Nokia N95’s RF section.

The same publisher of these schematics also offers a wide library of schematics, including those for Samsung, Sony Ericsson, Motorola, and Chinese-local “copycat” phones (like the iPhone clone in the lower left hand corner).

It’s hard to say if these manuals are legitimate (in the sense that Nokia deliberately released the schematics for use as a repair guide), or if they were stolen and republished as a “repair guide”. I doubt, however, that they were reverse-engineered out of the phone, because the schematics contain references to codenames and lingo that would not be embedded directly in the circuitboard. A bit of searching around on Google reveals that these manuals are available for downloads in bits and pieces on various websites, but they all seem to derive from a Chinese origin, and not from Nokia directly.

When I give talks about Open Hardware, I emphasize that it’s fundamentally impossible to keep hardware closed, because the source is the same as the product. Schematics can be derived out of a circuit board layout — a completely legitimate activity under US law. There are shops in China that will pull out a netlist in a couple days for under $1k, and services in the US that will take a bit longer and cost you a lot more. Significantly, there is a whole lot more that goes into building hardware than a mere schematic design: it takes me days to capture a schematic, but it takes me months to get it into mass production. Thus, I believe that publishing a schematic makes the product more serviceable and more useful, yet has little negative effect on your competitiveness in the marketplace. This is a key difference between software and hardware, as the time between writing software and publishing it to “production” can be as short as a few seconds for web-based services.

From my personal perspective, having the schematics is handy for a number of purposes. Aside from satisfying a general curiosity about the phone’s structure, it’s interesting to see the details on how certain sub-circuits are implemented. For example, when I learned electronics at MIT, they never directly taught me how to do EMI mitigation, or ESD protection. While I know the theory behind it, the implementation is trade-craft know how; these are subjects where experience trumps knowledge. Therefore, seeing Nokia’s take on it expands my understanding of the subject.

The schematics are also very useful because of Nokia’s buying power. Picking the cheapest part for a mass-produced hardware design is a tricky exercise; when you leave the realm of buying a few hundred or thousand pieces at a time and move into really high volumes, often times the price of the part has less to do with its design features and more to do with its physical dimensions and who is buying a lot of it. If someone like Nokia is buying millions of a certain part a year, the supply of this part is very stable, lead times are shorter (usually), and the price goes down. So, if you’re a small company and you want to build something cheap, you want to pick parts out of the Nokia supply chain because you indirectly enjoy the benefits of Nokia’s buying power. Thus, these schematics are a good starting point for sourcing cheap parts for production.

Update: got the books for Sony-Ericsson, Motorola, and MediaTek-chipset phones. Found only one Samsung book and it was very out of date. From my observations, the books left on display in these small shops are remainders — typically a little older, perhaps a little less popular. I had to scour the market to find a few of the more recent books, which probably means they are out there but I just don’t know the right person yet. Interestingly, the MediaTek-chipset series of books included some “how-to” manuals on using the chipset to build your own phone. This may be part of the “open” repository of hardware knowledge I previously mentioned in my post about the Shanzhai phone-copiers-turned-innovators.

Eclipse (as good as it got)

Tuesday, July 21st, 2009

The eclipse got down to a little sliver on one side, but I couldn’t get a good photo of it. This was the last time the sun passed behind a cloud that allowed for my camera to take a good photo, about 10 minutes before peak occlusion.

Eclipse (so far)

Tuesday, July 21st, 2009

The eclipse so far…got lucky and a cloud passed over it so I could use my digital camera directly instead of my pinhole rig.

On Influenza A (H1N1)

Sunday, June 21st, 2009

I read a fantastic article in Nature magazine (vol 459, pp931-939 (18 June 2009)) that summarizes not only the current state of novel H1N1 (aka Swine Flu) understanding, but also a compares H1N1 against other flu strains. In particular, it discusses in-depth how the pathogenic components — i.e., the stuff that kills you — compare against each other.

The Influenza virus is quite fascinating. Allow me to ramble on…

Comparison to Computer Viruses

How many bits does it take to kill a human?

The H1N1 virus has been comprehensively disassembled (sequenced) and logged into the NCBI Influenza Virus Resource database. For example, an instance of influenza known as A/Italy/49/2009(H1N1) isolated from the nose of a 26-year old female homo sapiens returning from the USA to Italy (I love the specificity of these database records), has its entire sequence posted at the NCBI website. It’s amazing — here’s the first 120 bits of the sequence.

atgaaggcaa tactagtagt tctgctatat acatttgcaa ccgcaaatgc agacacatta

Remember, each symbol represents 2 bits of information. This is alternatively represented as an amino acid sequence, through a translation lookup table, of the following peptides:

MKAILVVLLYTFATANADTL

In this case, each symbol represents an amino acid which is the equivalent of 6 bits (3 DNA-equivalent codons per amino acid). M is methionine, K is Lysine, A is Alanine, etc. (you can find the translation table here).

For those not familiar with molecular biology, DNA is information-equivalent to RNA on a 1 to 1 mapping; DNA is like a program stored on disk, and RNA is like a program loaded into RAM. Upon loading DNA, a transcription occurs where “T” bases are replaced with “U” bases. Remember, each base pair specifies one of four possible symbols (A [T/U] G C), so a single base pair corresponds to 2 bits of information.

Proteins are the output of running an RNA program. Proteins are synthesized according to the instructions in RNA on a 3 to 1 mapping. You can think of proteins a bit like pixels in a frame buffer. A complete protein is like an image on the screen; each amino acid on a protein is like a pixel; each pixel has a depth of 6 bits (3 to 1 mapping of a medium that stores 2 bits per base pair); and each pixel has to go through a color palette (the codon translation table) to transform the raw data into a final rendered color. Unlike a computer frame buffer, different biological proteins vary in amino acid count (pixel count).

To ground this in a specific example, six bits stored as “ATG” on your hard drive (DNA) is loaded into RAM (RNA) as “AUG” (remember the T->U transcription). When the RNA program in RAM is executed, “AUG” is translated to a pixel (amino acid) of color “M”, or methionine (which is incidentally the biological “start” codon, the first instruction in every valid RNA program). As a short-hand, since DNA and RNA are 1:1 equivalent, bioinformaticists represent gene sequences in DNA format, even if the biological mechanism is in RNA format (as is the case for Influenza–more on the significance of that later!).

OK, back to the main point of this post. The particular RNA subroutine mentioned above codes for the HA gene which produces the Hemagglutinin protein: in particular, an H1 variety. This is the “H1” in the H1N1 designation.

If you thought of organisms as computers with IP addresses, each functional group of cells in the organism would be listening to the environment through its own active port. So, as port 25 maps specifically to SMTP services on a computer, port H1 maps specifically to the windpipe region on a human. Interestingly, the same port H1 maps to the intestinal tract on a bird. Thus, the same H1N1 virus will attack the respiratory system of a human, and the gut of a bird. In contrast, H5 — the variety found in H5N1, or the deadly “avian flu” — specifies the port for your inner lungs. As a result, H5N1 is much more deadly because it attacks your inner lung tissue, causing severe pneumonia. H1N1 is not as deadly because it is attacking a much more benign port that just causes you to blow your nose a lot and cough up loogies, instead of ceasing to breathe.

Researchers are still discovering more about the H5 port; the Nature article indicates that perhaps certain human mutants have lungs that do not listen on the H5 port. So, those of us with the mutation that causes lungs to ignore the H5 port would have a better chance of surviving an Avian flu infection, whereas as those of us that open port H5 on the lungs have no chance to survive make your time / all your base pairs are belong to H5N1.

So how many bits are in this instance of H1N1? The raw number of bits, by my count, is 26,022; the actual number of coding bits approximately 25,054 — I say approximately because the virus does the equivalent of self-modifying code to create two proteins out of a single gene in some places (pretty interesting stuff actually), so it’s hard to say what counts as code and what counts as incidental non-executing NOP sleds that are required for self-modifying code.

So it takes about 25 kilobits — 3.2 kbytes — of data to code for a virus that has a non-trivial chance of killing a human. This is more efficient than a computer virus, such as MyDoom, which rings in at around 22 kbytes.

It’s humbling that I could be killed by 3.2kbytes of genetic data. Then again, with 850 Mbytes of data in my genome, there’s bound to be an exploit or two.

Hacking Swine Flu

One interesting consequence of reading this Nature article, and having access to the virus sequence, is that I now know how to modify the virus sequence to probably make it more deadly.

Here’s how:

The Nature article notes, for example, that variants of the PB2 Influenza gene with Glutamic acid at position 627 in the sequence has a low pathogenicity (not very deadly). However, PB2 variants with Lysine at the same position is more deadly. Well, let’s see the sequence of PB2 for H1N1. Going back to our NCBI database:

601 QQMRDVLGTFDTVQIIKLLP
621 FAAAPPEQSRMQFSSLTVNV
641 RGSGLRILVRGNSPVFNYNK

As you can see from the above annotation, position 627 has “E” in it, which is the code for Glutamic acid. Thankfully, it’s the less-deadly version; perhaps this is why not as many people have died from contracting H1N1 as the press releases might have scared you into thinking. Let’s reverse this back to the DNA code:

621  F  A  A  A   P  P  E   Q  S  R  
1861 tttgctgctg ctccaccaga acagagtagg

As you can see, we have “GAA” coding for “E” (Glutamic acid). To modify this genome to be more deadly, we simply need to replace “GAA” with one of the codes for Lysine (“K”), which is either of “AAA” or “AAG”. Thus, the more deadly variant of H1N1 would have its coding sequence read like this:

621  F  A  A  A   P  P  K   Q  S  R  
1861 tttgctgctg ctccaccaaa acagagtagg
                        ^ changed

There. A single base-pair change, flipping two bits, is perhaps all you need to turn the current less-deadly H1N1 swine flu virus into a more deadly variant.

Theoretically, I could apply a long series of well-known biological procedures to synthesize this and actually implement this deadly variant; as a first step, I can go to any number of DNA synthesis websites (such as the cutely-named “Mr. Gene”) and order the modified sequence to get my deadly little project going for a little over $1,000. Note that Mr. Gene implements a screening procedure against DNA sequences that could be used to implement biohazardous products. I don’t know if they specifically screen against HA variants such as this modified H1 gene. Even if they do, there are well-known protocols for site-directed mutagenesis that can possibly be used to modify a single base of RNA from material extracted from normal H1N1.

[Just noticed this citation from the Nature article: Neumann, G. et al Generation of influenza A viruses entirely from cloned cDNA. Proc. Natl Acad. Sci. USA 96, 9345-9350 (1999). This paper tells you how to DIY an Influenza A. Good read.].

Adaptable Influenza

OK, before we get our hackles up about this little hack, let’s give Influenza some credit: after all, it packs a deadly punch in 3.2kbytes and despite our best efforts we can’t eradicate it. Could Influenza figure this out on its own?

The short answer is yes.

In fact, the Influenza virus is evolved to allow for these adaptations. Normally, when DNA is copied, an error-checking protein runs over the copied genome to verify that no mistakes were made. This keeps the error rate quite low. But remember, Influenza uses an RNA architecture. It therefore needs a different mechanism from DNA for copying.

It turns out that Influenza packs inside its virus capsule a protein complex (RNA-dependent RNA polymerase) that is customized for its style of RNA copying. Significantly, it omits the error checking protein. The result is that there is about one error made in copying every 10,000 base pairs. How long is the Influenza genome? About 13,000 base pairs. Thus, on average, every copy of an Influenza virus has one random mutation in it.

Some of these mutations make no difference; others render the virus harmless; and quite possibly, some render the virus much more dangerous. Since viruses are replicated and distributed in astronomical quantities, the chance that this little hack could end up occurring naturally is in fact quite high. This is part of the reason, I think, why the health officials are so worried about H1N1: we have no resistance to it, and even though it’s not quite so deadly today, it’s probably just a couple mutations away from being a much bigger health problem.

In fact, if anything, perhaps I should be trying to catch the strain of H1N1 going around today because its pathogenicity is currently in-line with normal flu variants — as of this article’s writing, the CDC has recorded 87 deaths out of 21,449 confirmed cases, or a 0.4% mortality rate (to contrast, “normal” flu is <0.1%, while the dreaded Spanish flu of 1918 was around 2.5%; H5N1, or avian flu, is over 50%(!), but thankfully it has trouble spreading between humans). By getting H1N1 today, I would get the added bonus of developing a natural immunity to H1N1, so after it mutates and comes back again I stand a better chance of fighting it. What doesn’t kill you makes you stronger!…or on second thought maybe I’ll just wait until they develop a vaccine for it.

There is one other important subtlety to the RNA architecture of the influenza virus, aside from the well-adjusted mutation rate that it guarantees. The subtlety is that the genetic information is stored inside the virus as 8 separate snippets of RNA, instead of as a single unbroken strand (as it is in many other viruses and in living cells). Why is this important?

Consider what happens when a host is infected by two types of Influenza at the same time. If the genes were stored as a single piece of DNA, there would be little opportunity for the genes between the two types to shuffle. However, because Influenza stores its genes as 8 separate snippets, the snippets mix freely inside the infected cell, and are randomly shuffled into virus packets as they emerge. Thus, if you are unlucky enough to get two types of flus at once, the result is a potentially novel strain of flu, as RNA strands are copied, mixed and picked out of the metaphorical hat and then packed into virus particles. This process is elegant in that the same mechanism allows for mixing of an arbitrary number of strains in a single host: if you can infect a cell with three or four types of influenza at once, the result is an even wilder variation of flu particles.

This is part of the reason why the novel H1N1 is called a “triple-reassortant” virus: through either a series of dual-infections, or perhaps a single calamitous infection of multiple flu varieties, the novel H1N1 acquired a mix of RNA snippets that has bestowed upon it high transmission rates along with no innate human immunity to the virus, i.e., the perfect storm for a pandemic.

I haven’t been tracking the latest efforts on the part of computer virus writers, but if there was a computer analogy to this RNA-shuffling model, it would be a virus that distributes itself in the form of unlinked object code files plus a small helper program that, upon infection in a host, would first re-link its files in a random order before copying and redistributing itself. In addition to doing this, it would search for similar viruses that may already be infecting that computer, and it would on occasion link in object code with matching function templates from the other viruses. This re-arrangement and novel re-linking of the code itself would work to foil certain classes of anti-virus software that searches for virus signatures based on fixed code patterns. It would also cause a proliferation of a diverse set of viruses in the wild, with less predictable properties.

Thus, the Influenza virus is remarkable in its method for achieving a multi-level adaptation mechanism, consisting of both a slowly evolving point mutation mechanism, as well as a mechanism for drastically altering the virus’ properties in a single generation through gene-level mixing with other viruses (it’s not quite like sex but probably just as good, if not better). It’s also remarkable that these two important properties of the virus arise as a consequence of using RNA instead of DNA as the genetic storage medium.

Well, that’s it for me tonight — and if you made it this far through the post, I appreciate your attention; I do tend to ramble in my “Ponderings” posts. There’s actually a lot more fascinating stuff about Influenza A inside the aforementioned Nature article. If you want to know more, I highly recommend the read.