Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,13 @@ public JsonResultResponse<GenePhenotypeAnnotationDocument> getPhenotypeAnnotatio
String geneticEntityType,
String phenotype,
String reference,
String dataProvider,
String asc) {
long startTime = System.currentTimeMillis();
Pagination pagination = new Pagination(page, limit, sortBy, asc);
pagination.addFilterOption("phenotypeStatement", phenotype);
pagination.addFilterOption("pubmedPubModIDs", reference);
pagination.addFilterOption("primaryAnnotations.dataProvider.abbreviation", dataProvider);
try {
JsonResultResponse<GenePhenotypeAnnotationDocument> phenotypes = phenotypeESService.getGenePhenotypeAnnotations(id, pagination, false);
phenotypes.setHttpServletRequest(null);
Expand All @@ -489,6 +491,7 @@ public Response getPhenotypeAnnotationsDownloadFile(
String geneticEntityType,
String phenotype,
String reference,
String dataProvider,
String asc) {
// retrieve all records
JsonResultResponse<GenePhenotypeAnnotationDocument> response =
Expand All @@ -497,6 +500,7 @@ public Response getPhenotypeAnnotationsDownloadFile(
geneticEntityType,
phenotype,
reference,
dataProvider,
asc);
Response.ResponseBuilder responseBuilder = Response.ok(translator.getAllRows(response.getResults()));
APIServiceHelper.setDownloadHeader(id, EntityType.GENE, EntityType.PHENOTYPE, responseBuilder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ JsonResultResponse<GenePhenotypeAnnotationDocument> getPhenotypeAnnotations(
@QueryParam("filter.termName") String phenotype,
@Parameter(in = ParameterIn.QUERY, name = "filter.reference", description = "Reference number: PUBMED or a Pub ID from the MOD", schema = @Schema(type = SchemaType.STRING))
@QueryParam("filter.reference") String reference,
@Parameter(in = ParameterIn.QUERY, name = "filter.dataProvider", description = "Source", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.dataProvider") String filterSource,
@Parameter(in = ParameterIn.QUERY, name = "asc", description = "order to sort by", schema = @Schema(type = SchemaType.STRING))
@DefaultValue("true") @QueryParam("asc") String asc);

Expand All @@ -296,6 +297,7 @@ Response getPhenotypeAnnotationsDownloadFile(
@QueryParam("filter.termName") String phenotype,
@Parameter(in = ParameterIn.QUERY, name = "filter.reference", description = "Reference number: PUBMED or a Pub ID from the MOD", schema = @Schema(type = SchemaType.STRING))
@QueryParam("filter.reference") String reference,
@Parameter(in = ParameterIn.QUERY, name = "filter.dataProvider", description = "Source", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.dataProvider") String filterSource,
@Parameter(in = ParameterIn.QUERY, name = "asc", description = "order to sort by", schema = @Schema(type = SchemaType.STRING))
@DefaultValue("true")
@QueryParam("asc") String asc);
Expand Down
Loading