Ejemplo n.º 1
0
 def testSearchPhenotypeAssociationSets(self):
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = self.datasetId
     request.page_size = self.pageSize
     self.httpClient.search_phenotype_association_sets(
         dataset_id=self.datasetId)
     self.httpClient._run_search_request.assert_called_once_with(
         request, "phenotypeassociationsets",
         protocol.SearchPhenotypeAssociationSetsResponse)
Ejemplo n.º 2
0
 def search_phenotype_association_sets(self, dataset_id):
     """
     Returns an iterator over the PhenotypeAssociationSets on the server.
     """
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = dataset_id
     request.page_size = pb.int(self._page_size)
     return self._run_search_request(
         request, "phenotypeassociationsets",
         protocol.SearchPhenotypeAssociationSetsResponse)
Ejemplo n.º 3
0
 def testPhenotypeAssociationSetSearch(self):
     request = protocol.SearchDatasetsRequest()
     response = self.sendSearchRequest("datasets/search", request,
                                       protocol.SearchDatasetsResponse)
     datasetId = response.datasets[0].id
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = datasetId
     response = self.sendSearchRequest(
         "phenotypeassociationsets/search", request,
         protocol.SearchPhenotypeAssociationSetsResponse)
     # there should be an array
     self.assertIsNotNone(response.phenotype_association_sets)
     # there should be at least one entry
     self.assertGreater(len(response.phenotype_association_sets), 0)
Ejemplo n.º 4
0
 def getPhenotypeAssociationSetId(self):
     """
     Gets the dataset phenotype association set ID
     """
     request = protocol.SearchDatasetsRequest()
     response = self.sendSearchRequest("datasets/search", request,
                                       protocol.SearchDatasetsResponse)
     datasetId = response.datasets[0].id
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = datasetId
     response = self.sendPostRequest("phenotypeassociationsets/search",
                                     request)
     response = self.deserialize(
         response.data, protocol.SearchPhenotypeAssociationSetsResponse)
     return response.phenotype_association_sets[0].id
Ejemplo n.º 5
0
 def sendPhenotypeAssociationSetsSearch(self):
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = self.datasetId
     return self.sendPostRequest('/phenotypeassociationsets/search',
                                 request)