Ruby code for University of St. Andrews Biology honours project.