Skip to content

SCRUM-5829 collate both SGD spcies into a single species facet#1537

Closed
cmpich wants to merge 1 commit intostagefrom
SCRUM-5829a
Closed

SCRUM-5829 collate both SGD spcies into a single species facet#1537
cmpich wants to merge 1 commit intostagefrom
SCRUM-5829a

Conversation

@cmpich
Copy link
Copy Markdown
Contributor

@cmpich cmpich commented Mar 26, 2026

No description provided.

@cmpich cmpich requested a review from a team as a code owner March 26, 2026 13:02
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

Code Review

Changes reviewed: AlleleSearchResultConverter.java — adds normalizeSpeciesName() to map "Saccharomyces cerevisiae S288C" → "Saccharomyces cerevisiae" in allele search result documents.

Verdict: Looks good. The logic is correct and the null guard is appropriate. The normalization is applied consistently at all three places where taxon.getName() was used for display (species field, nameKey, and gene symbol).

One minor note: the second call to normalizeSpeciesName(taxon.getName()) at line ~64 is redundant since taxon hasn't changed since the first call at line ~42 within the same loop iteration. The speciesName local from the first block could be hoisted to the outer scope and reused. Not a bug, just a small inefficiency.

This is consistent with the existing reverse-mapping pattern already in DiseaseController and GeneController (which expand the short name back to S288C for ES queries). No correctness or performance concerns.

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.

@cmpich cmpich closed this Mar 26, 2026
@oblodgett oblodgett deleted the SCRUM-5829a branch March 26, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants