This commit is contained in:
Guangxin Zhang
2025-06-06 11:11:17 +08:00
parent 3c2a4a64ac
commit 106d71e1db

View File

@@ -271,268 +271,270 @@ class LiquidHandlerBiomek:
return return
steps_info = ''' if __name__ == "__main__":
{
"steps": [ steps_info = '''
{ {
"step_number": 1, "steps": [
"operation": "transfer", {
"description": "转移PCR产物或酶促反应液至0.05ml 96孔板中", "step_number": 1,
"parameters": { "operation": "transfer",
"source": "P1", "description": "转移PCR产物或酶促反应液至0.05ml 96孔板中",
"target": "P11", "parameters": {
"tip_rack": "BC230", "source": "P1",
"volume": 50 "target": "P11",
} "tip_rack": "BC230",
}, "volume": 50
{ }
"step_number": 2, },
"operation": "transfer", {
"description": "加入2倍体积Bind Beads BC至产物中", "step_number": 2,
"parameters": { "operation": "transfer",
"source": "P2", "description": "加入2倍体积Bind Beads BC至产物中",
"target": "P11", "parameters": {
"tip_rack": "BC230", "source": "P2",
"volume": 100 "target": "P11",
} "tip_rack": "BC230",
}, "volume": 100
{ }
"step_number": 3, },
"operation": "move_labware", {
"description": "移动P11至Orbital1用于振荡混匀", "step_number": 3,
"parameters": { "operation": "move_labware",
"source": "P11", "description": "移动P11至Orbital1用于振荡混匀",
"target": "Orbital1" "parameters": {
} "source": "P11",
}, "target": "Orbital1"
{ }
"step_number": 4, },
"operation": "oscillation", {
"description": "在Orbital1上振荡混匀Bind Beads BC与PCR产物700-900rpm300秒", "step_number": 4,
"parameters": { "operation": "oscillation",
"rpm": 800, "description": "在Orbital1上振荡混匀Bind Beads BC与PCR产物700-900rpm300秒",
"time": 300 "parameters": {
} "rpm": 800,
}, "time": 300
{ }
"step_number": 5, },
"operation": "move_labware", {
"description": "移动混匀后的板回P11", "step_number": 5,
"parameters": { "operation": "move_labware",
"source": "Orbital1", "description": "移动混匀后的板回P11",
"target": "P11" "parameters": {
} "source": "Orbital1",
}, "target": "P11"
{ }
"step_number": 6, },
"operation": "move_labware", {
"description": "将P11移动到磁力架P12吸附3分钟", "step_number": 6,
"parameters": { "operation": "move_labware",
"source": "P11", "description": "P11移动到磁力架P12吸附3分钟",
"target": "P12" "parameters": {
} "source": "P11",
}, "target": "P12"
{ }
"step_number": 7, },
"operation": "incubation", {
"description": "磁力架上室温静置3分钟完成吸附", "step_number": 7,
"parameters": { "operation": "incubation",
"time": 180 "description": "磁力架上室温静置3分钟完成吸附",
} "parameters": {
}, "time": 180
{ }
"step_number": 8, },
"operation": "transfer", {
"description": "去除上清液至废液槽", "step_number": 8,
"parameters": { "operation": "transfer",
"source": "P12", "description": "去除上清液至废液槽",
"target": "P22", "parameters": {
"tip_rack": "BC230", "source": "P12",
"volume": 150 "target": "P22",
} "tip_rack": "BC230",
}, "volume": 150
{ }
"step_number": 9, },
"operation": "transfer", {
"description": "加入300-500μl 75%乙醇清洗", "step_number": 9,
"parameters": { "operation": "transfer",
"source": "P3", "description": "加入300-500μl 75%乙醇清洗",
"target": "P12", "parameters": {
"tip_rack": "BC230", "source": "P3",
"volume": 400 "target": "P12",
} "tip_rack": "BC230",
}, "volume": 400
{ }
"step_number": 10, },
"operation": "move_labware", {
"description": "移动清洗板到Orbital1进行振荡", "step_number": 10,
"parameters": { "operation": "move_labware",
"source": "P12", "description": "移动清洗板到Orbital1进行振荡",
"target": "Orbital1" "parameters": {
} "source": "P12",
}, "target": "Orbital1"
{ }
"step_number": 11, },
"operation": "oscillation", {
"description": "乙醇清洗液振荡混匀700-900rpm, 45秒", "step_number": 11,
"parameters": { "operation": "oscillation",
"rpm": 800, "description": "乙醇清洗液振荡混匀700-900rpm, 45秒",
"time": 45 "parameters": {
} "rpm": 800,
}, "time": 45
{ }
"step_number": 12, },
"operation": "move_labware", {
"description": "振荡后将板移回磁力架P12吸附", "step_number": 12,
"parameters": { "operation": "move_labware",
"source": "Orbital1", "description": "振荡后将板移回磁力架P12吸附",
"target": "P12" "parameters": {
} "source": "Orbital1",
}, "target": "P12"
{ }
"step_number": 13, },
"operation": "incubation", {
"description": "吸附3分钟", "step_number": 13,
"parameters": { "operation": "incubation",
"time": 180 "description": "吸附3分钟",
} "parameters": {
}, "time": 180
{ }
"step_number": 14, },
"operation": "transfer", {
"description": "去除乙醇上清液至废液槽", "step_number": 14,
"parameters": { "operation": "transfer",
"source": "P12", "description": "去除乙醇上清液至废液槽",
"target": "P22", "parameters": {
"tip_rack": "BC230", "source": "P12",
"volume": 400 "target": "P22",
} "tip_rack": "BC230",
}, "volume": 400
{ }
"step_number": 15, },
"operation": "transfer", {
"description": "第二次加入300-500μl 75%乙醇清洗", "step_number": 15,
"parameters": { "operation": "transfer",
"source": "P3", "description": "第二次加入300-500μl 75%乙醇清洗",
"target": "P12", "parameters": {
"tip_rack": "BC230", "source": "P3",
"volume": 400 "target": "P12",
} "tip_rack": "BC230",
}, "volume": 400
{ }
"step_number": 16, },
"operation": "move_labware", {
"description": "再次移动清洗板到Orbital1振荡", "step_number": 16,
"parameters": { "operation": "move_labware",
"source": "P12", "description": "再次移动清洗板到Orbital1振荡",
"target": "Orbital1" "parameters": {
} "source": "P12",
}, "target": "Orbital1"
{ }
"step_number": 17, },
"operation": "oscillation", {
"description": "再次乙醇清洗液振荡混匀700-900rpm, 45秒", "step_number": 17,
"parameters": { "operation": "oscillation",
"rpm": 800, "description": "再次乙醇清洗液振荡混匀700-900rpm, 45秒",
"time": 45 "parameters": {
} "rpm": 800,
}, "time": 45
{ }
"step_number": 18, },
"operation": "move_labware", {
"description": "振荡后板送回磁力架P12吸附", "step_number": 18,
"parameters": { "operation": "move_labware",
"source": "Orbital1", "description": "振荡后板送回磁力架P12吸附",
"target": "P12" "parameters": {
} "source": "Orbital1",
}, "target": "P12"
{ }
"step_number": 19, },
"operation": "incubation", {
"description": "再次吸附3分钟", "step_number": 19,
"parameters": { "operation": "incubation",
"time": 180 "description": "再次吸附3分钟",
} "parameters": {
}, "time": 180
{ }
"step_number": 20, },
"operation": "transfer", {
"description": "去除乙醇上清液至废液槽", "step_number": 20,
"parameters": { "operation": "transfer",
"source": "P12", "description": "去除乙醇上清液至废液槽",
"target": "P22", "parameters": {
"tip_rack": "BC230", "source": "P12",
"volume": 400 "target": "P22",
} "tip_rack": "BC230",
}, "volume": 400
{ }
"step_number": 21, },
"operation": "incubation", {
"description": "空气干燥15分钟", "step_number": 21,
"parameters": { "operation": "incubation",
"time": 900 "description": "空气干燥15分钟",
} "parameters": {
}, "time": 900
{ }
"step_number": 22, },
"operation": "transfer", {
"description": "加30-50μl Elution Buffer洗脱", "step_number": 22,
"parameters": { "operation": "transfer",
"source": "P4", "description": "加30-50μl Elution Buffer洗脱",
"target": "P12", "parameters": {
"tip_rack": "BC230", "source": "P4",
"volume": 40 "target": "P12",
} "tip_rack": "BC230",
}, "volume": 40
{ }
"step_number": 23, },
"operation": "move_labware", {
"description": "移动到Orbital1振荡混匀60秒", "step_number": 23,
"parameters": { "operation": "move_labware",
"source": "P12", "description": "移动到Orbital1振荡混匀60秒",
"target": "Orbital1" "parameters": {
} "source": "P12",
}, "target": "Orbital1"
{ }
"step_number": 24, },
"operation": "oscillation", {
"description": "Elution Buffer振荡混匀700-900rpm, 60秒", "step_number": 24,
"parameters": { "operation": "oscillation",
"rpm": 800, "description": "Elution Buffer振荡混匀700-900rpm, 60秒",
"time": 60 "parameters": {
} "rpm": 800,
}, "time": 60
{ }
"step_number": 25, },
"operation": "move_labware", {
"description": "振荡后送回磁力架P12", "step_number": 25,
"parameters": { "operation": "move_labware",
"source": "Orbital1", "description": "振荡后送回磁力架P12",
"target": "P12" "parameters": {
} "source": "Orbital1",
}, "target": "P12"
{ }
"step_number": 26, },
"operation": "incubation", {
"description": "室温静置3分钟洗脱反应", "step_number": 26,
"parameters": { "operation": "incubation",
"time": 180 "description": "室温静置3分钟洗脱反应",
} "parameters": {
}, "time": 180
{ }
"step_number": 27, },
"operation": "transfer", {
"description": "将上清液DNA转移到新板P13", "step_number": 27,
"parameters": { "operation": "transfer",
"source": "P12", "description": "将上清液DNA转移到新板P13",
"target": "P13", "parameters": {
"tip_rack": "BC230", "source": "P12",
"volume": 40 "target": "P13",
} "tip_rack": "BC230",
"volume": 40
}
}
]
} }
] '''
}
'''
@@ -561,181 +563,193 @@ labware_with_liquid = '''
] ]
}, },
{ {
"id": "Tip Rack BC230 on TL3", "id": "Tip Rack BC230 TL2",
"parent": "deck", "parent": "deck",
"slot_on_deck": "TL3", "slot_on_deck": "TL2",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{
"id": "Tip Rack BC230 on TL4",
"parent": "deck",
"slot_on_deck": "TL4",
"class_name": "BC230",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "Tip Rack BC230 on TL5",
"parent": "deck",
"slot_on_deck": "TL5",
"class_name": "BC230",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{ {
"id": "Tip Rack BC230 on P5", "id": "Tip Rack BC230 on TL3",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P5", "slot_on_deck": "TL3",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{
"id": "Tip Rack BC230 on TL4",
"parent": "deck",
"slot_on_deck": "TL4",
"class_name": "BC230",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "Tip Rack BC230 on TL5",
"parent": "deck",
"slot_on_deck": "TL5",
"class_name": "BC230",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{ {
"id": "Tip Rack BC230 on P6", "id": "Tip Rack BC230 on P5",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P6", "slot_on_deck": "P5",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{ {
"id": "Tip Rack BC230 on P7", "id": "Tip Rack BC230 on P6",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P7", "slot_on_deck": "P6",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{ {
"id": "Tip Rack BC230 on P8", "id": "Tip Rack BC230 on P7",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P8", "slot_on_deck": "P7",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{ {
"id": "Tip Rack BC230 P16", "id": "Tip Rack BC230 on P8",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P16", "slot_on_deck": "P8",
"class_name": "BC230", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{
"id": "stock plate on 4",
"parent": "deck",
"slot_on_deck": "P2",
"class_name": "nest_12_reservoir_15ml",
"liquid_type": [
"bind beads"
],
"liquid_volume": [10000],
"liquid_input_wells": [
"A1"
]
},
{
"id": "stock plate on P2",
"parent": "deck",
"slot_on_deck": "P2",
"class_name": "nest_12_reservoir_15ml",
"liquid_type": [
"bind beads"
],
"liquid_volume": [10000],
"liquid_input_wells": [
"A1"
]
},
{
"id": "stock plate on P3",
"parent": "deck",
"slot_on_deck": "P3",
"class_name": "nest_12_reservoir_15ml",
"liquid_type": [
"ethyl alcohol"
],
"liquid_volume": [10000],
"liquid_input_wells": [
"A1"
]
},
{
"id": "oscillation",
"parent": "deck",
"slot_on_deck": "Orbital1",
"class_name": "Orbital",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "working plate on P11",
"parent": "deck",
"slot_on_deck": "P11",
"class_name": "NEST 2ml Deep Well Plate",
"liquid_type": [
],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{ {
"id": "magnetics module on P12", "id": "Tip Rack BC230 P16",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P12", "slot_on_deck": "P16",
"class_name": "magnetics module", "class_name": "BC230",
"liquid_type": [], "liquid_type": [],
"liquid_volume": [], "liquid_volume": [],
"liquid_input_wells": [ "liquid_input_wells": [
] ]
}, },
{
"id": "working plate on P13",
"parent": "deck",
"slot_on_deck": "P13",
"class_name": "NEST 2ml Deep Well Plate",
"liquid_type": [
],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{ {
"id": "waste on P22", "id": "stock plate on 4",
"parent": "deck", "parent": "deck",
"slot_on_deck": "P22", "slot_on_deck": "P2",
"class_name": "nest_1_reservoir_195ml", "class_name": "nest_12_reservoir_15ml",
"liquid_type": [ "liquid_type": [
], "bind beads"
"liquid_volume": [], ],
"liquid_input_wells": [ "liquid_volume": [10000],
] "liquid_input_wells": [
} "A1"
] ]
},
{
"id": "stock plate on P2",
"parent": "deck",
"slot_on_deck": "P2",
"class_name": "nest_12_reservoir_15ml",
"liquid_type": [
"bind beads"
],
"liquid_volume": [10000],
"liquid_input_wells": [
"A1"
]
},
{
"id": "stock plate on P3",
"parent": "deck",
"slot_on_deck": "P3",
"class_name": "nest_12_reservoir_15ml",
"liquid_type": [
"ethyl alcohol"
],
"liquid_volume": [10000],
"liquid_input_wells": [
"A1"
]
},
{
"id": "oscillation",
"parent": "deck",
"slot_on_deck": "Orbital1",
"class_name": "Orbital",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "working plate on P11",
"parent": "deck",
"slot_on_deck": "P11",
"class_name": "NEST 2ml Deep Well Plate",
"liquid_type": [
],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "magnetics module on P12",
"parent": "deck",
"slot_on_deck": "P12",
"class_name": "magnetics module",
"liquid_type": [],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "working plate on P13",
"parent": "deck",
"slot_on_deck": "P13",
"class_name": "NEST 2ml Deep Well Plate",
"liquid_type": [
],
"liquid_volume": [],
"liquid_input_wells": [
]
},
{
"id": "waste on P22",
"parent": "deck",
"slot_on_deck": "P22",
"class_name": "nest_1_reservoir_195ml",
"liquid_type": [
],
"liquid_volume": [],
"liquid_input_wells": [
]
}
]
'''
'''
handler = LiquidHandlerBiomek() handler = LiquidHandlerBiomek()
@@ -760,6 +774,5 @@ for step in input_steps['steps']:
aspirate_techniques='MC P300 high', aspirate_techniques='MC P300 high',
dispense_techniques='MC P300 high' dispense_techniques='MC P300 high'
) )
with open('biomek_temporary_protocol.json', 'w') as f:
json.dump(handler.temp_protocol, f, indent=4, ensure_ascii=False)
print(json.dumps(handler.temp_protocol, indent=4))