Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(hardware-testing): Adds protocols for testing inner-well geometry meniscus positions w/ Ethanol #17073

Merged
merged 76 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
304f67a
protocol for measuring liquid height in PCR plate
andySigler Aug 28, 2024
f1f55b3
configure for test setup
andySigler Aug 29, 2024
2fc81fd
runs on robot
andySigler Aug 29, 2024
e51e8c6
use 1000ul tips; add starting-tip
andySigler Sep 12, 2024
1f52b09
wip
andySigler Sep 12, 2024
ae56690
google sheet for lhd
rclarke0 Oct 3, 2024
d646d10
added parameter for labware type
rclarke0 Oct 4, 2024
5d283d8
new volumes for NEST deep well
rclarke0 Oct 7, 2024
d1dd314
add support for tube rack testing
rclarke0 Oct 8, 2024
c0e4c3a
12 well reservoir
rclarke0 Oct 9, 2024
5023dd0
reservoir
rclarke0 Oct 10, 2024
5ae6c71
remove parameters
rclarke0 Oct 11, 2024
782e4e7
adds the 3mm protocol
andySigler Oct 17, 2024
b6d0941
lld-height-3mm-changes and parameter functions
rclarke0 Oct 22, 2024
e719396
fixed tube_volume reference
rclarke0 Oct 22, 2024
6058bcb
fix on tube volumes
rclarke0 Oct 22, 2024
0806440
added trials as parameter
rclarke0 Oct 23, 2024
9e155a8
adding middle volumes and adjusting _get_test_volumes
rclarke0 Oct 24, 2024
7c643aa
low vol tests
rclarke0 Oct 24, 2024
d84c950
adjusted script to allow for self filling of plates
rclarke0 Oct 29, 2024
a7f782e
change default dispense behavior
rclarke0 Oct 29, 2024
9ebb875
adding axygen_1_reservoir_90ml volumes
rclarke0 Oct 30, 2024
c928b27
added axygen volumes pause to empty labware
rclarke0 Oct 31, 2024
544a191
new volumes
rclarke0 Nov 12, 2024
bd73239
adding more labware
rclarke0 Nov 13, 2024
af6ceb2
change 50ul tuberack volumes, add eppendorf 2 ml tubes
rclarke0 Nov 19, 2024
06d93bb
volume changes for usascientific96well and axygen 90ml
rclarke0 Dec 6, 2024
38f3617
usascientific 96well 2.4ml
rclarke0 Dec 6, 2024
fe7085c
Merge branch 'edge' into hardware-testing-lld-get-liquid-height
andySigler Dec 10, 2024
ddce8fa
linting :)
andySigler Dec 10, 2024
0995b82
bring back import error
andySigler Dec 10, 2024
8d28af2
corrected volumes to match google sheet
rclarke0 Dec 10, 2024
5179af7
readd getalllabwaredefinitions
caila-marashaj Dec 10, 2024
a7e4d87
add schema version to check for subdirs
caila-marashaj Dec 10, 2024
2a80b0d
make 2 a string
caila-marashaj Dec 10, 2024
b7f649e
Merge branch 'edge' into hardware-testing-lld-get-liquid-height
rclarke0 Dec 10, 2024
193be62
merging labware changes
rclarke0 Dec 11, 2024
0ce2716
format fixes in labware
rclarke0 Dec 11, 2024
f5aab7a
Merge branch 'edge' into hardware-testing-lld-get-liquid-height
rclarke0 Dec 11, 2024
4efc18b
protocol for measuring liquid height in PCR plate
andySigler Aug 28, 2024
2b793b8
configure for test setup
andySigler Aug 29, 2024
2a71af6
runs on robot
andySigler Aug 29, 2024
6f5ed86
use 1000ul tips; add starting-tip
andySigler Sep 12, 2024
89454f6
wip
andySigler Sep 12, 2024
e1ab10f
google sheet for lhd
rclarke0 Oct 3, 2024
af9adb0
added parameter for labware type
rclarke0 Oct 4, 2024
e001151
new volumes for NEST deep well
rclarke0 Oct 7, 2024
7aa0805
add support for tube rack testing
rclarke0 Oct 8, 2024
66f933e
12 well reservoir
rclarke0 Oct 9, 2024
28131d6
reservoir
rclarke0 Oct 10, 2024
70eadb7
remove parameters
rclarke0 Oct 11, 2024
4fe8df7
adds the 3mm protocol
andySigler Oct 17, 2024
0dca529
lld-height-3mm-changes and parameter functions
rclarke0 Oct 22, 2024
1bd6188
fixed tube_volume reference
rclarke0 Oct 22, 2024
fdcc2ba
fix on tube volumes
rclarke0 Oct 22, 2024
cead7b3
added trials as parameter
rclarke0 Oct 23, 2024
69f7ff6
adding middle volumes and adjusting _get_test_volumes
rclarke0 Oct 24, 2024
bab5896
low vol tests
rclarke0 Oct 24, 2024
f2716cb
adjusted script to allow for self filling of plates
rclarke0 Oct 29, 2024
13750ae
change default dispense behavior
rclarke0 Oct 29, 2024
096e558
adding axygen_1_reservoir_90ml volumes
rclarke0 Oct 30, 2024
da54558
added axygen volumes pause to empty labware
rclarke0 Oct 31, 2024
e1db68c
new volumes
rclarke0 Nov 12, 2024
12107a6
adding more labware
rclarke0 Nov 13, 2024
26bda8e
change 50ul tuberack volumes, add eppendorf 2 ml tubes
rclarke0 Nov 19, 2024
83b09df
volume changes for usascientific96well and axygen 90ml
rclarke0 Dec 6, 2024
e5fecee
usascientific 96well 2.4ml
rclarke0 Dec 6, 2024
eec59ee
linting :)
andySigler Dec 10, 2024
558587b
bring back import error
andySigler Dec 10, 2024
e12498d
corrected volumes to match google sheet
rclarke0 Dec 10, 2024
1513332
add schema version to check for subdirs
caila-marashaj Dec 10, 2024
303c8e8
make 2 a string
caila-marashaj Dec 10, 2024
8355d04
format fixes in labware
rclarke0 Dec 11, 2024
063b02a
Merge branch 'hardware-testing-lld-get-liquid-height' of https://gith…
rclarke0 Dec 11, 2024
f636e75
Update labware.py
rclarke0 Dec 11, 2024
ccf12c0
Merge branch 'edge' into hardware-testing-lld-get-liquid-height
rclarke0 Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linting :)
andySigler committed Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ddce8faeed969c23d5f44d8b4f6be96ae76b3328
11 changes: 7 additions & 4 deletions hardware-testing/hardware_testing/protocols/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Protocols."""
from opentrons.protocol_api import ParameterContext
from opentrons.protocols.labware import get_all_labware_definitions

# from opentrons.protocols.labware import get_all_labware_definitions
from typing import List
from opentrons.protocols.parameters.types import ParameterChoice

@@ -59,10 +60,12 @@ def create_labware_parameters(parameters: ParameterContext) -> None:
# NOTE: Place function inside def add_parameters(parameters) in protocol.
# NOTE: Copy ctx.params.labware_type # type: ignore[attr-defined] to get result

labware_list = get_all_labware_definitions()
# labware_list = get_all_labware_definitions()
labware_list = ["this", "that"]
available_labware_choices: List[ParameterChoice] = []
# Filter out labwaer containing the following strings
# TODO: change get_all_labware_definitions function to one that can filter labware by type and not by string
# TODO: change get_all_labware_definitions function to one
# that can filter labware by type and not by string
labware_filter_words = [
"trash",
"adapter",
@@ -87,7 +90,7 @@ def create_labware_parameters(parameters: ParameterContext) -> None:
"value": labware,
}
)

# Create Parameter
parameters.add_str(
variable_name="labware_type",
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Measure Liquid Height."""
from typing import List, Tuple, Optional, Any
from typing import List, Tuple, Optional
from opentrons.protocol_api import (
ProtocolContext,
Labware,
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Measure Liquid Height 3mm."""
import math
from typing import List, Tuple, Optional, Dict
from typing import List, Tuple, Optional
from opentrons.protocol_api import (
ProtocolContext,
Labware,
@@ -9,7 +9,6 @@
ParameterContext,
)
from opentrons.types import Point
from opentrons.protocols.parameters.types import UserFacingTypes


###########################################
@@ -55,7 +54,7 @@
"biorad_384_wellplate_50ul": [28.7, 8.0, 0.0],
"usascientific_12_reservoir_22ml": [63.7, 10947.7, 21111.5],
"usascientific_96_wellplate_2.4ml_deep": [74.7, 1151.9, 2317.8],
"opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap": [63.0, 2237.8, 0.0]
"opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap": [63.0, 2237.8, 0.0],
}

SAME_TIP = True # this is fine when using Ethanol (b/c it evaporates)
@@ -88,6 +87,7 @@


def add_parameters(parameters: ParameterContext) -> None:
"""Add parameters."""
from hardware_testing import protocols

protocols.create_pipette_parameters(parameters)
@@ -166,8 +166,17 @@ def _setup(

if tube_volume == 15:
# Replace volumes with 15 ml volumes
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"] = [17.3,7090.6, 16077.5, 0.0]
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"] = [42.2, 15956.6, 0.0]
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"] = [
17.3,
7090.6,
16077.5,
0.0,
]
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"] = [
42.2,
15956.6,
0.0,
]
volumes = VOLUMES_3MM_TOP_BOTTOM[labware.load_name]
total_volume_to_aspirate = 0.0
for one_vols in volumes:
@@ -224,26 +233,42 @@ def _write_line_to_csv(ctx: ProtocolContext, line: List[str]) -> None:
append_data_to_file(metadata["protocolName"], RUN_ID, FILE_NAME, line_str)


def _get_test_wells(labware: Labware, channels: int, tube_volume: int, total_test_wells: int) -> List[Well]:
def _get_test_wells(
labware: Labware, channels: int, tube_volume: int, total_test_wells: int
) -> List[Well]:
well_names = []
try:
if tube_volume == 15:
print("cHANGING LABWARE WELLS")

TEST_WELLS[channels]["opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"] = ["A1", "B1", "C1", "A2", "B2", "C2"]
TEST_WELLS[channels]["opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"] = ["A1", "B1", "C1", "A2", "B2", "C2"]

TEST_WELLS[channels]["opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"] = [
"A1",
"B1",
"C1",
"A2",
"B2",
"C2",
]
TEST_WELLS[channels][
"opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"
] = ["A1", "B1", "C1", "A2", "B2", "C2"]
well_names = TEST_WELLS[channels][labware.load_name]
print(TEST_WELLS[channels][labware.load_name])
else:
well_names = TEST_WELLS[channels][labware.load_name]
except KeyError:
well_names = [str(well_name).split(" ")[0].replace(" ", "") for well_name in labware.wells()]
well_names = [
str(well_name).split(" ")[0].replace(" ", "")
for well_name in labware.wells()
]
print(len(well_names))
print(well_names)
amount_of_well_names = len(well_names)
if amount_of_well_names < total_test_wells:
wells_needed = total_test_wells - amount_of_well_names
repeat_times = (wells_needed // len(well_names)) + 1 # Calculate how many times to repeat
repeat_times = (
wells_needed // len(well_names)
) + 1 # Calculate how many times to repeat
# Extend well_names by repeating it, then trim any excess elements
well_names.extend(well_names * repeat_times)
diff_after_extension = len(well_names) - total_test_wells
@@ -312,7 +337,7 @@ def _get_tip_z_error(
return z_error * -1.0


def _test_for_finding_liquid_height(
def _test_for_finding_liquid_height( # noqa: C901
ctx: ProtocolContext,
volume: float,
liquid_pipette: InstrumentContext,
@@ -348,7 +373,8 @@ def _test_for_finding_liquid_height(
need_to_transfer_per_ch = volume / liquid_pipette.channels
# set flow-rates
liquid_pipette.flow_rate.aspirate = min(
max(min(liquid_pipette.max_volume, need_to_transfer_per_ch), 10), 200
max(min(liquid_pipette.max_volume, need_to_transfer_per_ch), 10),
200,
)
liquid_pipette.flow_rate.dispense = min(
liquid_pipette.flow_rate.aspirate, 50
@@ -357,7 +383,9 @@ def _test_for_finding_liquid_height(
if _src_meniscus_height is None:
_src_meniscus_height = src_well.depth - 1.0
if src_well.diameter:
src_well_z_ul_per_mm = math.pi * math.pow(src_well.diameter * 0.5, 2)
src_well_z_ul_per_mm = math.pi * math.pow(
src_well.diameter * 0.5, 2
)
elif src_well.width is not None and src_well.length is not None:
src_well_z_ul_per_mm = src_well.width * src_well.length
else:
@@ -473,14 +501,20 @@ def run(ctx: ProtocolContext) -> None:
try:
if tube_volume == 15:
# Replace volumes with 15 ml volumes
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"] = [17.3,7090.6, 16077.5, 0.0]
VOLUMES_3MM_TOP_BOTTOM["opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"] = [42.2, 15956.6, 0.0]
VOLUMES_3MM_TOP_BOTTOM[
"opentrons_10_tuberack_nest_4x50ml_6x15ml_conical"
] = [17.3, 7090.6, 16077.5, 0.0]
VOLUMES_3MM_TOP_BOTTOM[
"opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical"
] = [42.2, 15956.6, 0.0]
volumes = VOLUMES_3MM_TOP_BOTTOM[labware.load_name]
except KeyError:
volumes = [0.0, 0.0, 0.0]
ctx.comment(f"No volumes loaded for labware {labware.load_name}")
total_test_wells = len(volumes) * num_trials
test_wells = _get_test_wells(labware, channels=1, tube_volume=tube_volume, total_test_wells=total_test_wells)
total_test_wells = len(volumes) * num_trials
test_wells = _get_test_wells(
labware, channels=1, tube_volume=tube_volume, total_test_wells=total_test_wells
)
stuff_lengths = len(test_tips_liquid), len(test_tips_probe), len(test_wells)

assert min(stuff_lengths) >= num_trials * len(volumes), f"{stuff_lengths}"