618c2aace63b809dcd06fc933229ca0b95281a4c
[qpalma.git] / tools / data_tools / PyGff.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 class Gene:
5
6 chromosome = ''
7 strand = ''
8 start = -1
9 stop = -1
10 exons = []
11 fiveUTR = []
12 threeUTR = []
13
14
15 def __init__(self,chr,begin,end,strand):
16 assert chr != ''
17 assert begin >= 0 and begin <= end and end >= 0
18 assert strand in ['+','-']
19
20 self.chromosome = chr
21 self.start = begin
22 self.stop = end
23 self.strand = strand
24
25
26 def addExon(self,start,stop):
27 self.exons.append((start,stop))
28
29 def load(self,filename):
30 pass
31
32 def save(self,filename):
33 pass