def getReadGroup(self, id_): """ Returns the ReadGroup with the specified id if it exists in this ReadGroupSet, or raises a ReadGroupNotFoundException otherwise. """ if id_ not in self._readGroupIdMap: raise exceptions.ReadGroupNotFoundException(id_) return self._readGroupIdMap[id_]
def getReadGroupSet(self, id_): """ Returns the ReadGroupSet with the specified name, or raises a ReadGroupSetNotFoundException otherwise. """ if id_ not in self._readGroupSetIdMap: raise exceptions.ReadGroupNotFoundException(id_) return self._readGroupSetIdMap[id_]
def _getContainer(self): if len(self._request.readGroupIds) != 1: if len(self._request.readGroupIds) == 0: msg = "Read search requires a readGroup to be specified" else: msg = "Read search over multiple readGroups not supported" raise exceptions.NotImplementedException(msg) readGroupId = self._request.readGroupIds[0] try: readGroup = self._containerIdMap[self._request.readGroupIds[0]] except KeyError: raise exceptions.ReadGroupNotFoundException(readGroupId) return readGroup