Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 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))