Exemple #1
0
 def test_out_of_bounds(self):
     """Test if query is out of bounds"""
     loaded_wig = WigReader(self.wig_location)
     with warnings.catch_warnings(record=True) as w:
         scores = loaded_wig.query([("M", 0, 3, '-')])
         assert len(w) >= 1
         assert str(w[-1].message) == 'Chromosome M does not appear in the bigwig'
Exemple #2
0
 def test_query(self):
     """Test wig query"""
     loaded_wig = WigReader(self.wig_location)
     scores = loaded_wig.query([("1", 0, 3, '-'), ("1", 150, 151, '+')])
     expected_scores = np.array([[0.30000001192092896, 0.20000000298023224, 0.10000000149011612],
                       [1.5]])
     np.equal(expected_scores, scores)