R Phone Home: Notifications with pushoverr

R Phone Home: Notifications with pushoverr

November 23, 2016

There are a lot of times when it would be great if your computer talked to you. pushoverr allows you to send yourself or your group notifications from R. Instead of compulsively checking the status of a running job, you can just have R tell you when it’s done, if it failed, or what the results are.

Read more

Connecting R to Everything with IFTTT

Connecting R to Everything with IFTTT

June 18, 2015

IFTTT (“if this then that”) is one of my favorite tools. I use it to keep and share articles, turn on my home’s lights at sundown, alert me when certain keywords are mentioned on Twitter/Reddit/etc., and many other things. Recently, the great people at IFTTT announced the Maker Channel, which allows recipes to make and receive web requests. This second option caught my interest as a nice way to do all kinds of things from R. For example, you could set the temperature with a Nest Thermostat, blink your hue lightbulbs, write some data to a Google Drive document, or do a whole lot of other things.

Read more

Creating Reproducible Software Environments with Packrat

July 15, 2014

Open science has grown tremendously in the past few years. While there’s still a long way to go, the availability of data, software, and other materials is making it possible to re-use these products to expand upon previous work and apply them to new areas. Through responsible conduct of research (RCR) training, journal requirements, changing individual and institutional principles, and open access evangelism, it’s now much more common for researchers to package their work with the intention of sharing it with others. What exactly this entails depends on a lot of things, including the field of research, the type of data, and how the data were processed and analyzed. At a minimum, one would hope for all of the appropriate data, a description of the software used for analysis or the software itself, and some metadata describing the data and how it was processed.

Read more

Plotting Microtiter Plate Maps

Plotting Microtiter Plate Maps

May 1, 2014

I recently wrote about my workflow for Analyzing Microbial Growth with R. Perhaps the most important part of that process is the plate map, which describes the different experimental variables and where they occur. In the example case, the plate map described which strain was growing and in which environment for each of the wells used in a 96-well microtiter plate. Until recently, I’ve always created two plate maps. The first one is hand-drawn using pens and markers and sat on the bench with me when I started an experiment. By marking the wells with different colors, line types, and whatever other hieroglyphics I decide on, I can keep track of where everything is and how to inoculate the wells.

Read more

Analyzing Microbial Growth with R

Analyzing Microbial Growth with R

April 9, 2014

In experimental evolution research, few things are more important than growth. Both the rate of growth and the resulting yield can provide direct insights into a strain or species’ fitness. Whether one strain with a trait of interest can outgrow (and outcompete) another that possesses a variation of that trait often depends primarily on the fitnesses of the two strains.

Read more

Summarizing Data in Python with Pandas

Summarizing Data in Python with Pandas

October 22, 2013

Like many, I often divide my computational work between Python and R. For a while, I’ve primarily done analysis in R. And with the power of data frames and packages that operate on them like reshape, my data manipulation and aggregation has moved more and more into the R world as well. Perhaps my favorite tool of all has been plyr, which allows you to easily split up a data set into subsets based on some criteria, apply a function or set of functions to those pieces, and combine those results back together (a.k.a. “split-apply-combine”). For example, I often use this to split up a data set by treatment, calculate some summary stats for each treatment, and put these statistics back together for comparison. With R and these excellent packages, these steps are about as painless (I actually enjoy them, but that’s probably not normal) as it gets. Because of this, R has long been the choice for doing this kind of work.

Read more

Creating Colorblind-Friendly Figures

Creating Colorblind-Friendly Figures

October 16, 2013

Color is often used to display an extra dimension in plots of scientific data. Unfortunately, everyone does not decode color in exactly the same way. This is especially true for those with color vision deficiency, which affects up to 8 percent of the population in its two most common forms. As a result, it has been estimated that the odds of a given plot reaching a reviewer with some form of color vision deficiency in a group of three males is approximately 22%. Hopefully, when we are creating figures, this number alone is compelling enough to always keep these viewers in mind. The truth, however, is that your figures aren‘t only seen by reviewers: they are seen by a much wider group that includes readers of your paper, members of the audience when you present your work, viewers of your lab‘s website, and potentially many others. As your audience grows, your choices in color become more and more important for effectively communicating your work.

Read more

Working with CSVs on the Command Line

Working with CSVs on the Command Line

September 23, 2013

Comma-separated values (CSV), and its close relatives (e.g., Tab-separated values) play a very important role in open access science. CSV is an informally-defined file format that stores tabular data (think spreadsheets) in plain text. Within the file, each row contains a record, and each field in that record is separated by a comma, tab, or some other character. This format offers several significant advantages. Because they are plain text, these files can be easily read and edited without the need for specialized or proprietary software. CSVs are also version-independent, so ten years down the road you won’t have to track down some ancient piece of software in order to revisit your data (or do the same for someone else’s data). Support for CSV files is built into most data analysis software, programming languages, and online services (see Some Useful Resources at the end of this article for links for your software of choice).

Read more

Data Visualization Presentation Online

Data Visualization Presentation Online

August 21, 2013

I’ve posted the slides from the presentation on data visualization that I gave with Jared Moore and Luis Zaman at the 2013 BEACON Congress. Check them out on figshare and feel free to share. Even though we were only able to scratch the surface, we had some great discussions about how to create and share visualizations and how important it is to make your data “easily consumable” by your audience.

Read more

When Cooperating Means Just Saying No

When Cooperating Means Just Saying No

June 20, 2013

Evolutionary biologists often talk like economists, particularly when the topic is cooperation. Instead of dollars, euros, or pounds, the universal currency in evolution is fitness. A species that cooperates cannot survive when competing against a non-cooperative opponent unless the fitness benefits provided by cooperation, such as those resulting from greater access to resources, outweigh the costs. To make matters more complicated, cooperative benefits often take the form of "public goods," which benefit all nearby individuals, whether cooperator or not. This sets the stage for the emergence of "cheaters", which exploit the cooperation of others without contributing themselves. Despite cooperation seeming at odds with the notion of "survival of the fittest", we now have a good understanding of how cooperation can persist in the face of cheaters based on the tremendous work of Fischer, Haldane, Hamilton, Price, and those who have since followed. When the costs and benefits are favorable, and when close relatives are more likely to receive those benefits, cooperation can survive and even thrive.

Read more

SEEDS Paper Published at EvoSoft Workshop

SEEDS Paper Published at EvoSoft Workshop

July 31, 2012

I recently went to Philadelphia for GECCO 2012, where I presented my paper The SEEDS Platform for Evolutionary and Ecological Simulations at the EvoSoft workshop. It was great to talk with people about modern Evolutionary Computation Software Systems, especially the DEAP team, who share a lot of my ideas.

Read more

The Role of Environment in the Evolution of Cooperation

April 25, 2011

Cooperation is something that most people take for granted. It’s woven into just about every part of our lives. Our societies have even developed a wide variety of measures to make sure we’re cooperating, such as punishing those that don’t. This level of cooperation isn’t reserved to humans. Cooperation plays a vital role in nearly all forms of life, from our primate cousins to ants and termites, and all the way down to simple microorganisms such as bacteria. There’s even an astounding amount of cooperation going on within our bodies. Amazingly, of the ten trillion or so cells in the human body, over 90% of those are bacterial cells made up of thousands of different species.

Read more