Martin's modifications to Wolfgang Kaisers rbamtools package