-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.py
75 lines (63 loc) · 1.94 KB
/
classes.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
"""
@author__ = "Juan Francisco Illan"
@license__ = "GPL"
@version__ = "1.0.1"
@email__ = "juanfrancisco.illan@gmail.com"
"""
class ConfigBlast:
querry_seq = ''
k = 0
match_score = 0
mismatch_score = 0
gap_score = 0
seed_threshold = 0
mode = 0
num_secuences = 0
def __init__(self):
self.querry_seq = 'AAATCTGTTCGCTTCATT' #The querry sequence we search for
self.k = 8 #Word length
self.match_score = 2 #Score added on match occurunce in alignment
self.mismatch_score = -1 #Score added on mismatch occurunce in alignment
self.gap_score = -1 #Score added on gap occurunce in alignment
self.seed_threshold = 12 #The minimum score to considered a seed
self.num_secuences = 10 # Num of secuences to read from bd
class ConfigBlastProtein:
querry_seq = ''
def __init__(self):
self.querry_seq = 'ACGGTGCTACTCAAGGCCCGGGAAGGTGGCGGTGGAAATCGCAAAGGCAAAAGCAAGAAATGGCGGCAGATGC' #The querry sequence we search for
class ConfigBlastPathogen:
patogen = ''
querry_seq = ''
def __init__(self):
self.patogen = 'SARS CoV 2'
self.querry_seq = 'ACGGCAGTGAGGACGATCAGACAACTACTATTCAAACAATGTTGAGGTTCAACCTCAATTAGAGATGGAACTTACACAGTTGTTCAGACTATTGAAGTGAATAGTTTTA' #The querry sequence we search for
class BlastResult:
secuences = [] # List of AlignmentSecuence
time_seed = None
time_extends = None
class AlignmentSecuence:
idSecuence = None
nameSecuence = None
strSecuence = None
scoreMaxSecuence = None
alignments = [] # List of Alignments calculate for Secuence
def __lt__(self, other):
if self.scoreMaxSecuence < other.scoreMaxSecuence:
return True
else:
return False
class StatisticExecution:
id = None
querry_seq = None
creation_date = None
k = None
match_score = None
mismatch_score = None
gap_score = None
seed_threshold = None
mode = None
numSecuencesDb = None
numSeedCalculate = None
numSecuencesCalculate = None
time_seed = None
time_extends = None