本文整理汇总了Python中autoprotocol.protocol.Protocol.measure_volume方法的典型用法代码示例。如果您正苦于以下问题:Python Protocol.measure_volume方法的具体用法?Python Protocol.measure_volume怎么用?Python Protocol.measure_volume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类autoprotocol.protocol.Protocol
的用法示例。
在下文中一共展示了Protocol.measure_volume方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_measure_suite
# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import measure_volume [as 别名]
def test_measure_suite(self):
"""
Desired Output:
1. Measure concentration of 2.0 microliters DNA source aliquots
2. Measure mass of test_plate2
3. Measure volume of 12 wells from test_plate
4. Measure volume of 8 wells from test_plate2
"""
p = Protocol()
test_plate = p.ref("test_plate", None, "96-flat", storage="cold_4")
test_plate2 = p.ref("test_plate2", id=None,
cont_type="96-flat", storage=None, discard=True)
for well in test_plate2.all_wells():
well.set_volume("150:microliter")
p.measure_concentration(wells=test_plate2.wells_from(
0, 96), dataref="mc_test", measurement="DNA", volume=Unit(2, "microliter"))
p.measure_mass(test_plate2, "test_ref")
p.measure_volume(test_plate.wells_from(0, 12), "test_ref")
p.measure_volume(test_plate2.wells_from(1, 8), "test_ref2")
pjsonString = json.dumps(p.as_dict(), indent=2)
pjson = json.loads(pjsonString)
parser_instance = english.AutoprotocolParser(pjson)
parser_instance.job_tree()
parsed_output = parser_instance.parsed_output
steps = parser_instance.object_list
forest = parser_instance.forest_list
self.assertEqual(
parsed_output, ["Measure concentration of 2.0 microliters DNA source aliquots of test_plate2",
"Measure mass of test_plate2",
"Measure volume of 12 wells from test_plate",
"Measure volume of 8 wells from test_plate2"])
self.assertEqual(forest, [[1, [2, [4]]], [3]])