Ejemplo n.º 1
0
 def testSearchFeatureSets(self):
     request = protocol.SearchFeatureSetsRequest()
     request.dataset_id = self.datasetId
     request.page_size = self.pageSize
     self.httpClient.search_feature_sets(self.datasetId)
     self.httpClient._run_search_request.assert_called_once_with(
         request, "featuresets", protocol.SearchFeatureSetsResponse)
Ejemplo n.º 2
0
 def getAllFeatureSets(self):
     datasetId = self.getAllDatasets()[0].id
     path = 'featuresets/search'
     request = protocol.SearchFeatureSetsRequest()
     request.dataset_id = datasetId
     responseData = self.sendSearchRequest(
         path, request, protocol.SearchFeatureSetsResponse)
     return responseData.feature_sets
Ejemplo n.º 3
0
 def getAllFeatureSets(self):
     """
     Gets all feature sets available
     """
     datasetId = self.getAllDatasets()[0].id
     datasetName = self.getAllDatasets()[0].name
     path = 'featuresets/search'
     request = protocol.SearchFeatureSetsRequest()
     request.dataset_id = datasetId
     responseData = self.sendSearchRequest(
         path, request, protocol.SearchFeatureSetsResponse)
     return datasetName, responseData.feature_sets
Ejemplo n.º 4
0
    def search_feature_sets(self, dataset_id):
        """
        Returns an iterator over the FeatureSets fulfilling the specified
        conditions from the specified Dataset.

        :param str dataset_id: The ID of the
            :class:`ga4gh.protocol.Dataset` of interest.
        :return: An iterator over the :class:`ga4gh.protocol.FeatureSet`
            objects defined by the query parameters.
        """
        request = protocol.SearchFeatureSetsRequest()
        request.dataset_id = dataset_id
        request.page_size = pb.int(self._page_size)
        return self._run_search_request(request, "featuresets",
                                        protocol.SearchFeatureSetsResponse)