diff --git a/agr_java_core/src/main/java/org/alliancegenome/core/translators/tdf/PhenotypeAnnotationToTdfTranslator.java b/agr_java_core/src/main/java/org/alliancegenome/core/translators/tdf/PhenotypeAnnotationToTdfTranslator.java index e378e3250..5eecfb258 100644 --- a/agr_java_core/src/main/java/org/alliancegenome/core/translators/tdf/PhenotypeAnnotationToTdfTranslator.java +++ b/agr_java_core/src/main/java/org/alliancegenome/core/translators/tdf/PhenotypeAnnotationToTdfTranslator.java @@ -2,6 +2,8 @@ import org.alliancegenome.api.entity.PhenotypeAnnotationDocument; import org.alliancegenome.curation_api.model.entities.AGMPhenotypeAnnotation; +import org.alliancegenome.curation_api.model.entities.AllelePhenotypeAnnotation; +import org.alliancegenome.curation_api.model.entities.GenePhenotypeAnnotation; import org.alliancegenome.curation_api.model.entities.PhenotypeAnnotation; import org.apache.commons.collections.CollectionUtils; @@ -43,6 +45,16 @@ private PhenotypeDownloadRow getPhenotypeDownloadRow(PhenotypeAnnotation annotat row.setGeneticEntityName(annot.getPhenotypeAnnotationSubject().getName()); row.setGeneticEntityType(annot.getPhenotypeAnnotationSubject().getSubtype().getName()); } + if (annotation instanceof AllelePhenotypeAnnotation annot) { + row.setGeneticEntityID(annot.getPhenotypeAnnotationSubject().getPrimaryExternalId()); + row.setGeneticEntityName(annot.getPhenotypeAnnotationSubject().getAlleleSymbol().getDisplayText()); + row.setGeneticEntityType("allele"); + } + if (annotation instanceof GenePhenotypeAnnotation annot) { + row.setGeneticEntityID(annot.getPhenotypeAnnotationSubject().getPrimaryExternalId()); + row.setGeneticEntityName(annot.getPhenotypeAnnotationSubject().getGeneSymbol().getDisplayText()); + row.setGeneticEntityType("gene"); + } return row; }