Skip to content
Closed
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 @@ -39,9 +39,10 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle

NCBITaxonTerm taxon = allele.getTaxon();
if (taxon != null) {
searchDoc.setSpecies(taxon.getName());
String speciesName = normalizeSpeciesName(taxon.getName());
Copy link
Copy Markdown
Member

@oblodgett oblodgett Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

speciesName needs to be allele.getTaxon().getSpecies().getName() and we need to revert the SGD special handling of the name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to need to do this story: https://agr-jira.atlassian.net/browse/SCRUM-2758 to get rid of this issue.

searchDoc.setSpecies(speciesName);
if (allele.getAlleleSymbol() != null) {
searchDoc.setNameKey(allele.getAlleleSymbol().getFormatText() + " (" + taxon.getName() + ")");
searchDoc.setNameKey(allele.getAlleleSymbol().getFormatText() + " (" + speciesName + ")");
}
} else if (allele.getAlleleSymbol() != null) {
searchDoc.setNameKey(allele.getAlleleSymbol().getFormatText());
Expand All @@ -60,7 +61,8 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
if (doc.getAlleleOfGene() != null && doc.getAlleleOfGene().getGeneSymbol() != null) {
String geneSymbol = doc.getAlleleOfGene().getGeneSymbol().getDisplayText();
if (taxon != null) {
geneSymbol = geneSymbol + " (" + taxon.getName() + ")";
String speciesName = normalizeSpeciesName(taxon.getName());
geneSymbol = geneSymbol + " (" + speciesName + ")";
}
searchDoc.setGenes(List.of(geneSymbol));
}
Expand Down Expand Up @@ -156,4 +158,14 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
return result;
}

private String normalizeSpeciesName(String name) {
if (name == null) {
return null;
}
if (name.equals("Saccharomyces cerevisiae S288C")) {
return "Saccharomyces cerevisiae";
}
return name;
}

}
Loading