mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-18 05:21:19 +00:00
new actions
This commit is contained in:
@@ -46,7 +46,7 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
|||||||
'LocalPattern': True,
|
'LocalPattern': True,
|
||||||
'Operation': 'Aspirate',
|
'Operation': 'Aspirate',
|
||||||
'OverrideHeight': False,
|
'OverrideHeight': False,
|
||||||
'Pattern': (True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True),
|
'Pattern': (True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True),
|
||||||
'Prototype': 'MC P300 High',
|
'Prototype': 'MC P300 High',
|
||||||
'ReferencedPattern': '',
|
'ReferencedPattern': '',
|
||||||
'RowsFirst': False,
|
'RowsFirst': False,
|
||||||
@@ -364,6 +364,61 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def move_biomek(
|
||||||
|
self,
|
||||||
|
source: str,
|
||||||
|
target: str,
|
||||||
|
):
|
||||||
|
"""
|
||||||
|
处理Biomek移动板子的操作。
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
move_params = {
|
||||||
|
"Pod": "Pod1",
|
||||||
|
"GripSide": "A1 near",
|
||||||
|
"Source": source,
|
||||||
|
"Target": target,
|
||||||
|
"LeaveBottomLabware": False,
|
||||||
|
}
|
||||||
|
self.temp_protocol["steps"].append(move_params)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def incubation_biomek(
|
||||||
|
self,
|
||||||
|
time: int,
|
||||||
|
):
|
||||||
|
"""
|
||||||
|
处理Biomek的孵育操作。
|
||||||
|
"""
|
||||||
|
incubation_params = {
|
||||||
|
"Message": "Paused",
|
||||||
|
"Location": "the whole system",
|
||||||
|
"Time": time,
|
||||||
|
"Mode": "TimedResource"
|
||||||
|
}
|
||||||
|
self.temp_protocol["steps"].append(incubation_params)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def oscillation_biomek(
|
||||||
|
self,
|
||||||
|
rpm: int,
|
||||||
|
time: int,
|
||||||
|
):
|
||||||
|
"""
|
||||||
|
处理Biomek的振荡操作。
|
||||||
|
"""
|
||||||
|
oscillation_params = {
|
||||||
|
'Device': 'OrbitalShaker0',
|
||||||
|
'Parameters': (str(rpm), '2', str(time), 'CounterClockwise'),
|
||||||
|
'Command': 'Timed Shake'
|
||||||
|
}
|
||||||
|
self.temp_protocol["steps"].append(oscillation_params)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
@@ -857,16 +912,25 @@ input_steps = json.loads(steps_info)
|
|||||||
labwares = json.loads(labware_with_liquid)
|
labwares = json.loads(labware_with_liquid)
|
||||||
|
|
||||||
for step in input_steps['steps']:
|
for step in input_steps['steps']:
|
||||||
if step['operation'] != 'transfer':
|
operation = step['operation']
|
||||||
continue
|
|
||||||
parameters = step['parameters']
|
parameters = step['parameters']
|
||||||
|
|
||||||
handler.transfer_biomek(source=parameters['source'],
|
if operation == 'transfer':
|
||||||
target=parameters['target'],
|
handler.transfer_biomek(source=parameters['source'],
|
||||||
volume=parameters['volume'],
|
target=parameters['target'],
|
||||||
tip_rack=parameters['tip_rack'],
|
volume=parameters['volume'],
|
||||||
aspirate_techniques='MC P300 high',
|
tip_rack=parameters['tip_rack'],
|
||||||
dispense_techniques='MC P300 high'
|
aspirate_techniques='MC P300 high',
|
||||||
)
|
dispense_techniques='MC P300 high')
|
||||||
|
elif operation == 'move_labware':
|
||||||
|
handler.move_biomek(source=parameters['source'],
|
||||||
|
target=parameters['target'])
|
||||||
|
elif operation == 'oscillation':
|
||||||
|
handler.oscillation_biomek(rpm=parameters['rpm'],
|
||||||
|
time=parameters['time'])
|
||||||
|
elif operation == 'incubation':
|
||||||
|
handler.incubation_biomek(time=parameters['time'])
|
||||||
|
|
||||||
|
print(json.dumps(handler.temp_protocol, indent=4))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import requests
|
# import requests
|
||||||
from typing import List, Sequence, Optional, Union, Literal
|
from typing import List, Sequence, Optional, Union, Literal
|
||||||
# from geometry_msgs.msg import Point
|
# from geometry_msgs.msg import Point
|
||||||
# from unilabos_msgs.msg import Resource
|
# from unilabos_msgs.msg import Resource
|
||||||
from pylabrobot.resources import (
|
# from pylabrobot.resources import (
|
||||||
Resource,
|
# Resource,
|
||||||
TipRack,
|
# TipRack,
|
||||||
Container,
|
# Container,
|
||||||
Coordinate,
|
# Coordinate,
|
||||||
Well
|
# Well
|
||||||
)
|
# )
|
||||||
# from unilabos.ros.nodes.resource_tracker import DeviceNodeResourceTracker # type: ignore
|
# from unilabos.ros.nodes.resource_tracker import DeviceNodeResourceTracker # type: ignore
|
||||||
# from .liquid_handler_abstract import LiquidHandlerAbstract
|
# from .liquid_handler_abstract import LiquidHandlerAbstract
|
||||||
|
|
||||||
@@ -299,13 +299,10 @@ class LiquidHandlerBiomek:
|
|||||||
处理Biomek的孵育操作。
|
处理Biomek的孵育操作。
|
||||||
"""
|
"""
|
||||||
incubation_params = {
|
incubation_params = {
|
||||||
"BarcodeInput?": False,
|
"Message": "Paused",
|
||||||
"DeckItems": {},
|
"Location": "the whole system",
|
||||||
"Layout": "Multichannel",
|
"Time": time,
|
||||||
"Pause?": True,
|
"Mode": "TimedResource"
|
||||||
"PodSetup": {},
|
|
||||||
"SplitterPosition": 206,
|
|
||||||
"VerifyPodSetup?": True
|
|
||||||
}
|
}
|
||||||
self.temp_protocol["steps"].append(incubation_params)
|
self.temp_protocol["steps"].append(incubation_params)
|
||||||
|
|
||||||
@@ -822,16 +819,23 @@ input_steps = json.loads(steps_info)
|
|||||||
labwares = json.loads(labware_with_liquid)
|
labwares = json.loads(labware_with_liquid)
|
||||||
|
|
||||||
for step in input_steps['steps']:
|
for step in input_steps['steps']:
|
||||||
if step['operation'] != 'transfer':
|
operation = step['operation']
|
||||||
continue
|
|
||||||
parameters = step['parameters']
|
parameters = step['parameters']
|
||||||
|
|
||||||
handler.transfer_biomek(source=parameters['source'],
|
if operation == 'transfer':
|
||||||
target=parameters['target'],
|
handler.transfer_biomek(source=parameters['source'],
|
||||||
volume=parameters['volume'],
|
target=parameters['target'],
|
||||||
tip_rack=parameters['tip_rack'],
|
volume=parameters['volume'],
|
||||||
aspirate_techniques='MC P300 high',
|
tip_rack=parameters['tip_rack'],
|
||||||
dispense_techniques='MC P300 high'
|
aspirate_techniques='MC P300 high',
|
||||||
)
|
dispense_techniques='MC P300 high')
|
||||||
|
elif operation == 'move_labware':
|
||||||
|
handler.move_biomek(source=parameters['source'],
|
||||||
|
target=parameters['target'])
|
||||||
|
elif operation == 'oscillation':
|
||||||
|
handler.oscillation_biomek(rpm=parameters['rpm'],
|
||||||
|
time=parameters['time'])
|
||||||
|
elif operation == 'incubation':
|
||||||
|
handler.incubation_biomek(time=parameters['time'])
|
||||||
|
|
||||||
print(json.dumps(handler.temp_protocol, indent=4))
|
print(json.dumps(handler.temp_protocol, indent=4))
|
||||||
|
|||||||
Reference in New Issue
Block a user