Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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 = protocol.fromJson(
         response.data, protocol.SearchPhenotypeAssociationSetsResponse)
     return response.phenotype_association_sets[0].id
Exemple #5
0
 def sendPhenotypeAssociationSetsSearch(self):
     request = protocol.SearchPhenotypeAssociationSetsRequest()
     request.dataset_id = self.datasetId
     return self.sendPostRequest('/phenotypeassociationsets/search',
                                 request)