当前位置: 首页>>代码示例>>Python>>正文


Python Protocol.mag_collect方法代码示例

本文整理汇总了Python中autoprotocol.protocol.Protocol.mag_collect方法的典型用法代码示例。如果您正苦于以下问题:Python Protocol.mag_collect方法的具体用法?Python Protocol.mag_collect怎么用?Python Protocol.mag_collect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在autoprotocol.protocol.Protocol的用法示例。


在下文中一共展示了Protocol.mag_collect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_mag_collect

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import mag_collect [as 别名]
    def test_mag_collect(self):
        """
        Desired Output:
        1. Magnetically release pcr_0 beads for 30.0 seconds at an amplitude of 0
        2. Distribute from test/1 into wells test/7, test/8, test/9
        3. Distribute from test/2 into wells test/10
        4. Distribute from test/0 into wells test/1
        5. Magnetically collect pcr_0 beads for 5 cycles with a pause duration of 30.0 seconds
        """

        p = Protocol()
        pcrs = [p.ref("pcr_%s" % i, None, "96-pcr", storage="cold_20")
                for i in range(7)]
        pcr = pcrs[0]

        p.mag_release("96-pcr", pcr, "30:second", "1:hertz",
                      center=float(5) / 100, amplitude=0)

        c = p.ref("test", None, "96-flat", discard=True)
        srcs = c.wells_from(1, 2).set_volume("100:microliter")
        dests = c.wells_from(7, 4)
        p.distribute(srcs, dests, "30:microliter", allow_carryover=True)
        p.distribute(c.well("A1").set_volume(
            "20:microliter"), c.well("A2"), "5:microliter")

        p.mag_collect("96-pcr", pcr, 5, "30:second",
                      bottom_position=float(5) / 100)

        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, ["Magnetically release pcr_0 beads for 30.0 seconds at an amplitude of 0",
                            "Distribute from test/1 into wells test/7, test/8, test/9",
                            "Distribute from test/2 into wells test/10",
                            "Distribute from test/0 into wells test/1",
                            "Magnetically collect pcr_0 beads for 5 cycles with a pause duration of 30.0 seconds"])
        self.assertEqual(forest, [[1, [5]], [2, [4]], [3]])
开发者ID:transcriptic,项目名称:transcriptic,代码行数:46,代码来源:AP2En_test.py


注:本文中的autoprotocol.protocol.Protocol.mag_collect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。