feat(protocol-designer, step-generation): add logic to getTransferPlanAndReferenceVolumes #18666
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Updates
step-generation
utilgetTransferPlanAndReferenceVolumes
to return most accurate reference volumes for aspirate and dispense properties.Context
The util
getTransferPlanAndReferenceVolumes
instep-generation
takes various parameters of a PD transfer, including number of sources/destinations, path, volume, pipette, tiprack, and liquid class, and returns a calculated transfer plan for the parameters, as well the reference volumes on which to interpolate various by-volume properties for the liquid class— in other words, the x-values to lookup on the liquid class definition's by-volume curves.Some of these volumes are straightforward. For example, in a transfer with a single path (n wells-to-n wells), we interpolate all by-volume properties (post-aspirate air gap, flow rate, correction volumes) based on the transfer volume, or split transfer volume if the full volume cannot be accommodated in the tip.
However, the volume on which to interpolate is not as straightforward to represent as a constant number in other scenarios. For example, post-dispense air gap should be interpolated based on the volume of liquid in the tip at the time of the air gap. If we specify a multi-dispense path, it becomes apparent that the volume on which to interpolate varies from well to well— that is, the volume in the tip after the first dispense is higher than that after the second dispense, and so on.
In order to respect the constant air gap value entered by the user in the PD step form for post-dispense air gap in this case, we cannot find the correct interpolated post-dispense air gap value after each dispense "behind the scenes." To provide an accurate option for the user to start with, we have settled as a team on presenting the interpolated by-volume post-dispense air gap for multi-dispense transfers interpolated on the volume remaining in the tip after the first dispense. Similarly, for post-aspirate air gap in multi-aspirate transfers, we will present the value interpolated on the planned maximum total aspiration volume for the largest "chunk" of aspirations.
As part of this update, I break some of the reference volume keys into objects with
aspirate
anddispense
property reference volumes for clarity, and wire them up appropriately in ourhandleFormChange
utils.Changelog
getTransferPlanAndReferenceVolumes
according to description aboveFlowRateField
and PDhandleFormChange
utilsReview requests
Please read through the description and check out the refactored
getTransferPlanAndReferenceVolumes
util to make sure it makes sense.Risk assessment
low-medium. These changes should only serve to make our presented by-volume interpolated constant values more accurate in PD step forms