Look into my eyes

What color are your eyes?

There are many ways to answer that question. Statistically speaking, they’re probably brown. Unless you’re from northern Europe, in which case they’re probably blue.

The apparent source of most light colored eyes on the planet.
The apparent source of most light colored eyes on the planet.

But what about green eyes? Or hazel, amber, grey, or shades in between? If you’ve ever looked deeply into someones eyes, you know for a fact that calling eyes “brown” or “blue” is as reductionist as a government form.

Human diversity has a fantastic ability to defy standardized forms. You don’t often see a checkbox for Heterochromia iridium.

Eye color can be described quantitatively. This study from December 2015 examined high resolution photos of the irises of 1465 people. They interpolated a single color value from a 256×256 pixel square of each iris, and plotted the results on a scatter plot in CIELAB color space with shape representing the participant’s country of origin.

Scatter plot of the average eye color of 1465 people.
Scatter plot of the average eye color of 1465 people. Triangles represent East Asian participants, squares are European, and circles are South Asian.

The study shows that eye color is highly correlated with the participant’s origin (and, by extension, likely ancestry) and goes on to look at the genes responsible for color variation.

Can genetics accurately predict the color of an individual’s eyes?

Mendelian eye color is a recessive theory

Eye color was once believed to be due to simple Mendelian inheritance. Brown indicated a dominant trait, blue was recessive, and any other color was hand-wavingly explained as a mix between the two.

But it is possible (though not common) for blue-eyed parents to have a child with non-blue eyes. Simple Mendelian inheritance can’t explain this.

Genetic sequencing has shown that the real story is, as usual, a lot more complex.

Eye color (as well as hair and skin color) seems to be determined by the concentration and type of melanins present. The melanins responsible for eye color include two flavors of eumelanin (brown and black) and pheomelanin, which appears pink-to-red. The mixing of concentration of these pigments determines your eye color. And your genes determine how much of each is likely to be produced by your body.

But which genes? And why?

While research is still ongoing, this area was heavily investigated in 2008 (mostly in European populations).

Here is a study that identifies several SNPs, which are also correlated with skin and hair color.

This paper demonstrates that two SNPs (rs12913832 and rs1129038) show a perfect association with blue eye color for a large Danish family. They go on to show that the region in which the SNPs occur is highly conserved (even in horses, cows, cats, dogs, rhesus monkeys, mice, and rats), possibly indicating a founder mutation.  But these two SNPs alone can’t account for the wide spectrum of iris color variation.

Another study implicates two additional SNPs (rs916977 and rs1667394) as being essential to identifying eye color.

23andMe uses rs12913832 as the definitive SNP, giving relative percentages of the likelihood of brown, green, or blue eyes on this call alone.

I signed up for 23andMe a couple of years ago (before their trouble with the FDA, which has thankfully passed). I have those results, and I can correlate their call with my recent WGS results. Fortunately the calls agree in this case. (This isn’t always true, due to technical differences in how the analysis is performed).

Here are my calls for several SNPs from the above studies. Depth refers to allelic depth. Humans are diploid, with two copies of each chromosome (allowing for variation in zero, one, or both copies). The first number indicates the number of reads supporting a call for the reference base, the other for the alternate (ROB) base. A zero in either place is a homozygous call; non-zero numbers in both places are heterozygous.

15  28365618 rs12913832 A   G   0,34   HERC2
15  28356859 rs1129038  C   T   0,22   HERC2
15  28513364 rs916977   T   C   19,19  HERC2
15  28530182 rs1667394  C   T   0,30   HERC2
15  28230318 rs1800407  C   T   17,16  OCA2
14  92773663 rs12896399 G   T   15,13  SLC24A4
5   33951693 rs16891982 G   G   40,0   SLC45A2
11  89011046 rs1393350  G   G   33,0   TYR
6   396321   rs12203592 C   T   14,11  IRF4

The verdict: Almost certainly blue.

Like 8% of the rest of the world, my eyes are commonly described as "blue". Also, slightly bloodshot due to overcaffeination.
Like 8% of the rest of the world, my eyes are commonly described as “blue”. Also, slightly bloodshot due to overcaffeination.

The genetics of eye color are a well-traveled path of research, but there is clearly still a lot of work to be done. The European bias of current research probably helps in my case, since I happen to be of European descent. But you can expect an even more complex story to unfold as we study Africa, China, the Pacific Rim, South America, and the rest of the melanin-rich world.

An immense amount of work has been done to tie genetics to something as easily observable as eye color. Now try to imagine the effort necessary to understand the genetic basis of more complex conditions like autism, cancer, schizophrenia, Alzheimer’s, aging… Especially if we’re not even certain that the dominant factor is genetic.

Computational genomics is certainly going to help extend human life and cure genetic disease. But the problem is vast, and we’re in a race for our lives. It’s going to be a long and tough fight.

My genome: Let me show you it

tl;dr: download Rob’s source code

In October 2015 I signed up as a beta tester for Arivale, a Seattle-based “scientific wellness” company. The service is something like nutritional-coach-meets-quantified-self.

In their words:

Our systems approach gathers, connects, and analyzes your data to create a complete picture of you.

And that it does.

Once a month I have a chat with a nutritional coach about my current diet, life stresses, and exercise habits. Over the course of a year they take multiple blood samples and plot an extensive panel of blood chemistry trends over time. They collect multiple saliva samples, measuring cortisol at four points throughout the day. They perform a gut microbiome sequencing (gross, yet fascinating!) to measure the impact of diet on microbial population diversity. They supply a Fitbit to track steps, sleep, and heart rate. They take a DNA sample and run a SNP panel looking for several variations linked to nutrition and exercise.

And last (but certainly not least), they perform whole genome sequencing. This sets it solidly apart from services like 23andMe that can only detect specific SNPs. While the whole genome is specifically excluded from the coaching process, it is used (with consent) as a basis for further genomic study.

Most importantly: Arivale provides a copy of the data, including a VCF and the raw reads.

Your own genome on a hard drive. If you’re into computational genomics, this is the ultimate unboxing experience.

After anxiously waiting for several months, I finally received an encrypted hard drive containing a VCF file and an aligned BAM file. Tech specs for the reads:

  • Ran on an Illumina HiSeq X Ten
  • 106 GB of compressed BAM data
  • 150 bp paired reads
  • Just under 600 million reads total
  • 30x average coverage
  • Uses hs37d5 for a reference
  • FastQC indicates that the read quality is quite good:
These reads look nice and clean, all the way to the end. Excellent.

The VCF calls about 4.5 million variants, including standard rs IDs. The longest called deletion is 231 bases, and the longest insertion is 524 bases.

But what does it all mean?

That, my friends, is an ongoing and evolving field of study.

The human genome itself was first sequenced in 2003 (coincidentally, just after I moved to Seattle).  But 13 years later, we do not yet have a simple database where you can look up “what a gene does” or “what a genetic variation means”.

The current state of the art includes databases like dbSNP and dbVar and clinVar  that attempt to tie genetic samples together with studies of specific phenotypes and conditions. It’s new science, and still tough going.

It’s not clear that we will ever have a database that tells us “what this gene does”, because life is clearly much more complex than that. DNA is Layer 1 of the stack that runs this program called life. Epigenetics and microbiota and environment and poor life choices clearly have a significant impact on the health of any given organism.

And yet, DNA provides the ground rules of what any organism could aspire to. Cats beget cats. Plants beget plants. Bacteria beget bacteria. People beget people (who host a colony of bacteria at least as big as they are).

Your DNA is not your body, but it does set the parameters for what can be made with locally available materials.

As a hacker, I’d like to help document and debug Layer 1. Now that I have a copy of my source code, I intend to share the code review process with you.

Responsible disclosure

There are already many online sources of human genetic data available for analysis (see 1000 Genomes, the NCBI Sequence Read Archive, the European Nucleotide Archive,  etc.) Researchers benefit from large and factually complete databases that make it possible to perform genome-wide association studies that can link genetic traits to phenotype and disease risk in a way that would not otherwise be possible.

But our genetic data tells possibly the most intimate story about ourselves, including our ancestral background, inherited disease risks, and direct family relations. Data mining can turn up many unexpected patterns. Some happy, some not so happy.

For that reason, public genetic databases take personal privacy (and HIPAA compliance) seriously. And I’m sure they don’t want to be sued.

Ideally I’d like my genetic data to be studied as widely and thoroughly as possible. To alleviate all possible privacy concerns, I hereby release my own genome under Creative Commons CC-BY-SA. You may reuse or remix my genetic data on a non-commercial basis any way you like. Please share your findings!

And I’d appreciate an introduction to any evil clones you might produce. Just don’t forget to credit the original author. (Spoiler alert: they’re all evil.)

My data is up on the SRA with ID SRR3990320. It’s also referenced by BioProject PRJNA335906.  To download the data, it’s best to use sratools or ascp; a slow and often unreliable ftp link should also be up shortly. The BAM is 106 GB.

While it’s apparent that people of European descent are already overrepresented in modern genomics, nobody else’s genome is mine to give. I expect this gap to close sharply as the cost of sequencing continues to plummet and it becomes a standard test covered by insurance. In the meantime, I hope one more white dude’s data is useful to somebody.

Curious about how your genes determine your eye color?  Look Into My Eyes.


Shrinking on battery power

Remember the hockey puck of doom that powers the Tesla Gun? It’s a ZVS driver (also called a Royer oscillator) that drives a flyback transformer using an 18V drill battery. I used to make them as a dead bug circuit potted in silicone. Fast forward a couple of years, and now you can find them all over eBay for less than $20.

It occurred to me that it should be possible to charge the quarter shrinker using a battery and a couple of transformers in series. Let’s try it and find out!

Looks legit.

After digging through my old box of transformers, I found a couple that didn’t arc too badly when powered up. I connected the outputs in series, using two independent ZVS circuits to drive them. The final output is approximately 20kV at 30mA with a charged battery.

Ready to fire. And for fire. And hopefully no explosions.

I also added a little fan to help cool the IGBTs on the driver boards.

It began charging as expected, quickly climbing to a couple of kilovolts. At around 7kV, the rate slowed a bit. The fan gradually slowed down, and various components (the battery, main switch, and IGBTs) all started to heat up.

By 8kV (about two minutes charge time) it was clear that the battery was about to give up the ghost. I switched it off at 8280 volts and pulled the trigger.

We have battery powered shrinkage!

The results were excellent! The coin in the middle was shrunk on battery power. The one on the right was from an earlier run with the usual NST supply, fired at 10kV. The standard quarter on the left is for scale.

I think it was a very successful experiment. If I swap the cheap IGBTs on the driver board for beefier switches, I think I can put together a reasonable power supply that lets us shrink on battery power all the way up to 10kV.

That will be handy next time there’s a tiny coin emergency during a power outage.

Updated: fixed broken images

The Quarter Shrinker returns

Back in 2009, I was one of several folks that built the coin shrinker at Hackerbot Labs.  After several hundred firings and sitting in a closet for months, it badly needed some love. We moved it to my shop and I got to work.

As with most projects on this site, the hazards here are many and subtle and include high voltage, extreme UV production, supersonic shrapnel, a several Tesla EMP, charging and discharging hazards, toxic smoke… In short, DON’T TRY THIS AT HOME. Come to my shop instead and we’ll shrink some coins. ^_^

Here’s a breakdown of how the Quarter Shrinker does its magic.

This machine eats kilojoules, copper, and vice-grips to make tiny coins.

Energy is stored in three 10kV/100uF Aerovox capacitors wired in parallel with thick copper bus bar. The capacitor bank is quite heavy, weighing in at about 200 kg (450 pounds). When fully charged, the capacitor holds 15,000 joules. Is this dangerous? To quote Wikipedia,

Any capacitor containing over 10 joules of energy is generally considered hazardous, while 50 joules or higher is potentially lethal.

Caution is clearly advised.

(Aside: we do in fact see dielectric absorption hysteresis after every firing. This toy can be lethal even after you think you’ve turned it off!)

Copper bus bars. For when the current absolutely, positively has to be there on time. The jumper cable safety short keeps the capacitor “turned off” when not in use.

The capacitor is connected to a high voltage DC power supply for charging. It includes a neon sign transformer, variac, and high voltage rectifier. The state of charge of the capacitor is monitored using a cheap semi-disposable volt meter and a 1000:1 voltage divider. Every volt on the meter represents 1000V on the bank.

There’s a gigohm resistor between the red lead and the positive terminal of the capacitor. The internal resistance of the meter is 1 megohm, making a convenient voltage divider of 1000:1.

The red and black twisted leads are connected to a hinged plate that is raised during use, but can be brought down at any time by pulling a long rope. Doing that immediately puts a large resistor across the capacitor, quickly and safely discharging it.

Resistance is not futile. In fact, it’s absolutely necessary for safely discharging the cap bank.

The main switch is a mechanical trigger with tungsten carbide contacts and an HDPE and delrin housing. It too can be gravity-closed by pulling a long rope. This is assisted by a rubber band made of surgical tubing, closing the switch as quickly as possible.

The trigger is shaped so that the contacts come very close together, but don’t actually touch. This keeps them from welding to each other or getting damaged from physical impact.

The trigger. Aim away from face when firing.

Current starts to flow well before the contacts come together, creating a fantastically bright flash of light (including ridiculous amounts of UV). Do not look at trigger with remaining eye.

The light on the left is the trigger closing. The light on top is the coil exploding.
The light on the left is the trigger closing. The light on top is the coil exploding.

The big plastic box on top is the blast chamber. It’s designed to absorb the force of the exploding coil without  breaking. A baffle system allows the rapidly expanding air and copper vapor to escape while trapping the copper shrapnel inside.

There’s a quarter inside that coil, about to be shrunk.

The copper coil consists of twelve windings of 12 gauge solid copper wire. Vice grips clamp the wire to the copper bus bar. As with nearly everything on this machine, the vice grips, sacrificial chunks of HDPE, and bus bar ends are all semi-disposable.

Physics Girl has a fantastic description of the physical forces at play, including how the quarter shrinks and why the coil explodes.

After pulling the trigger, the capacitor discharges in to the coil, shrinking the coin in less than 40 microseconds. The explosion is extremely loud. Ear protection, distance from the machine, and yelling “fire in the hole” are all mandatory.

The resulting shrunken coin glows white-hot during the process, and is quite hot for several minutes afterwards. Some of the copper coil is vaporized by the electric arc, creating a green copper plasma. The coin is typically covered in an atomically thin layer of copper, discoloring it. (Note to self: try to get an SEM photo of the copper plating on a coin when Millie is back online.)

Today’s money just doesn’t go as far as it used to. Also, copper plating a couple of atoms thick.

My shop-mate Sirus made a nice 4k video of the setup process and first post-rebuild firing. (The charge time is probably greater than your attention span. To skip directly to the trigger pull, CLICK HERE.)

Soda as a dietary supplement

Last year I signed up for Arivale’s beta program. They’re attempting to quantify participants’ state of health through DNA sequencing, gut microbiome sequencing, FitBit tracking, interviews, and periodic saliva and blood tests. I’m enjoying the experience so far, and very much looking forward to analyzing my own whole genome (just as soon as my BAM is finally available…)

So far I’ve had two blood tests: one last November, and one a last month. There’s not enough data to establish a real trend yet (particularly since they switched lab service companies between samples). But it’s still fun to see extensive blood work results mapped out on a nice easy-to-read chart.

This month my personal coach pointed out that my homocysteine and overall cholesterol levels look a little high. Previously my homocysteine level appeared quite low, which might be due to a bunch of factors.

homocysteine levels

Changing labs between samples means that direct comparisons are less meaningful. My coach wanted to know if my diet or habits have changed significantly since the last draw. Six months is a long time to account for, but I really couldn’t think of a significant change on my part.

She recommended taking a B12 supplement to help offset the rise in homocysteine.

That’s when it hit me: there was a subtle shift in my diet since last winter. I may have been inadvertently supplementing my diet with B vitamins after all.


One of my shop mates sprung for a case of Red Bull last year. It had been sitting around the shop for a while, and after a few long nights slaving over a hot SEM power supply, I started drinking the stuff. And eventually bought a second case.

Red Bull is, of course, quite high in B6 and B12.

About halfway through the second case I was starting to have trouble sleeping and generally felt overcaffeinated, so I completely quit drinking the stuff.

Neither I nor my counselor (a nutritionist) are doctors, but the Mayo Clinic indicates there is some scientific basis for lowering homocysteine by increasing intake of B vitamins. The overall affect on cardiovascular health seems to be an open question leaning toward “probably not relevant”.

I’m still not sure whether the amount I got from a Red Bull or two every other day would account for the shift in levels, but it’s a fun theory. It’s the first time I’ve ever had the thought that soda might be good for me.

But don’t worry, I’m switching from Red Bull to a B12 supplement with significantly less sodium, sugar, and caffeine.

AmScope upgrades

I designed a 3D-printable eyepiece holder that mates a Raspberry Pi camera to a popular inexpensive stereo inspection scope. This lets me send 5MP images from my AmScope straight to the network, without the need for a laptop!


The design files are here on Thingiverse.

I’m also using this awesome Raspberry Pi case with a chunk of Misumi extruded aluminum to hold the Pi in place.


An external button from an old joystick is wired to the GPIO lines. Using Adafruit’s Retrogame GPIO keyboard emulator, this hits the enter key to tell raspistill to take a photo every time the button is pressed. It’s connected to an old LCD monitor, giving me a nice big view of what’s under the scope.

Glad to know my microscope is running a pre-empting kernel…

The pi automatically logs in on the console at boot, and saves its images to a folder watched by Bittorrent Sync, which then pushes it out automatically to the WiFi.

Turn it on, hit the button, picture lands on the network. Perfect!

More photos


SEM back online

A couple of months ago, Milly started having beam issues. At the time it seemed like emitter trouble. New emitter modules run about $3k, so I took the opportunity to look into manufacturing my own.

But that’s a long story for another time.

8mm across, 1mm high, 0.1mm thick. And the tip is just a tungsten atom or two.
8mm across, 1mm high, 0.1mm thick. And the tip is just a tungsten atom or two.

The short version is that I’ve learned a lot in the last couple of months:

  1. Cold cathode tungsten emitter tips are really, really tiny. I knew that of course, but you don’t truly have an appreciation for something until you try to make one.
  2. Spot welding tungsten is harder than you might think. It has the highest melting point of any element (3422 C) and gets quite brittle after heating.
  3. Before jumping right into emitter maintenance, be sure to check all of your fuses.

In the end, it turned out that I had blown two fuses in the electromagnetic lensing power supply. This was the cause of the beam trouble, not the emitter itself.

Why two fuses? This circuit uses two 10A fuses in parallel. Each half is supposed to carry 7A.

Why two fuses in parallel instead of a single 20A fuse? I have no idea. The original manufacturer thought it was a great idea. But with fuses in parallel, whenever one blows the other one does too, often in a spectacular fashion.

After changing the fuses I decided to put the original emitter back in place. One 24 hour bake later, she’s back online.

Some random junk that happened to be under the beam.
Some random junk that happened to be under the beam.

She’s not quite 100% yet… There’s a little trouble with the noise cancelling pre-amp, and I need to take the time to properly realign the column. But thankfully she’s up and making images again.

More on my DIY emitter adventure in a future post.

Cheap digital optical microscope

I recently picked up an AmScope SE400Z inspection scope. It’s a handy desktop microscope that sells for under $200. The large area under the objective lens leaves plenty of room to work, and the 10-20x magnification is plenty for most of my needs.

While they do supply some nice looking USB eyepiece cameras, the price is a little high considering that they need a laptop to function.

I happened to have a Raspberry Pi camera lying around, and thought that it might be handy to turn the AmScope into a digital scope.

Frankenstein is actually the name of the eyepiece, not the microscope.
Frankenstein is actually the name of the eyepiece, not the microscope.

The Raspberry Pi has a plastic case that includes a flush mount for the camera. It is mounted directly to the eyepiece with some high-tech laser cut plywood and gorilla tape.

I use it with a cheap WiFi dongle so it has connectivity wherever I happen to need it in the shop. It runs raspistill in full screen mode, with HDMI feeding to an old monitor. The USB keyboard makes taking a photo as easy as hitting enter, though I’m considering making a simple button / foot switch for that. Photos are automatically sync’d to the network with BitTorrent Sync as they’re taken.

If microscopy teaches us anything, it's that there's a whole universe down there. A filthy, nasty universe that you can't unsee.
If microscopy teaches us anything, it’s that there’s a whole universe down there. A filthy, nasty universe that needs a good scrub.

With the 5 megapixels provided by the camera, you end up with an effective zoom of about 50x.

Those lines on the right are millimeters.
Those lines on the right are millimeters.

Do a science, hit enter, publish. Handy!