예제 #1
0
 def get(self, start = None, end = None, pos = None, log = None):
     """Obtain values for particular region"""
     out = Track.get(self, start, end, pos)
     if log is None:
         return out
     elif log:
         if self.log:
             return out
         else:
             return np.log(out)
     else:
         if self.log:
             return np.exp(out)
         else:
             return out
예제 #2
0
파일: bias.py 프로젝트: wzthu/NucleoATAC
 def get(self, start=None, end=None, pos=None, log=None):
     """Obtain values for particular region"""
     out = Track.get(self, start, end, pos)
     if log is None:
         return out
     elif log:
         if self.log:
             return out
         else:
             return np.log(out)
     else:
         if self.log:
             return np.exp(out)
         else:
             return out
예제 #3
0
 def test_read_and_get(self):
     """test the read and get functionality of track class"""
     track = Track(self.chunk.chrom, self.chunk.start, self.chunk.end)
     track.read_track("example/example.Scores.bedgraph.gz")
     val = 1.35994655714
     self.assertTrue(abs(val - track.get(pos=706661)) < 0.001)
예제 #4
0
 def test_read_and_get(self):
     """test the read and get functionality of track class"""
     track = Track(self.chunk.chrom, self.chunk.start, self.chunk.end)
     track.read_track('example/example.Scores.bedgraph.gz')
     val = 1.35994655714
     self.assertTrue(abs(val - track.get(pos=706661)) < 0.001)