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


Python Cluster.extend方法代码示例

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


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

示例1: test_extend_bug

# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import extend [as 别名]
 def test_extend_bug(self):
     cluster = Cluster(read=BED, write=PK)
     cluster.read_line('chr3 1 35 666 noname +')
     cluster2 = Cluster(read=BED, write=PK)
     cluster2.read_line('chr3 156 200 666 noname -')
     cluster.extend(100)
     cluster2.extend(100)
     result = cluster + cluster2
     self.assertEqual(200, len(result))
开发者ID:23Skidoo,项目名称:genomizer-server,代码行数:11,代码来源:testCore.py

示例2: test_extend

# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import extend [as 别名]
 def test_extend(self):
     cluster = Cluster(read=BED)
     cluster.read_line('chr3 1 35 noname 666 +')
     cluster2 = Cluster(read=BED)
     cluster2.read_line('chr3 56 100 noname 666 -')
     cluster.extend(100)
     cluster2.extend(100)
     self.assertEqual(cluster.write_line(), 'chr3\t1\t100\t100:1.00\t1.0\t+\t50\t100.0\n')
     self.assertEqual(cluster2.write_line(), 'chr3\t1\t100\t100:1.00\t1.0\t-\t50\t100.0\n')
开发者ID:23Skidoo,项目名称:genomizer-server,代码行数:11,代码来源:testCore.py

示例3: read_and_extend

# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import extend [as 别名]
    def read_and_extend(self, cluster, line, extension):
        cluster_aux = Cluster(read=BED, write=BED, read_half_open=True, write_half_open=True, rounding = True)
        if cluster.is_empty():
            cluster.read_line(line)
            cluster.extend(extension)
            #print cluster.write_line(), cluster._profile
        else:
            cluster_aux.read_line(line)
            cluster_aux.extend(extension)
            #print cluster_aux.write_line(), cluster_aux._profile
            cluster += cluster_aux

        #print cluster.write_line()
        return cluster
开发者ID:23Skidoo,项目名称:genomizer-server,代码行数:16,代码来源:testCore.py

示例4: test_bed_half_open_to_wig_half_open2

# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import extend [as 别名]
    def test_bed_half_open_to_wig_half_open2(self):
        cluster = Cluster(read=BED, write=WIG, read_half_open=True, write_half_open=True, rounding=True, cached=True)
        cluster2 = Cluster(read=BED, write=WIG, read_half_open=True, write_half_open=True, rounding=True, cached=True)
        cluster3 = Cluster(read=BED, write=WIG, read_half_open=True, write_half_open=True, rounding=True, cached=True)
        result = Cluster(read=BED, write=WIG, read_half_open=True, write_half_open=True, rounding=True)
        extension = 130
        result.read_line('chr1    156     192     id:7043691      1000    +')
        result.extend(extension)
        cluster.read_line('chr1    241     277     id:916714       1000    +')
        cluster.extend(extension)
        result +=cluster
        cluster2.read_line('chr1    241     277     id:916714       1000    +')
        cluster2.extend(extension)
        result +=cluster2
        cluster3.read_line('chr1    241     277     id:6880101      1000    +')
        cluster3.extend(extension)
        result +=cluster3

        self.assertEqual(result.write_line(), 'chr1\t156\t241\t1\nchr1\t241\t286\t4\nchr1\t286\t371\t3\n')
开发者ID:23Skidoo,项目名称:genomizer-server,代码行数:21,代码来源:testCore.py


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