本文整理汇总了Python中autoprotocol.protocol.Protocol.incubate方法的典型用法代码示例。如果您正苦于以下问题:Python Protocol.incubate方法的具体用法?Python Protocol.incubate怎么用?Python Protocol.incubate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类autoprotocol.protocol.Protocol
的用法示例。
在下文中一共展示了Protocol.incubate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runTest
# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import incubate [as 别名]
def runTest(self):
protocol = Protocol()
resource = protocol.ref("resource", None, "96-flat", discard=True)
pcr = protocol.ref("pcr", None, "96-flat", discard=True)
bacteria = protocol.ref("bacteria", None, "96-flat", discard=True)
self.assertEqual(len(protocol.as_dict()['refs']), 3, 'incorrect number of refs')
self.assertEqual(protocol.as_dict()['refs']['resource'], {"new": "96-flat",
"discard": True})
bacteria_wells = WellGroup([bacteria.well("B1"), bacteria.well("C5"),
bacteria.well("A5"), bacteria.well("A1")])
protocol.distribute(resource.well("A1").set_volume("40:microliter"),
pcr.wells_from('A1',5), "5:microliter")
protocol.distribute(resource.well("A1").set_volume("40:microliter"),
bacteria_wells, "5:microliter")
self.assertEqual(len(protocol.instructions), 1)
self.assertEqual(protocol.instructions[0].op, "pipette")
self.assertEqual(len(protocol.instructions[0].groups), 2)
protocol.incubate(bacteria, "warm_37", "30:minute")
self.assertEqual(len(protocol.instructions), 2)
self.assertEqual(protocol.instructions[1].op, "incubate")
self.assertEqual(protocol.instructions[1].duration, "30:minute")
示例2: test_sequence_cover_instructions
# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import incubate [as 别名]
def test_sequence_cover_instructions(self):
p = Protocol()
cont1 = p.ref("c1", None, "384-pcr", storage="cold_4")
cont2 = p.ref("c2", None, "384-pcr", storage="cold_4")
cont3 = p.ref("c3", None, "96-deep", storage="cold_4")
cont4 = p.ref("c4", None, "micro-1.5", storage="cold_4")
cont5 = p.ref("c5", None, "384-echo", discard=True)
therm_groups = [
{
"cycles": 1,
"steps": [
{
"temperature": "37:celsius",
"duration": "60:minute"
},
]
}
]
p.incubate(cont1, "ambient", duration="1:minute")
self.assertEqual(p.instructions[0].op, "seal")
self.assertEqual(p.instructions[1].op, "incubate")
self.assertEqual(cont1.cover, 'ultra-clear')
p.spin(cont1, acceleration="1000:g", duration="2:minute")
self.assertEqual(cont1.cover, "ultra-clear")
self.assertEqual(cont2.cover, None)
p.thermocycle(cont2, groups=therm_groups)
self.assertEqual(cont2.cover, "ultra-clear")
p.transfer(cont2.well(0), cont1.well(1), volume="1:microliter")
self.assertEqual(cont1.cover, None)
self.assertEqual(cont2.cover, None)
with self.assertRaises(RuntimeError):
p.cover(cont2)
p.seal(cont2)
p.thermocycle(cont1, groups=therm_groups)
self.assertEqual(cont1.cover, "ultra-clear")
p.spin(cont1, acceleration="1000:g", duration="2:minute")
p.spin(cont2, acceleration="1000:g", duration="2:minute")
p.spin(cont5, acceleration="1000:g", duration="2:minute")
self.assertEqual(cont1.cover, "ultra-clear")
self.assertEqual(cont2.cover, "ultra-clear")
self.assertEqual(cont5.cover, "universal")
p.uncover(cont5)
p.unseal(cont1)
p.transfer(cont4.well(0), cont3.well(0), "1:microliter")
p.spin(cont4, acceleration="1000:g", duration="2:minute")
self.assertEqual(cont4.cover, None)
with self.assertRaises(RuntimeError):
p.thermocycle(cont4, groups=therm_groups)
seal_on_store(p)
self.assertEqual(cont1.cover, "ultra-clear")
self.assertEqual(cont2.cover, "ultra-clear")
self.assertEqual(cont3.cover, "standard")
self.assertEqual(cont4.cover, None)
self.assertEqual(cont5.cover, None)
示例3: test_sequence_cover_instructions2
# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import incubate [as 别名]
def test_sequence_cover_instructions2(self):
p = Protocol()
cont1 = p.ref("c1", None, "96-pcr", storage="cold_4")
p.incubate(cont1, "ambient", duration="1:minute")
assert (p.instructions[0].op == "seal")
cont2 = p.ref("c2", None, "96-pcr", storage="cold_4")
p.incubate(cont2, "ambient", duration="1:minute", uncovered=True)
assert (p.instructions[-2].op == "incubate")
with pytest.raises(RuntimeError):
p.incubate(cont1, "cold_4", duration="1:minute", uncovered=True)