本文整理汇总了Python中pyicoteolib.core.Cluster.intersects方法的典型用法代码示例。如果您正苦于以下问题:Python Cluster.intersects方法的具体用法?Python Cluster.intersects怎么用?Python Cluster.intersects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyicoteolib.core.Cluster
的用法示例。
在下文中一共展示了Cluster.intersects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bug_contiguous_peaks
# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import intersects [as 别名]
def test_bug_contiguous_peaks(self):
cluster = Cluster(rounding=True, read=PK, write=PK)
cluster2 = Cluster(rounding=True, read=PK, write=PK)
cluster.read_line('chr1 849917 850408 8:2|10:4|80:5|23:6|29:7|8:5|10:3|39:2|12:3|29:4|5:3|18:4|41:3|30:4|15:5|12:4|34:3|59:2|30:1')
cluster2.read_line('chr1 850408 850648 66:2|25:3|59:4|66:2|25:1 +')
result = cluster + cluster2
self.assertTrue(cluster.intersects(cluster2))
示例2: test_intersects
# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import intersects [as 别名]
def test_intersects(self):
self.assertTrue(Cluster('chr1', 1, 10).intersects(Cluster('chr1', 10, 14)))
self.assertFalse(Cluster('chr2', 1, 10).intersects(Cluster('chr1', 4, 14)))
self.assertTrue(Cluster('chr1', 1, 10).intersects(Cluster('chr1', 4, 14)))
cluster = Cluster(read=PK, rounding=True)
cluster.read_line('chr1 1 100 100:1')
cluster2 = Cluster(read=PK,rounding=True)
cluster2.read_line('chr1 100 199 100:1')
result = cluster + cluster2
self.assertTrue(cluster.intersects(cluster2))
示例3: test_intersects2
# 需要导入模块: from pyicoteolib.core import Cluster [as 别名]
# 或者: from pyicoteolib.core.Cluster import intersects [as 别名]
def test_intersects2(self):
cluster = Cluster(read=PK, rounding=True)
cluster.read_line('chr1 1 100 100:1')
cluster2 = Cluster(read=PK,rounding=True)
cluster2.read_line('chr1 5 50 100:1')
self.assertTrue(cluster.intersects(cluster2))