diff --git a/src/main/java/uk/ac/sanger/sccp/stan/service/OpWithSlotMeasurementsServiceImp.java b/src/main/java/uk/ac/sanger/sccp/stan/service/OpWithSlotMeasurementsServiceImp.java index a8a59050..13aee903 100644 --- a/src/main/java/uk/ac/sanger/sccp/stan/service/OpWithSlotMeasurementsServiceImp.java +++ b/src/main/java/uk/ac/sanger/sccp/stan/service/OpWithSlotMeasurementsServiceImp.java @@ -31,7 +31,7 @@ public class OpWithSlotMeasurementsServiceImp implements OpWithSlotMeasurementsS OP_QPCR = "qPCR results"; public static final String MEAS_CQ = "Cq value", MEAS_CDNA = "cDNA concentration", MEAS_LIBR = "Library concentration", MEAS_CYC = "Cycles", - MEAS_MIN_SIZE = "Minimum size", MEAS_MAX_SIZE = "Maximum size", MEAS_PEAK_SIZE = "Main peak size" + AVERAGE_SIZE = "Average size", MEAS_PEAK_SIZE = "Main peak size" ; private final MeasurementRepo measurementRepo; @@ -66,7 +66,7 @@ public OpWithSlotMeasurementsServiceImp(MeasurementRepo measurementRepo, Operati this.valHelperFactory = valHelperFactory; UCMap> opTypeMeasurements = new UCMap<>(3); opTypeMeasurements.put(OP_AMP, List.of(MEAS_CQ, MEAS_CYC)); - opTypeMeasurements.put(OP_VISIUM_CONC, List.of(MEAS_CDNA, MEAS_LIBR, MEAS_MIN_SIZE, MEAS_MAX_SIZE, MEAS_PEAK_SIZE)); + opTypeMeasurements.put(OP_VISIUM_CONC, List.of(MEAS_CDNA, MEAS_LIBR, AVERAGE_SIZE, MEAS_PEAK_SIZE)); opTypeMeasurements.put(OP_QPCR, List.of(MEAS_CQ)); this.opTypeMeasurements = Collections.unmodifiableMap(opTypeMeasurements); } @@ -268,7 +268,7 @@ public String sanitiseMeasurementName(OperationType opType, String name) { public String sanitiseMeasurementValue(Collection problems, String name, String value) { return switch (name) { case MEAS_CDNA, MEAS_LIBR -> concentrationSanitiser.sanitise(problems, value); - case MEAS_MIN_SIZE, MEAS_MAX_SIZE, MEAS_PEAK_SIZE -> sizeSanitiser.sanitise(problems, value); + case AVERAGE_SIZE, MEAS_PEAK_SIZE -> sizeSanitiser.sanitise(problems, value); case MEAS_CQ -> cqSanitiser.sanitise(problems, value); case MEAS_CYC -> cycleSanitiser.sanitise(problems, value); default -> null; diff --git a/src/main/java/uk/ac/sanger/sccp/stan/service/history/HistoryServiceImp.java b/src/main/java/uk/ac/sanger/sccp/stan/service/history/HistoryServiceImp.java index 6898f628..b269d179 100644 --- a/src/main/java/uk/ac/sanger/sccp/stan/service/history/HistoryServiceImp.java +++ b/src/main/java/uk/ac/sanger/sccp/stan/service/history/HistoryServiceImp.java @@ -29,7 +29,7 @@ public class HistoryServiceImp implements HistoryService { static final String RELEASE_EVENT_TYPE = "Release", DESTRUCTION_EVENT_TYPE = "Destruction", SOLUTION_TRANSFER_OP_NAME = "Solution transfer"; - static final Pattern SIZE_BP_PTN = Pattern.compile("^M((in|ax)imum|ain peak) size$", Pattern.CASE_INSENSITIVE); + static final Pattern SIZE_BP_PTN = Pattern.compile("^(Average|Main peak) size$", Pattern.CASE_INSENSITIVE); private final OperationRepo opRepo; private final OperationTypeRepo opTypeRepo; diff --git a/src/test/java/uk/ac/sanger/sccp/stan/service/TestOpWithSlotMeasurementsService.java b/src/test/java/uk/ac/sanger/sccp/stan/service/TestOpWithSlotMeasurementsService.java index 735ffe60..e3303cc2 100644 --- a/src/test/java/uk/ac/sanger/sccp/stan/service/TestOpWithSlotMeasurementsService.java +++ b/src/test/java/uk/ac/sanger/sccp/stan/service/TestOpWithSlotMeasurementsService.java @@ -441,15 +441,14 @@ public void testValidateComments() { "Sploop,20,,", "Cq value,20,x!,,Bad value", "Cycles,024,24,", - "Minimum size,20,20,", - "Maximum size,40,40,", + "Average size,20,20,", "Main peak size,30,30,", }) public void testSanitiseMeasurementValue(String name, String value, String sanValue, String problem) { List> sans = List.of(mockConcSan, mockCqSan, mockCycSan); Sanitiser san = switch (name) { case "cDNA concentration", "Library concentration" -> mockConcSan; - case "Minimum size", "Maximum size", "Main peak size" -> mockSizeSan; + case "Average size", "Main peak size" -> mockSizeSan; case "Cq value" -> mockCqSan; case "Cycles" -> mockCycSan; default -> null;