-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnhancer.py
More file actions
31 lines (20 loc) · 788 Bytes
/
Enhancer.py
File metadata and controls
31 lines (20 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Enhancer:
def __init__(self, chrom, start, end, confidence):
self.chrom = chrom
self.start = start
self.end = end
self.confidence = confidence
def __str__(self):
return f"{self.chrom}:{self.start}-{self.end} ({self.confidence})"
def to_bed(self, with_confidence = False):
return f"{self.chrom}\t{self.start}\t{self.end}\t{self.confidence}" if with_confidence else f"{self.chrom}\t{self.start}\t{self.end}"
def get_chrom(self):
return self.chrom
def get_start(self):
return self.start
def get_end(self):
return self.end
def get_confidence(self):
return self.confidence
def get_length(self):
return self.end - self.start