Skip to content

Commit 6190cf1

Browse files
authored
fix(protocol-designer): populate blowout flow rate, remove disposal volume warning (#19046)
cherry-picked commits accidentally targeted edge in #19044 This PR ensures blowout flow rate is populated for "don't use a liquid class" transfers. It also removes a legacy warning for disposal volume below recommended value (liquid classes specify values below the 5ul minimum frequently). Closes RQA-4425
1 parent 4d8c54b commit 6190cf1

File tree

4 files changed

+8
-120
lines changed

4 files changed

+8
-120
lines changed

protocol-designer/src/steplist/formLevel/handleFormChange/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ const getNoLiquidClassValuesMoveLiquid = (args: {
633633
blowout_flowRate:
634634
matchingTipLiquidSpecs?.defaultBlowOutFlowRate.default ?? null,
635635
...dipsosalFields,
636+
blowout_flowRate:
637+
matchingTipLiquidSpecs?.defaultBlowOutFlowRate.default ?? null,
636638
}
637639
return {
638640
...(liquidHandlingAction === 'all' || liquidHandlingAction === 'aspirate'
@@ -735,6 +737,11 @@ const getNoLiquidClassValuesMoveLiquid = (args: {
735737
'dispense',
736738
dispenseMaxUiFlowRate
737739
)
740+
741+
const blowoutFlowRateFields = {
742+
blowout_flowRate: dispense.retract.blowout.params?.flowRate ?? null,
743+
}
744+
738745
const pushOutVolume =
739746
linearInterpolate(
740747
volume,
@@ -783,6 +790,7 @@ const getNoLiquidClassValuesMoveLiquid = (args: {
783790
...dispenseFlowRateFields,
784791
...dispenseOffsetFields,
785792
...dispensePositionReferenceFields,
793+
...blowoutFlowRateFields,
786794
dispense_mmFromBottom: DEFAULT_MM_OFFSET_FROM_BOTTOM,
787795
dispense_submerge_mmFromBottom: SAFE_MOVE_TO_WELL_OFFSET_FROM_TOP_MM,
788796
dispense_submerge_position_reference: POSITION_REFERENCE_TOP,

protocol-designer/src/steplist/formLevel/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ import {
8484
composeWarnings,
8585
incompatibleLiquidClass,
8686
maxDispenseWellVolume,
87-
minDisposalVolume,
8887
mixTipPositionInTube,
8988
tipPositionInTube,
9089
} from './warnings'
@@ -245,7 +244,6 @@ const stepFormHelperMap: {
245244
getWarnings: composeWarnings(
246245
belowPipetteMinimumVolume,
247246
maxDispenseWellVolume,
248-
minDisposalVolume,
249247
tipPositionInTube,
250248
incompatibleLiquidClass
251249
),

protocol-designer/src/steplist/formLevel/test/warnings.test.ts

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
belowPipetteMinimumVolume,
1111
incompatibleLiquidClass,
1212
maxDispenseWellVolume,
13-
minDisposalVolume,
1413
mixTipPositionInTube,
1514
tipPositionInTube,
1615
} from '../warnings'
@@ -68,90 +67,6 @@ describe('Below pipette minimum volume', () => {
6867
)
6968
})
7069
})
71-
describe('Below min disposal volume', () => {
72-
let fieldsWithPipette: {
73-
pipette: { spec: { liquids: { default: { minVolume: number } } } }
74-
disposalVolume_checkbox: boolean
75-
disposalVolume_volume: number
76-
path: string
77-
}
78-
beforeEach(() => {
79-
fieldsWithPipette = {
80-
pipette: {
81-
spec: {
82-
liquids: {
83-
default: {
84-
minVolume: 100,
85-
},
86-
},
87-
},
88-
},
89-
disposalVolume_checkbox: true,
90-
disposalVolume_volume: 100,
91-
path: 'multiDispense',
92-
}
93-
})
94-
it('should NOT return a warning when there is no pipette', () => {
95-
const fields = {
96-
...fieldsWithPipette,
97-
pipette: undefined,
98-
} as any
99-
expect(minDisposalVolume(fields)).toBe(null)
100-
})
101-
it('should NOT return a warning when there is no pipette spec', () => {
102-
const fields = {
103-
...fieldsWithPipette,
104-
pipette: { spec: undefined },
105-
} as any
106-
expect(minDisposalVolume(fields)).toBe(null)
107-
})
108-
it('should NOT return a warning when the path is NOT multi dispense', () => {
109-
const fields = {
110-
...fieldsWithPipette,
111-
path: 'another_path',
112-
} as any
113-
expect(minDisposalVolume(fields)).toBe(null)
114-
})
115-
it('should NOT return a warning when the volume is equal to the min pipette volume', () => {
116-
const fields = {
117-
...fieldsWithPipette,
118-
disposalVolume_volume: 100,
119-
} as any
120-
expect(minDisposalVolume(fields)).toBe(null)
121-
})
122-
it('should NOT return a warning when the volume is greater than the min pipette volume', () => {
123-
const fields = {
124-
...fieldsWithPipette,
125-
disposalVolume_volume: 100,
126-
} as any
127-
expect(minDisposalVolume(fields)).toBe(null)
128-
})
129-
130-
it('should return a warning when the volume is less than the min pipette volume', () => {
131-
const fields = {
132-
...fieldsWithPipette,
133-
disposalVolume_volume: 99,
134-
}
135-
// @ts-expect-error(sa, 2021-6-15): minDisposalVolume might return null, need to null check before property access
136-
expect(minDisposalVolume(fields).type).toBe('BELOW_MIN_DISPOSAL_VOLUME')
137-
})
138-
it('should return a warning when the path is multi dispense and the checkbox is unchecked', () => {
139-
const fields = {
140-
...fieldsWithPipette,
141-
disposalVolume_checkbox: false,
142-
}
143-
// @ts-expect-error(sa, 2021-6-15): minDisposalVolume might return null, need to null check before property access
144-
expect(minDisposalVolume(fields).type).toBe('BELOW_MIN_DISPOSAL_VOLUME')
145-
})
146-
it('should return a warning when the path is multi dispense and there is no disposal volume', () => {
147-
const fields = {
148-
...fieldsWithPipette,
149-
disposalVolume_volume: undefined,
150-
}
151-
// @ts-expect-error(sa, 2021-6-15): minDisposalVolume might return null, need to null check before property access
152-
expect(minDisposalVolume(fields).type).toBe('BELOW_MIN_DISPOSAL_VOLUME')
153-
})
154-
})
15570
describe('Max dispense well volume', () => {
15671
let fieldsWithDispenseLabware: any
15772
beforeEach(() => {

protocol-designer/src/steplist/formLevel/warnings.tsx

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import type { FormError } from './errors'
2121
********************/
2222

2323
export type FormWarningType =
24-
| 'BELOW_MIN_DISPOSAL_VOLUME'
2524
| 'BELOW_PIPETTE_MINIMUM_VOLUME'
2625
| 'INCOMPATIBLE_ALL_PIPETTE'
2726
| 'INCOMPATIBLE_PIPETTE_PATH'
@@ -52,15 +51,6 @@ const overMaxWellVolumeWarning = (): FormWarning => ({
5251
location: 'form',
5352
})
5453

55-
const belowMinDisposalVolumeWarning = (min: number): FormWarning => ({
56-
type: 'BELOW_MIN_DISPOSAL_VOLUME',
57-
title: `Disposal volume is below recommended minimum (${min} uL)`,
58-
body:
59-
'For accuracy in multi-dispense Transfers we recommend you use a disposal volume of at least the pipette`s minimum.',
60-
dependentFields: ['disposalVolume_volume', 'pipette'],
61-
location: 'form',
62-
})
63-
6454
const tipPositionedLowInTube = (): FormWarning => ({
6555
type: 'TIP_POSITIONED_LOW_IN_TUBE',
6656
title:
@@ -161,29 +151,6 @@ export const maxDispenseWellVolume = (
161151
return hasExceeded ? overMaxWellVolumeWarning() : null
162152
}
163153

164-
export const minDisposalVolume = (
165-
fields: HydratedMoveLiquidFormData
166-
): FormWarning | null => {
167-
const {
168-
disposalVolume_checkbox,
169-
disposalVolume_volume,
170-
pipette,
171-
path,
172-
} = fields
173-
if (!(pipette && pipette.spec) || path !== 'multiDispense') return null
174-
const isUnselected = !disposalVolume_checkbox || !disposalVolume_volume
175-
const liquidSpecs = pipette.spec.liquids
176-
const minVolume =
177-
'lowVolumeDefault' in liquidSpecs
178-
? liquidSpecs.lowVolumeDefault.minVolume
179-
: liquidSpecs.default.minVolume
180-
if (isUnselected) {
181-
return belowMinDisposalVolumeWarning(minVolume as number)
182-
}
183-
const isBelowMin = disposalVolume_volume < minVolume
184-
return isBelowMin ? belowMinDisposalVolumeWarning(minVolume as number) : null
185-
}
186-
187154
export const _lowVolumeTransferWarning = (): FormWarning => ({
188155
type: 'LOW_VOLUME_TRANSFER',
189156
title: `Transfer volumes of ${MINIMUM_LIQUID_CLASS_VOLUME} µL or less are incompatible with liquid classes.`,

0 commit comments

Comments
 (0)