Пример #1
0
 def readsGenerator(self, request):
     """
     Returns a generator over the (read, nextPageToken) pairs defined
     by the specified request
     """
     if not request.reference_id:
         raise exceptions.UnmappedReadsNotSupported()
     if len(request.read_group_ids) < 1:
         raise exceptions.BadRequestException(
             "At least one readGroupId must be specified")
     elif len(request.read_group_ids) == 1:
         return self._readsGeneratorSingle(request)
     else:
         return self._readsGeneratorMultiple(request)
Пример #2
0
 def readsGenerator(self, request):
     """
     Returns a generator over the (read, nextPageToken) pairs defined
     by the specified request
     """
     if request.referenceId is None:
         raise exceptions.UnmappedReadsNotSupported()
     if len(request.readGroupIds) != 1:
         raise exceptions.NotImplementedException(
             "Exactly one read group id must be specified")
     compoundId = datamodel.ReadGroupCompoundId.parse(
         request.readGroupIds[0])
     dataset = self.getDataset(compoundId.datasetId)
     intervalIterator = ReadsIntervalIterator(request,
                                              dataset.getReadGroupIdMap())
     return intervalIterator