diff --git a/patient-reporter/src/main/java/com/hartwig/hmftools/patientreporter/structural/ReportableGeneDisruptionFactory.java b/patient-reporter/src/main/java/com/hartwig/hmftools/patientreporter/structural/ReportableGeneDisruptionFactory.java index 501ac8bca5..7c1b84d820 100644 --- a/patient-reporter/src/main/java/com/hartwig/hmftools/patientreporter/structural/ReportableGeneDisruptionFactory.java +++ b/patient-reporter/src/main/java/com/hartwig/hmftools/patientreporter/structural/ReportableGeneDisruptionFactory.java @@ -6,6 +6,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.hartwig.hmftools.common.numeric.Doubles; import com.hartwig.hmftools.common.variant.structural.annotation.ReportableDisruption; import org.apache.commons.lang3.tuple.Pair; @@ -34,7 +35,8 @@ static List convert(@NotNull List convert(@NotNull List= 0 ? primaryDisruptionLeft.ploidy() : 0) - .undisruptedCopyNumber(lowestUndisruptedCopyNumber >= 0 ? lowestUndisruptedCopyNumber : 0) + .ploidy(primaryDisruptionLeft.ploidy()) + .undisruptedCopyNumber(Math.max(0, lowestUndisruptedCopyNumber)) .firstAffectedExon(primaryDisruptionLeft.exonUp()) .build()); } else { @@ -52,9 +54,8 @@ static List convert(@NotNull List= 0 ? primaryDisruptionLeft.ploidy() : 0) - .undisruptedCopyNumber( - primaryDisruptionLeft.undisruptedCopyNumber() >= 0 ? primaryDisruptionLeft.undisruptedCopyNumber() : 0) + .ploidy(primaryDisruptionLeft.ploidy()) + .undisruptedCopyNumber(Math.max(0, primaryDisruptionLeft.undisruptedCopyNumber())) .firstAffectedExon(primaryDisruptionLeft.exonUp()) .build()); }