Abstracted GLM code away in new repository/gem bio-statsample-glm - https://github.com/AnkurGel/bioruby-statsample-glm