mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-20 08:35:11 +00:00
Compare commits
3 Commits
e840516ba4
...
b6c9530c61
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6c9530c61 | ||
|
|
8698821c52 | ||
|
|
3f53f88390 |
@@ -93,6 +93,15 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
|||||||
def deserialize(cls, data: dict, allow_marshal: bool = False) -> LiquidHandler:
|
def deserialize(cls, data: dict, allow_marshal: bool = False) -> LiquidHandler:
|
||||||
return LiquidHandler.deserialize(data, allow_marshal)
|
return LiquidHandler.deserialize(data, allow_marshal)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self):
|
||||||
|
"""
|
||||||
|
获取操作是否成功的状态。
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: 如果操作成功,返回True;否则返回False。
|
||||||
|
"""
|
||||||
|
return self._success
|
||||||
|
|
||||||
def create_protocol(
|
def create_protocol(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class LiquidHandlerBiomek:
|
|||||||
"date": protocol_date,
|
"date": protocol_date,
|
||||||
"type": protocol_type,
|
"type": protocol_type,
|
||||||
},
|
},
|
||||||
"labwares": [],
|
"labwares": {}, # 改为字典格式以匹配DeckItems
|
||||||
"steps": [],
|
"steps": [],
|
||||||
}
|
}
|
||||||
return self.temp_protocol
|
return self.temp_protocol
|
||||||
@@ -251,15 +251,16 @@ class LiquidHandlerBiomek:
|
|||||||
liquid_input_wells: list[str],
|
liquid_input_wells: list[str],
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
设置Biomek仪器的参数配置,完全按照Biomek的实际格式
|
设置Biomek仪器的参数配置,按照DeckItems格式
|
||||||
|
|
||||||
根据不同的仪器类型(容器、tip rack等)设置相应的参数结构
|
根据不同的仪器类型(容器、tip rack等)设置相应的参数结构
|
||||||
|
位置作为键,配置列表作为值
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# 判断仪器类型
|
# 判断仪器类型
|
||||||
instrument_type = self._get_instrument_type(class_name)
|
instrument_type = self._get_instrument_type(class_name)
|
||||||
|
|
||||||
config = {} # 初始化为空字典,以便在各种情况下都能返回
|
config = None # 初始化为None
|
||||||
|
|
||||||
if instrument_type == "reservoir":
|
if instrument_type == "reservoir":
|
||||||
# 储液槽类型配置
|
# 储液槽类型配置
|
||||||
@@ -325,17 +326,13 @@ class LiquidHandlerBiomek:
|
|||||||
"DataSets": {"Volume": {}},
|
"DataSets": {"Volume": {}},
|
||||||
"RuntimeDataSets": {"Volume": {}}
|
"RuntimeDataSets": {"Volume": {}}
|
||||||
}
|
}
|
||||||
|
|
||||||
else:
|
|
||||||
# 未知类型或空位置的默认配置
|
|
||||||
config = {}
|
|
||||||
|
|
||||||
# 将配置直接添加到labwares列表中
|
# 按照DeckItems格式存储:位置作为键,配置列表作为值
|
||||||
if config: # 只有非空配置才添加
|
if config is not None:
|
||||||
# 添加Name字段用于标识
|
self.temp_protocol["labwares"][slot_on_deck] = [config]
|
||||||
config["Name"] = id
|
else:
|
||||||
config["Position"] = slot_on_deck
|
# 空位置
|
||||||
self.temp_protocol["labwares"].append(config)
|
self.temp_protocol["labwares"][slot_on_deck] = []
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -1003,7 +1000,7 @@ if __name__ == "__main__":
|
|||||||
script_dir = pathlib.Path(__file__).parent
|
script_dir = pathlib.Path(__file__).parent
|
||||||
|
|
||||||
# 保存完整协议
|
# 保存完整协议
|
||||||
complete_output_path = script_dir / "complete_biomek_protocol.json"
|
complete_output_path = script_dir / "complete_biomek_protocol_0607.json"
|
||||||
with open(complete_output_path, 'w', encoding='utf-8') as f:
|
with open(complete_output_path, 'w', encoding='utf-8') as f:
|
||||||
json.dump(handler.temp_protocol, f, indent=4, ensure_ascii=False)
|
json.dump(handler.temp_protocol, f, indent=4, ensure_ascii=False)
|
||||||
|
|
||||||
|
|||||||
3762
unilabos/devices/liquid_handling/complete_biomek_protocol_0607.json
Normal file
3762
unilabos/devices/liquid_handling/complete_biomek_protocol_0607.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -368,18 +368,91 @@ liquid_handler.biomek:
|
|||||||
result: {}
|
result: {}
|
||||||
handles:
|
handles:
|
||||||
input:
|
input:
|
||||||
- handler_key: liquid-input
|
- handler_key: sources
|
||||||
label: Liquid Input
|
label: sources
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
- handler_key: targets
|
||||||
|
label: targets
|
||||||
|
data_type: resource
|
||||||
|
data_source: executor
|
||||||
|
data_key: liquid
|
||||||
|
- handler_key: tip_rack
|
||||||
|
label: tip_rack
|
||||||
|
data_type: resource
|
||||||
|
data_source: executor
|
||||||
|
data_key: liquid
|
||||||
|
output:
|
||||||
|
- handler_key: sources_out
|
||||||
|
label: sources
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
- handler_key: targets_out
|
||||||
|
label: targets
|
||||||
|
data_type: resource
|
||||||
|
data_source: executor
|
||||||
|
data_key: liquid
|
||||||
|
oscillation_biomek:
|
||||||
|
type: LiquidHandlerOscillateBiomek
|
||||||
|
goal:
|
||||||
|
rpm: rpm
|
||||||
|
time: time
|
||||||
|
feedback: {}
|
||||||
|
result: {}
|
||||||
|
handles:
|
||||||
|
input:
|
||||||
|
- handler_key: plate
|
||||||
|
label: plate
|
||||||
data_type: resource
|
data_type: resource
|
||||||
io_type: target
|
|
||||||
data_source: handle
|
data_source: handle
|
||||||
data_key: liquid
|
data_key: liquid
|
||||||
output:
|
output:
|
||||||
- handler_key: liquid-output
|
- handler_key: plate_out
|
||||||
label: Liquid Output
|
label: plate
|
||||||
data_type: resource
|
data_type: resource
|
||||||
io_type: source
|
data_source: handle
|
||||||
data_source: executor
|
data_key: liquid
|
||||||
|
move_biomek:
|
||||||
|
type: LiquidHandlerMoveBiomek
|
||||||
|
goal:
|
||||||
|
source: resource
|
||||||
|
target: target
|
||||||
|
feedback: {}
|
||||||
|
result:
|
||||||
|
name: name
|
||||||
|
handles:
|
||||||
|
input:
|
||||||
|
- handler_key: sources
|
||||||
|
label: sources
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
output:
|
||||||
|
- handler_key: targets
|
||||||
|
label: targets
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
incubation_biomek:
|
||||||
|
type: LiquidHandlerIncubateBiomek
|
||||||
|
goal:
|
||||||
|
time: time
|
||||||
|
feedback: {}
|
||||||
|
result: {}
|
||||||
|
handles:
|
||||||
|
input:
|
||||||
|
- handler_key: plate
|
||||||
|
label: plate
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
output:
|
||||||
|
- handler_key: plate_out
|
||||||
|
label: plate
|
||||||
|
data_type: resource
|
||||||
|
data_source: handle
|
||||||
data_key: liquid
|
data_key: liquid
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@@ -45,7 +45,11 @@ set(action_files
|
|||||||
"action/LiquidHandlerReturnTips96.action"
|
"action/LiquidHandlerReturnTips96.action"
|
||||||
"action/LiquidHandlerStamp.action"
|
"action/LiquidHandlerStamp.action"
|
||||||
"action/LiquidHandlerTransfer.action"
|
"action/LiquidHandlerTransfer.action"
|
||||||
|
|
||||||
"action/LiquidHandlerTransferBiomek.action"
|
"action/LiquidHandlerTransferBiomek.action"
|
||||||
|
"action/LiquidHandlerIncubateBiomek.action"
|
||||||
|
"action/LiquidHandlerMoveBiomek.action"
|
||||||
|
"action/LiquidHandlerOscillateBiomek.action"
|
||||||
|
|
||||||
"action/LiquidHandlerAdd.action"
|
"action/LiquidHandlerAdd.action"
|
||||||
"action/LiquidHandlerMix.action"
|
"action/LiquidHandlerMix.action"
|
||||||
|
|||||||
Reference in New Issue
Block a user