2011-06-24

What does our DNA look like?

Everyone has seen the DNA double helix (if not click here right now), but what does your DNA look like as an image?

Specifically, I was daydreaming today when I thought: what if someone took one of the sequenced human genomes out there and converted all the letters into corresponding colors for the pixels of an image?

I decided that that someone was going to be me!

And a few minutes later with somewhere north of 25 google searches (where do I download the human genome? How do I remove newlines and capitalize letters with awk? How can I write PNGs with Haskell? What color code is a 32bit RGBA PNG in its header? etc...) I had my answer:


Now, a few caveats: This is only a portion of the Y chromosome of the 19th human sequenced. It really doesn't look like much does it? But it was a fun exercise for the 30 minutes or so before I headed home for the weekend.

The code (almost all of which came from this PNG example) can be found here. It is very ugly and does not use Haskell as it was meant to be used. But it gets the job done!

Please let me know if you have any suggestions as to making the image prettier/more informative. Perhaps I should indicate the location of TATA boxes or Poly-A tails etc... Maybe I'll find some time to do it too!

Just imagine that most of that is inside of us (the guys anyways, sorry ladies!), inside of every cell in our bodies in fact. Kinda neat if you ask me.