Skip to content

SCRUM-3302 add experimental conditions for the phenotype download fil…#1565

Merged
oblodgett merged 1 commit intostagefrom
SCRUM-3302
Apr 10, 2026
Merged

SCRUM-3302 add experimental conditions for the phenotype download fil…#1565
oblodgett merged 1 commit intostagefrom
SCRUM-3302

Conversation

@cmpich
Copy link
Copy Markdown
Contributor

@cmpich cmpich commented Apr 10, 2026

…e on gene and allele page

@cmpich cmpich requested a review from a team as a code owner April 10, 2026 12:12
@oblodgett oblodgett enabled auto-merge April 10, 2026 12:13
@claude
Copy link
Copy Markdown

claude bot commented Apr 10, 2026

Code Review — PR #1565

Summary: Adds two new columns ("Experimental Condition" and "Condition Modifier") to the phenotype download TSV, populated from primary annotation condition relations with a fallback to document-level aggregated values. The PhenotypeDownloadRow model gets two new fields to match.

Bug: Potential NullPointerException on cr.getConditions()

File: PhenotypeAnnotationToTdfTranslator.java, line 78

cr.getConditions().forEach(ec -> parts.add(ec.getConditionSummary()));

getConditions() can return null — the existing codebase guards against this (see DiseaseAnnotation.java:176: if (getConditions() != null)). If a ConditionRelation has a type but no conditions populated, this will throw an NPE and break the entire download for the user.

Suggested fix: Add a null/empty guard before iterating:

if (cr.getConditions() != null) {
    cr.getConditions().forEach(ec -> parts.add(ec.getConditionSummary()));
}

Or use CollectionUtils.isNotEmpty(cr.getConditions()) to stay consistent with the style used elsewhere in this file.

Everything else looks correct

  • The new download headers are inserted in a sensible column order.
  • The method signature change from this::getPhenotypeDownloadRow to (pa, annotation) -> getPhenotypeDownloadRow(pa, annotation) correctly threads the document through for the fallback logic.
  • The fallback from primary annotation conditions → document-level aggregated conditions is a reasonable approach.
  • The PhenotypeDownloadRow model changes are straightforward Lombok fields.

@oblodgett oblodgett merged commit 5e94924 into stage Apr 10, 2026
5 checks passed
@oblodgett oblodgett deleted the SCRUM-3302 branch April 10, 2026 12:16
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