See https://github.com/Sophist-UK/picard/pull/1 for another approach.