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


Python Protocol.stamp方法代码示例

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


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

示例1: test_volume_tracking

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
 def test_volume_tracking(self):
     p = Protocol()
     plate_96 = p.ref("plate_96", None, "96-pcr", discard=True)
     plate_96_2 = p.ref("plate_96_2", None, "96-pcr", discard=True)
     plate_384 = p.ref("plate_384", None, "384-pcr", discard=True)
     plate_384_2 = p.ref("plate_384_2", None, "384-pcr", discard=True)
     p.stamp(plate_96.well(0), plate_384.well(0), "5:microliter",
             {"columns": 12, "rows": 1})
     self.assertEqual(plate_384.well(0).volume.value, 5)
     self.assertTrue(plate_384.well(1).volume is None)
     p.stamp(plate_96.well(0), plate_96_2.well(0), "10:microliter",
             {"columns": 12, "rows": 1})
     p.stamp(plate_96.well(0), plate_96_2.well(0), "10:microliter",
             {"columns": 1, "rows": 8})
     self.assertTrue(plate_96_2.well(0).volume == Unit(20, "microliter"))
     for w in plate_96_2.wells_from(1, 11):
         self.assertTrue(w.volume == Unit(10, "microliter"))
     p.stamp(plate_96.well(0), plate_384_2.well(0), "5:microliter",
             {"columns": 1, "rows": 8})
     for w in plate_384_2.wells_from(0, 16, columnwise=True)[0::2]:
         self.assertTrue(w.volume == Unit(5, "microliter"))
     for w in plate_384_2.wells_from(1, 16, columnwise=True)[0::2]:
         self.assertTrue(w.volume is None)
     for w in plate_384_2.wells_from(1, 24)[0::2]:
         self.assertTrue(w.volume is None)
     plate_384_2.all_wells().set_volume("0:microliter")
     p.stamp(plate_96.well(0), plate_384_2.well(0), "15:microliter", {"columns": 3, "rows": 8})
     self.assertEqual(plate_384_2.well("C3").volume, Unit(15, "microliter"))
     self.assertEqual(plate_384_2.well("B2").volume, Unit(0, "microliter"))
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:31,代码来源:protocol_test.py

示例2: test_one_tip

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
    def test_one_tip(self):

        p = Protocol()
        plateCount = 2
        plateList = [p.ref("plate_%s_384" % str(x+1), None, "384-flat", discard=True) for x in range(plateCount)]
        p.stamp(plateList[0], plateList[1], "330:microliter", one_tip=True)
        self.assertEqual(len(p.instructions[0].groups[0]["transfer"]), 12)
        self.assertEqual(len(p.instructions[0].groups), 1)
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:10,代码来源:protocol_test.py

示例3: test_one_tip_variable_volume

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
    def test_one_tip_variable_volume(self):

        p = Protocol()
        plateCount = 2
        plateList = [p.ref("plate_%s_384" % str(x+1), None, "384-flat", discard=True) for x in range(plateCount)]
        with self.assertRaises(RuntimeError):
            p.stamp(WellGroup([plateList[0].well(0), plateList[0].well(1)]), WellGroup([plateList[1].well(0), plateList[1].well(1)]), ["20:microliter", "90:microliter"], one_tip=True)
        p.stamp(WellGroup([plateList[0].well(0), plateList[0].well(1)]), WellGroup([plateList[1].well(0), plateList[1].well(1)]), ["20:microliter", "90:microliter"], mix_after=True, mix_vol="40:microliter", one_tip=True)
        self.assertEqual(len(p.instructions[0].groups[0]["transfer"]), 2)
        self.assertEqual(len(p.instructions[0].groups), 1)
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:12,代码来源:protocol_test.py

示例4: test_single_transfers

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
 def test_single_transfers(self):
     p = Protocol()
     plate_96_list = []
     for plate_num in range(5):
         plate_name = ("test_96_"+str(plate_num))
         plate_96_list.append(p.ref(plate_name, None, "96-flat", discard=True))
     plate_384_list = []
     for plate_num in range(3):
         plate_name = ("test_384_"+str(plate_num))
         plate_384_list.append(p.ref(plate_name, None, "384-flat", discard=True))
     with self.assertRaises(RuntimeError):
         # Transfer 4 plates
         for pl, q in zip(plate_96_list, [0, 1, 24, 26]):
             p.stamp(pl, plate_384_list[0], "10:microliter", to_quad = q)
开发者ID:transcripticpll,项目名称:autoprotocol-python,代码行数:16,代码来源:protocol_test.py

示例5: test_gt_110uL_transfer

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
 def test_gt_110uL_transfer(self):
     p = Protocol()
     plateCount = 2
     plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat", discard=True) for x in range(plateCount)]
     p.stamp(plateList[0], plateList[1], "300:microliter")
     self.assertEqual(3, len(p.instructions[0].groups))
     self.assertEqual(
         Unit(110, 'microliter'),
         p.instructions[0].groups[0]['transfer'][0]['volume']
         )
     self.assertEqual(
         Unit(95, 'microliter'),
         p.instructions[0].groups[1]['transfer'][0]['volume']
         )
     self.assertEqual(
         Unit(95, 'microliter'),
         p.instructions[0].groups[2]['transfer'][0]['volume']
         )
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:20,代码来源:protocol_test.py

示例6: test_one_source

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
 def test_one_source(self):
     p = Protocol()
     plateCount = 2
     plateList = [p.ref("plate_%s_384" % str(x+1), None, "384-flat", discard=True) for x in range(plateCount)]
     with self.assertRaises(RuntimeError):
             p.stamp(plateList[0].wells(list(range(4))), plateList[1].wells(list(range(12))), "30:microliter", shape={"rows": 8, "columns": 1}, one_source=True)
     plateList[0].wells_from(0, 64, columnwise=True).set_volume("10:microliter")
     with self.assertRaises(RuntimeError):
             p.stamp(plateList[0].wells(list(range(4))), plateList[1].wells(list(range(12))), "30:microliter", shape={"rows": 8, "columns": 1}, one_source=True)
     plateList[0].wells_from(0, 64, columnwise=True).set_volume("15:microliter")
     p.stamp(plateList[0].wells(list(range(4))), plateList[1].wells(list(range(12))), "5:microliter", shape={"rows": 8, "columns": 1}, one_source=True)
     self.assertEqual(len(p.instructions[0].groups), 12)
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:14,代码来源:protocol_test.py

示例7: test_wellgroup

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
 def test_wellgroup(self):
     p = Protocol()
     plateCount = 2
     plateList = [p.ref("plate_%s_384" % str(x+1), None, "384-flat", discard=True) for x in range(plateCount)]
     p.stamp(plateList[0].wells(list(range(12))), plateList[1].wells(list(range(12))), "30:microliter", shape={"rows": 8, "columns": 1})
     self.assertEqual(len(p.instructions[0].groups), 12)
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:8,代码来源:protocol_test.py

示例8: test_multiple_transfers

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
    def test_multiple_transfers(self):
        # Set maximum number of full plate transfers (limited by maximum
        # number of tip boxes)
        maxFullTransfers = 4

        # Test: Ensure individual transfers are appended one at a time
        p = Protocol()
        plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat",
                     discard=True) for x in range(2)]

        for i in range(maxFullTransfers):
            p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                    "10:microliter")
            self.assertEqual(i+1, len(p.instructions[0].groups))

        # Ensure new stamp operation overflows into new instruction
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter")
        self.assertEqual(len(p.instructions), 2)
        self.assertEqual(1, len(p.instructions[1].groups))

        # Test: Maximum number of containers on a deck
        maxContainers = 3
        p = Protocol()
        plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat",
                     discard=True) for x in range(maxContainers+1)]

        for i in range(maxContainers-1):
            p.stamp(plateList[i], plateList[i+1], "10:microliter")
        self.assertEqual(1, len(p.instructions))
        self.assertEqual(maxContainers-1, len(p.instructions[0].groups))

        p.stamp(plateList[maxContainers-1].well("A1"),
                plateList[maxContainers].well("A1"), "10:microliter")
        self.assertEqual(2, len(p.instructions))

        # Test: Ensure col/row/full plate stamps are in separate instructions
        p = Protocol()
        plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat",
                     discard=True) for x in range(2)]

        p.stamp(plateList[0].well("G1"), plateList[1].well("G1"),
                "10:microliter", dict(rows=1, columns=12))
        self.assertEqual(len(p.instructions), 1)
        p.stamp(plateList[0].well("G1"), plateList[1].well("G1"),
                "10:microliter", dict(rows=2, columns=12))
        self.assertEqual(len(p.instructions), 1)
        self.assertEqual(len(p.instructions[0].groups), 2)

        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=8, columns=2))
        p.stamp(plateList[0].well("A1"), plateList[1].well("A12"),
                "10:microliter", dict(rows=8, columns=1))
        self.assertEqual(len(p.instructions), 2)
        self.assertEqual(len(p.instructions[1].groups), 2)

        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=8, columns=12))
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=8, columns=12))
        self.assertEqual(len(p.instructions), 3)
        self.assertEqual(len(p.instructions[2].groups), 2)

        # Test: Check on max transfer limit - Full plate
        p = Protocol()
        plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat",
                     discard=True) for x in range(2)]

        for i in range(maxFullTransfers):
            p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                    "10:microliter", dict(rows=8, columns=12))
        self.assertEqual(len(p.instructions), 1)

        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=8, columns=12))
        self.assertEqual(len(p.instructions), 2)
        self.assertEqual(maxFullTransfers, len(p.instructions[0].groups))
        self.assertEqual(1, len(p.instructions[1].groups))

        # Test: Check on max transfer limit - Row-wise
        p = Protocol()
        plateList = [p.ref("plate_%s_96" % str(x+1), None, "96-flat",
                     discard=True) for x in range(2)]
        # Mixture of rows
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=3, columns=12))
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=1, columns=12))
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=2, columns=12))
        p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                "10:microliter", dict(rows=2, columns=12))
        self.assertEqual(len(p.instructions), 1)
        # Maximum number of row transfers
        for i in range(8):
            p.stamp(plateList[0].well("A1"), plateList[1].well("A1"),
                    "10:microliter", dict(rows=1, columns=12))
        self.assertEqual(len(p.instructions), 2)
        self.assertEqual(len(p.instructions[0].groups), 4)
        self.assertEqual(len(p.instructions[1].groups), 8)
#.........这里部分代码省略.........
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:103,代码来源:protocol_test.py

示例9: test_single_transfers

# 需要导入模块: from autoprotocol.protocol import Protocol [as 别名]
# 或者: from autoprotocol.protocol.Protocol import stamp [as 别名]
    def test_single_transfers(self):
        p = Protocol()
        plate_1_6 = p.ref("plate_1_6", None, "6-flat", discard=True)
        plate_1_96 = p.ref("plate_1_96", None, "96-flat", discard=True)
        plate_2_96 = p.ref("plate_2_96", None, "96-flat", discard=True)
        plate_1_384 = p.ref("plate_1_384", None, "384-flat", discard=True)
        plate_2_384 = p.ref("plate_2_384", None, "384-flat", discard=True)
        p.stamp(plate_1_96.well("G1"), plate_2_96.well("H1"),
                "10:microliter", dict(rows=1, columns=12))
        p.stamp(plate_1_96.well("A1"), plate_1_384.well("A2"),
                "10:microliter", dict(rows=8, columns=2))
        # Verify full plate to full plate transfer works for 96, 384 container input
        p.stamp(plate_1_96, plate_2_96, "10:microliter")
        p.stamp(plate_1_384, plate_2_384, "10:microliter")

        with self.assertRaises(ValueError):
            p.stamp(plate_1_96.well("A1"), plate_2_96.well("A2"),
                    "10:microliter", dict(rows=9, columns=1))
        with self.assertRaises(ValueError):
            p.stamp(plate_1_96.well("A1"), plate_2_96.well("B1"),
                    "10:microliter", dict(rows=1, columns=13))
        with self.assertRaises(ValueError):
            p.stamp(plate_1_384.well("A1"), plate_2_384.well("A2"),
                    "10:microliter", dict(rows=9, columns=1))
        with self.assertRaises(ValueError):
            p.stamp(plate_1_384.well("A1"), plate_2_384.well("B1"),
                    "10:microliter", dict(rows=1, columns=13))
        with self.assertRaises(ValueError):
            p.stamp(plate_1_96.well("A1"), plate_2_96.well("A2"),
                    "10:microliter", dict(rows=1, columns=12))
        with self.assertRaises(ValueError):
            p.stamp(plate_1_96.well("A1"), plate_2_96.well("D1"),
                    "10:microliter", dict(rows=6, columns=12))
开发者ID:tdsmith,项目名称:autoprotocol-python,代码行数:35,代码来源:protocol_test.py


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