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
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
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)
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)