Monday, April 08, 2013

HiveBio: a DIY biology lab for Seattle

Seattle is one of the few cities with a big biotech industry lacking a community lab space. Katriona Guthrie-Honea and Bergen McMurray are going to fix that by creating a DIY bioscience lab. The Seattle HiveBio Community Lab will be a community supported Do-It-Yourself (DIY) biology hacker-space or maker-space.

Katriona Guthrie-Honea is a student at Ingraham High and an intern at Fred Hutch. Bergen McMurray is a neuroscience student and an alumna of the Allen Brain Institute and Jigsaw Renaissance, a maker-space in Seattle's International District.

Worrying about an "innovational stagnation period" because not enough people are learning and playing with biotech, Guthrie-Honea wants to provide a place where people of all ages can do just that.

Synthetic Biology was founded on the idea of bringing an engineering mindset to biotechnology, with one result being BioBricks, the beginnings of a set of modular components. The iGEM competitions drive education and open community around synthetic biology.

But, one could argue that a standard engineer wouldn't make a centrifuge out of a salad spinner or a ceiling fan. To do that, what you need is a hacker.

I love the idea of bringing the hacker mentality to life sciences. Just like we should all take the lids off our computers and root our phones, we should be hacking the yeast in our beer like mad scientist Belgian monks.

Anticipating a May opening, Guthrie-Honea and McMurray are seeking funding from Microryza, which is like a Kickstarter for science, and a great idea in itself.

Do you love the idea, too? Want to help? Just like Kickstarter, Microryza is a crowdfunding platform. Check out their project and kick in a few bucks.

Thursday, March 28, 2013

Playing with earthquake data

This is a little example inspired by Jeff Leek's Data analysis class. Jeff pointed us towards some data from the US Geological Survey on earthquakes. I believe these are the earthquakes for the last 7 days.

According to Nate Silver, analysis of earthquake data has made fools of many. But, that won't stop us. Let's see what we can do with it.

fileUrl <- "http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M1.txt"
download.file(fileUrl, destfile = "./data/earthquake_7day.csv", method = "curl")
eq <- read.csv("./data/earthquake_7day.csv")

Let's be good citizens and record the provinance of our data.

attributes(eq)["date.downloaded"] <- date()
attributes(eq)["url"] <- fileUrl
save(eq, file = "earthquakes_7day.RData")
attributes(eq)$date.downloaded
## [1] "Mon Feb  4 20:03:48 2013"

Let's see what they give us.

colnames(eq)
##  [1] "Src"       "Eqid"      "Version"   "Datetime"  "Lat"      
##  [6] "Lon"       "Magnitude" "Depth"     "NST"       "Region"

Something looks a little funny about the distribution of magnitudes. What's up with that bump at magnitude 5? I'm guessing that some detectors are more sensitive than others and the less sensitive ones bottom out at around 5.

hist(eq$Magnitude, main = "Histogram of Earthquake Magnitude", col = "#33669988", 
    border = "#000066")

plot of chunk unnamed-chunk-5

I'm guessing that the better detectors are on the west coast of the US.

westcoast <- c("Northern California", "Central California", "Southern California",  "Greater Los Angeles area, California", "Santa Monica Bay, California", "Long Valley area, California", "San Francisco Bay area, California", "Lassen Peak area, California", "offshore Northern California", "Washington", "Seattle-Tacoma urban area, Washington", "Puget Sound region, Washington", "Olympic Peninsula, Washington", "Mount St. Helens area, Washington", "San Pablo Bay, California", "Portland urban area, Oregon", "off the coast of Oregon")
hist(eq[eq$Region %in% westcoast, "Magnitude"], main = "Histogram of Earthquake Magnitude - West Coast US", 
    col = "#33669988", border = "#000066")

plot of chunk unnamed-chunk-6

Now that looks a little smoother. Let's try R's mapping ability. Check out the ring of fire.

library(maps)
map()
points(x = eq$Lon, y = eq$Lat, col = rgb(1, 0, 0, alpha = 0.3), cex = eq$Magnitude * 
    0.5, pch = 19)

plot of chunk unnamed-chunk-7

Zoom in on the west coast.

map("state", xlim = range(c(-130, -110)), ylim = range(c(25, 50)))
points(x = eq$Lon, y = eq$Lat, col = rgb(1, 0, 0, alpha = 0.3), cex = eq$Magnitude * 
    0.5, pch = 19)

plot of chunk unnamed-chunk-8

Lucky for us, almost all the recent quakes out here were tiny and the biggest was way off the coast.

summary(eq[eq$Region %in% westcoast, "Magnitude"])
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##     1.0     1.2     1.4     1.5     1.7     5.3

There are supposed to be active fault lines here in Seattle and you can see a few little ones. Down by Mt. St. Helens, they get a few moderately bigger ones. The only quakes I've felt recently were the contractors doing demolition for remodeling my basement.

The knitr output can also be seen on RPubs: Playing with Earthquake Data and on GitHub cbare/earthquakes.rmd.