From c9df65647ad54f7220f87acb6b7ec5a67c6008c0 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Mon, 23 Oct 2023 16:12:23 +0100 Subject: [PATCH 1/4] Bump curation version to v0.26.0 (SCRUM-3367) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6bb92866..8ce505ace 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ quarkus-bom io.quarkus.platform ${quarkus.version} - v0.25.0 + v0.26.0 From 516062cb4cdfafc8b15fd50c7f6de85085002a19 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Mon, 23 Oct 2023 16:31:24 +0100 Subject: [PATCH 2/4] Refactored diseaseRelation to relation, SCRUM-3367 --- .../api/controller/AlleleController.java | 2 +- .../api/controller/DiseaseController.java | 2 +- .../rest/interfaces/AlleleRESTInterface.java | 4 +-- .../rest/interfaces/DiseaseRESTInterface.java | 2 +- .../api/service/DiseaseESService.java | 2 +- .../tdf/DiseaseAnnotationToTdfTranslator.java | 4 +-- .../DiseaseAnnotationCurationIndexer.java | 30 +++++++++---------- .../api/entity/DiseaseAnnotationDocument.java | 4 +-- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java index 64c7b8e1d..d5209d7c3 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java @@ -178,7 +178,7 @@ public JsonResultResponse getDiseasePerAllele(S pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("diseaseRelationNegation.keyword", associationType); + pagination.addFilterOption("relationNegation.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("primaryAnnotations.dataProvider.abbreviation", filterSource); diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java index 80471928f..43505c245 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java @@ -325,7 +325,7 @@ public JsonResultResponse getDiseaseAnnotationsRi pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("diseaseRelationNegation.keyword", associationType); + pagination.addFilterOption("relationNegation.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("subject.geneSymbol.displayText", filterGene); diff --git a/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/AlleleRESTInterface.java b/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/AlleleRESTInterface.java index 1ef2eabc7..c5f70f21d 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/AlleleRESTInterface.java +++ b/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/AlleleRESTInterface.java @@ -202,7 +202,7 @@ JsonResultResponse getDiseasePerAllele( @QueryParam("filter.geneticEntity") String geneticEntity, @Parameter(in = ParameterIn.QUERY, name = "filter.geneticEntityType", description = "geneticEntityType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.geneticEntityType") String geneticEntityType, - @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseRelation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) + @Parameter(in = ParameterIn.QUERY, name = "filter.relation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.associationType") String associationType, @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseQualifier", description = "diseaseQualifier", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.diseaseQualifier") String diseaseQualifier, @@ -240,7 +240,7 @@ Response getDiseasePerAlleleDownload( @QueryParam("filter.geneticEntity") String geneticEntity, @Parameter(in = ParameterIn.QUERY, name = "filter.geneticEntityType", description = "geneticEntityType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.geneticEntityType") String geneticEntityType, - @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseRelation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) + @Parameter(in = ParameterIn.QUERY, name = "filter.relation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.associationType") String associationType, @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseQualifier", description = "diseaseQualifier", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.diseaseQualifier") String diseaseQualifier, diff --git a/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/DiseaseRESTInterface.java b/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/DiseaseRESTInterface.java index a1ce642f2..d164d1145 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/DiseaseRESTInterface.java +++ b/agr_api/src/main/java/org/alliancegenome/api/rest/interfaces/DiseaseRESTInterface.java @@ -376,7 +376,7 @@ JsonResultResponse getDiseaseAnnotationsRibbonDet @QueryParam("filter.geneticEntity") String geneticEntity, @Parameter(in = ParameterIn.QUERY, name = "filter.geneticEntityType", description = "geneticEntityType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.geneticEntityType") String geneticEntityType, - @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseRelation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) + @Parameter(in = ParameterIn.QUERY, name = "filter.relation.name", description = "associationType", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.associationType") String associationType, @Parameter(in = ParameterIn.QUERY, name = "filter.diseaseQualifier", description = "diseaseQualifier", schema = @Schema(type = SchemaType.STRING)) @QueryParam("filter.diseaseQualifier") String diseaseQualifier, diff --git a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java index 0a375b22c..ae7db36ca 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java +++ b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java @@ -93,7 +93,7 @@ private Map getSupplementalData(String focusTaxonId, boolean deb if (StringUtils.isNotEmpty(focusTaxonId)) { aggregationFields.put("subject.taxon.name.keyword", "species"); } - aggregationFields.put("diseaseRelationNegation.keyword", "associationType"); + aggregationFields.put("relationNegation.keyword", "associationType"); aggregationFields.put("diseaseQualifiers.keyword", "diseaseQualifiers"); Map> distinctFieldValueMap = getAggregations(unfilteredQuery, aggregationFields, focusTaxonId, debug); Map supplementalData = new LinkedHashMap<>(); diff --git a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java index 84a6551b2..81645a62c 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java +++ b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java @@ -231,7 +231,7 @@ private static void extracted(GeneDiseaseAnnotationDocument annotation, org.alli if (primaryAnnotation.getGeneticSex() != null) { row.setGeneticSex(primaryAnnotation.getGeneticSex().getName()); } - row.setGeneticEntityAssociation(primaryAnnotation.getDiseaseRelation().getName()); + row.setGeneticEntityAssociation(primaryAnnotation.getRelation().getName()); if (CollectionUtils.isNotEmpty(primaryAnnotation.getRelatedNotes())) { row.setNote(primaryAnnotation.getRelatedNotes().stream().map(note -> { if (note.getNoteType().getName().equals("disease_note")) { @@ -292,7 +292,7 @@ private DiseaseDownloadRow getDiseaseDownloadRow(DiseaseAnnotation annotation, P private DiseaseDownloadRow getBaseDiseaseDownloadRow(GeneDiseaseAnnotationDocument annotation, org.alliancegenome.curation_api.model.entities.Gene homologousGene, org.alliancegenome.curation_api.model.entities.DiseaseAnnotation primaryAnnotation) { DiseaseDownloadRow row = new DiseaseDownloadRow(); - row.setAssociation(annotation.getDiseaseRelationNegation()); + row.setAssociation(annotation.getRelationNegation()); row.setDiseaseID(annotation.getObject().getCurie()); row.setDiseaseName(annotation.getObject().getName()); row.setSource(primaryAnnotation.getDataProviderString()); diff --git a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java index 110d3c8f3..eee3fac19 100644 --- a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java +++ b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java @@ -105,12 +105,12 @@ private List createGeneDiseaseAnnotationDocuments for (DiseaseAnnotation da : entry.getValue().getRight()) { - VocabularyTerm diseaseRelation = vocabService.getVocabularyTerm("is_implicated_in"); + VocabularyTerm relation = vocabService.getVocabularyTerm("is_implicated_in"); if (da instanceof GeneDiseaseAnnotation) { - diseaseRelation = da.getDiseaseRelation(); + relation = da.getRelation(); } - String key = diseaseRelation.getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); + String key = relation.getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); if (da.getWith() != null && da.getWith().size() > 0) { List withIds = da.getWith().stream().map(Gene::getCurie).collect(Collectors.toList()); Collections.sort(withIds); @@ -123,9 +123,9 @@ private List createGeneDiseaseAnnotationDocuments gdad.setSubject(entry.getValue().getLeft()); HashMap order = SpeciesType.getSpeciesOrderByTaxonID(entry.getValue().getLeft().getTaxon().getCurie()); gdad.setSpeciesOrder(order); - gdad.setDiseaseRelation(diseaseRelation); - String diseaseRelationNegation = getDiseaseRelationNegation(gdad.getDiseaseRelation().getName(), da.getNegated()); - gdad.setDiseaseRelationNegation(diseaseRelationNegation); + gdad.setRelation(relation); + String relationNegation = getRelationNegation(gdad.getRelation().getName(), da.getNegated()); + gdad.setRelationNegation(relationNegation); gdad.setObject(da.getObject()); gdad.setParentSlimIDs(closureMap.get(da.getObject().getCurie())); lookup.put(key, gdad); @@ -161,10 +161,10 @@ private String getPubmedPubModID(Reference singleReference) { return null; } - private String getDiseaseRelationNegation(String diseaseRelation, Boolean negated) { + private String getRelationNegation(String relation, Boolean negated) { if (!negated) - return diseaseRelation; - return diseaseRelation.replaceFirst("_", "_not_"); + return relation; + return relation.replaceFirst("_", "_not_"); } private List createAlleleDiseaseAnnotationDocuments() { @@ -178,7 +178,7 @@ private List createAlleleDiseaseAnnotationDocum HashMap lookup = new HashMap<>(); for (DiseaseAnnotation da : entry.getValue().getRight()) { - String key = da.getDiseaseRelation().getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); + String key = da.getRelation().getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); AlleleDiseaseAnnotationDocument adad = lookup.get(key); if (adad == null) { @@ -186,9 +186,9 @@ private List createAlleleDiseaseAnnotationDocum HashMap order = SpeciesType.getSpeciesOrderByTaxonID(entry.getValue().getLeft().getTaxon().getCurie()); adad.setSpeciesOrder(order); adad.setSubject(entry.getValue().getLeft()); - adad.setDiseaseRelation(da.getDiseaseRelation()); - String diseaseRelationNegation = getDiseaseRelationNegation(da.getDiseaseRelation().getName(), da.getNegated()); - adad.setDiseaseRelationNegation(diseaseRelationNegation); + adad.setRelation(da.getRelation()); + String relationNegation = getRelationNegation(da.getRelation().getName(), da.getNegated()); + adad.setRelationNegation(relationNegation); adad.setObject(da.getObject()); lookup.put(key, adad); } @@ -220,7 +220,7 @@ private List createAGMDiseaseAnnotationDocuments() HashMap lookup = new HashMap<>(); for (DiseaseAnnotation da : entry.getValue().getRight()) { - String key = da.getDiseaseRelation().getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); + String key = da.getRelation().getName() + "_" + da.getObject().getName() + "_" + da.getNegated(); AGMDiseaseAnnotationDocument adad = lookup.get(key); if (adad == null) { @@ -228,7 +228,7 @@ private List createAGMDiseaseAnnotationDocuments() HashMap order = SpeciesType.getSpeciesOrderByTaxonID(entry.getValue().getLeft().getTaxon().getCurie()); adad.setSpeciesOrder(order); adad.setSubject(entry.getValue().getLeft()); - adad.setDiseaseRelation(da.getDiseaseRelation()); + adad.setRelation(da.getRelation()); adad.setObject(da.getObject()); lookup.put(key, adad); } diff --git a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java index 81583646b..d5302f7ba 100644 --- a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java +++ b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java @@ -22,13 +22,13 @@ public class DiseaseAnnotationDocument extends SearchableItemDocument { private String uniqueId; - private VocabularyTerm diseaseRelation; + private VocabularyTerm relation; private DOTerm object; private List evidenceCodes; private Reference singleReference; private Set references; - private String diseaseRelationNegation; + private String relationNegation; private Set diseaseQualifiers; private Set pubmedPubModIDs; private Set parentSlimIDs; From 9f3299933b2555dc1bad89624061402312354a74 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Tue, 24 Oct 2023 16:26:02 +0100 Subject: [PATCH 3/4] Refactored relationNegation to negationInclRelation, SCRUM-3367 --- .../api/controller/AlleleController.java | 2 +- .../api/controller/DiseaseController.java | 2 +- .../alliancegenome/api/service/DiseaseESService.java | 2 +- .../tdf/DiseaseAnnotationToTdfTranslator.java | 2 +- .../curation/DiseaseAnnotationCurationIndexer.java | 10 +++++----- .../api/entity/DiseaseAnnotationDocument.java | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java index d5209d7c3..48f8a9a67 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java @@ -178,7 +178,7 @@ public JsonResultResponse getDiseasePerAllele(S pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("relationNegation.keyword", associationType); + pagination.addFilterOption("negationInclRelation.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("primaryAnnotations.dataProvider.abbreviation", filterSource); diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java index 43505c245..882d7f97f 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java @@ -325,7 +325,7 @@ public JsonResultResponse getDiseaseAnnotationsRi pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("relationNegation.keyword", associationType); + pagination.addFilterOption("negationInclRelation.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("subject.geneSymbol.displayText", filterGene); diff --git a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java index ae7db36ca..73afd0492 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java +++ b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java @@ -93,7 +93,7 @@ private Map getSupplementalData(String focusTaxonId, boolean deb if (StringUtils.isNotEmpty(focusTaxonId)) { aggregationFields.put("subject.taxon.name.keyword", "species"); } - aggregationFields.put("relationNegation.keyword", "associationType"); + aggregationFields.put("negationInclRelation.keyword", "associationType"); aggregationFields.put("diseaseQualifiers.keyword", "diseaseQualifiers"); Map> distinctFieldValueMap = getAggregations(unfilteredQuery, aggregationFields, focusTaxonId, debug); Map supplementalData = new LinkedHashMap<>(); diff --git a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java index 81645a62c..2adb86c55 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java +++ b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java @@ -292,7 +292,7 @@ private DiseaseDownloadRow getDiseaseDownloadRow(DiseaseAnnotation annotation, P private DiseaseDownloadRow getBaseDiseaseDownloadRow(GeneDiseaseAnnotationDocument annotation, org.alliancegenome.curation_api.model.entities.Gene homologousGene, org.alliancegenome.curation_api.model.entities.DiseaseAnnotation primaryAnnotation) { DiseaseDownloadRow row = new DiseaseDownloadRow(); - row.setAssociation(annotation.getRelationNegation()); + row.setAssociation(annotation.getNegationInclRelation()); row.setDiseaseID(annotation.getObject().getCurie()); row.setDiseaseName(annotation.getObject().getName()); row.setSource(primaryAnnotation.getDataProviderString()); diff --git a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java index eee3fac19..0039dd1b8 100644 --- a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java +++ b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java @@ -124,8 +124,8 @@ private List createGeneDiseaseAnnotationDocuments HashMap order = SpeciesType.getSpeciesOrderByTaxonID(entry.getValue().getLeft().getTaxon().getCurie()); gdad.setSpeciesOrder(order); gdad.setRelation(relation); - String relationNegation = getRelationNegation(gdad.getRelation().getName(), da.getNegated()); - gdad.setRelationNegation(relationNegation); + String negationInclRelation = getNegationInclRelation(gdad.getRelation().getName(), da.getNegated()); + gdad.setNegationInclRelation(negationInclRelation); gdad.setObject(da.getObject()); gdad.setParentSlimIDs(closureMap.get(da.getObject().getCurie())); lookup.put(key, gdad); @@ -161,7 +161,7 @@ private String getPubmedPubModID(Reference singleReference) { return null; } - private String getRelationNegation(String relation, Boolean negated) { + private String getNegationInclRelation(String relation, Boolean negated) { if (!negated) return relation; return relation.replaceFirst("_", "_not_"); @@ -187,8 +187,8 @@ private List createAlleleDiseaseAnnotationDocum adad.setSpeciesOrder(order); adad.setSubject(entry.getValue().getLeft()); adad.setRelation(da.getRelation()); - String relationNegation = getRelationNegation(da.getRelation().getName(), da.getNegated()); - adad.setRelationNegation(relationNegation); + String negationInclRelation = getNegationInclRelation(da.getRelation().getName(), da.getNegated()); + adad.setNegationInclRelation(negationInclRelation); adad.setObject(da.getObject()); lookup.put(key, adad); } diff --git a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java index d5302f7ba..8fecce20a 100644 --- a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java +++ b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java @@ -28,7 +28,7 @@ public class DiseaseAnnotationDocument extends SearchableItemDocument { private Reference singleReference; private Set references; - private String relationNegation; + private String negationInclRelation; private Set diseaseQualifiers; private Set pubmedPubModIDs; private Set parentSlimIDs; From a0cb7cddf82620c6c77a9d7ad8b361474c3a8b59 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Tue, 24 Oct 2023 17:46:54 +0100 Subject: [PATCH 4/4] Refactored negationInclRelation to generatedRelationString, SCRUM-3367 --- .../api/controller/AlleleController.java | 2 +- .../api/controller/DiseaseController.java | 2 +- .../alliancegenome/api/service/DiseaseESService.java | 2 +- .../tdf/DiseaseAnnotationToTdfTranslator.java | 2 +- .../curation/DiseaseAnnotationCurationIndexer.java | 10 +++++----- .../api/entity/DiseaseAnnotationDocument.java | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java index 48f8a9a67..c30c0268b 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/AlleleController.java @@ -178,7 +178,7 @@ public JsonResultResponse getDiseasePerAllele(S pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("negationInclRelation.keyword", associationType); + pagination.addFilterOption("generatedRelationString.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("primaryAnnotations.dataProvider.abbreviation", filterSource); diff --git a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java index 882d7f97f..80c9b629b 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java +++ b/agr_api/src/main/java/org/alliancegenome/api/controller/DiseaseController.java @@ -325,7 +325,7 @@ public JsonResultResponse getDiseaseAnnotationsRi pagination.addFilterOptions(filterOptions); pagination.addFilterOption("object.name", diseaseTerm); pagination.addFilterOption("evidenceCodes.abbreviation", evidenceCode); - pagination.addFilterOption("negationInclRelation.keyword", associationType); + pagination.addFilterOption("generatedRelationString.keyword", associationType); pagination.addFilterOption("diseaseQualifiers.keyword", diseaseQualifier); pagination.addFilterOption("pubmedPubModIDs", filterReference); pagination.addFilterOption("subject.geneSymbol.displayText", filterGene); diff --git a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java index 73afd0492..b5ab867c8 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java +++ b/agr_api/src/main/java/org/alliancegenome/api/service/DiseaseESService.java @@ -93,7 +93,7 @@ private Map getSupplementalData(String focusTaxonId, boolean deb if (StringUtils.isNotEmpty(focusTaxonId)) { aggregationFields.put("subject.taxon.name.keyword", "species"); } - aggregationFields.put("negationInclRelation.keyword", "associationType"); + aggregationFields.put("generatedRelationString.keyword", "associationType"); aggregationFields.put("diseaseQualifiers.keyword", "diseaseQualifiers"); Map> distinctFieldValueMap = getAggregations(unfilteredQuery, aggregationFields, focusTaxonId, debug); Map supplementalData = new LinkedHashMap<>(); diff --git a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java index 2adb86c55..8ade4e52e 100644 --- a/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java +++ b/agr_api/src/main/java/org/alliancegenome/api/translators/tdf/DiseaseAnnotationToTdfTranslator.java @@ -292,7 +292,7 @@ private DiseaseDownloadRow getDiseaseDownloadRow(DiseaseAnnotation annotation, P private DiseaseDownloadRow getBaseDiseaseDownloadRow(GeneDiseaseAnnotationDocument annotation, org.alliancegenome.curation_api.model.entities.Gene homologousGene, org.alliancegenome.curation_api.model.entities.DiseaseAnnotation primaryAnnotation) { DiseaseDownloadRow row = new DiseaseDownloadRow(); - row.setAssociation(annotation.getNegationInclRelation()); + row.setAssociation(annotation.getGeneratedRelationString()); row.setDiseaseID(annotation.getObject().getCurie()); row.setDiseaseName(annotation.getObject().getName()); row.setSource(primaryAnnotation.getDataProviderString()); diff --git a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java index 0039dd1b8..df4119bda 100644 --- a/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java +++ b/agr_indexer/src/main/java/org/alliancegenome/indexer/indexers/curation/DiseaseAnnotationCurationIndexer.java @@ -124,8 +124,8 @@ private List createGeneDiseaseAnnotationDocuments HashMap order = SpeciesType.getSpeciesOrderByTaxonID(entry.getValue().getLeft().getTaxon().getCurie()); gdad.setSpeciesOrder(order); gdad.setRelation(relation); - String negationInclRelation = getNegationInclRelation(gdad.getRelation().getName(), da.getNegated()); - gdad.setNegationInclRelation(negationInclRelation); + String generatedRelationString = getGeneratedRelationString(gdad.getRelation().getName(), da.getNegated()); + gdad.setGeneratedRelationString(generatedRelationString); gdad.setObject(da.getObject()); gdad.setParentSlimIDs(closureMap.get(da.getObject().getCurie())); lookup.put(key, gdad); @@ -161,7 +161,7 @@ private String getPubmedPubModID(Reference singleReference) { return null; } - private String getNegationInclRelation(String relation, Boolean negated) { + private String getGeneratedRelationString(String relation, Boolean negated) { if (!negated) return relation; return relation.replaceFirst("_", "_not_"); @@ -187,8 +187,8 @@ private List createAlleleDiseaseAnnotationDocum adad.setSpeciesOrder(order); adad.setSubject(entry.getValue().getLeft()); adad.setRelation(da.getRelation()); - String negationInclRelation = getNegationInclRelation(da.getRelation().getName(), da.getNegated()); - adad.setNegationInclRelation(negationInclRelation); + String generatedRelationString = getGeneratedRelationString(da.getRelation().getName(), da.getNegated()); + adad.setGeneratedRelationString(generatedRelationString); adad.setObject(da.getObject()); lookup.put(key, adad); } diff --git a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java index 8fecce20a..7930f4a17 100644 --- a/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java +++ b/agr_java_core/src/main/java/org/alliancegenome/api/entity/DiseaseAnnotationDocument.java @@ -28,7 +28,7 @@ public class DiseaseAnnotationDocument extends SearchableItemDocument { private Reference singleReference; private Set references; - private String negationInclRelation; + private String generatedRelationString; private Set diseaseQualifiers; private Set pubmedPubModIDs; private Set parentSlimIDs;