Add some of the basic utility functions, copied over from R/qtlcharts