-
Notifications
You must be signed in to change notification settings - Fork 2
/
pcpP5.py
60 lines (55 loc) · 2.32 KB
/
pcpP5.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
CRED = '\033[91m'
CEND = '\033[0m'
import utils
import numpy as np
import save
def generate(X, seqType, args):
'''
# Reference: Spider-2
:param X:
:param seqType:
:param args:
:return:
'''
if seqType == 'PROT':
d = {
'A': [-0.350, -0.680, -0.677, -0.171, -0.170, 0.900, -0.476],
'C': [-0.140, -0.329, -0.359, 0.508, -0.114, -0.652, 0.476],
'D': [-0.213, -0.417, -0.281, -0.767, -0.900, -0.155, -0.635],
'E': [-0.230, -0.241, -0.058, -0.696, -0.868, 0.900, -0.582],
'F': [ 0.363, 0.373, 0.412, 0.646, -0.272, 0.155, 0.318],
'G': [-0.900, -0.900, -0.900, -0.342, -0.179, -0.900, -0.900],
'H': [ 0.384, 0.110, 0.138, -0.271, 0.195, -0.031, -0.106],
'I': [ 0.900, -0.066, -0.009, 0.652, -0.186, 0.155, 0.688],
'K': [-0.088, 0.066, 0.163, -0.889, 0.727, 0.279, -0.265],
'L': [ 0.213, -0.066, -0.009, 0.596, -0.186, 0.714, -0.053],
'M': [ 0.110, 0.066, 0.087, 0.337, -0.262, 0.652, -0.001],
'N': [-0.213, -0.329, -0.243, -0.674, -0.075, -0.403, -0.529],
'P': [ 0.247, -0.900, -0.294, 0.055, -0.010, -0.900, 0.106],
'Q': [-0.230, -0.110, -0.020, -0.464, -0.276, 0.528, -0.371],
'R': [ 0.105, 0.373, 0.466, -0.900, 0.900, 0.528, -0.371],
'S': [-0.337, -0.637, -0.544, -0.364, -0.265, -0.466, -0.212],
'T': [ 0.402, -0.417, -0.321, -0.199, -0.288, -0.403, 0.212],
'V': [ 0.677, -0.285, -0.232, 0.331, -0.191, -0.031, 0.900],
'W': [ 0.479, 0.900, 0.900, 0.900, -0.209, 0.279, 0.529],
'Y': [ 0.363, 0.417, 0.541, 0.188, -0.274, -0.155, 0.476],
'p': [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
}
else:
if seqType == 'DNA' or seqType == 'RNA':
print(CRED+'Error: The \'Physicochemical Properties-P5\' feature is NOT applicable for DNA/RNA.'+CEND)
return None
else:
return None
#end-if
X = utils.processMono(X, d, args)
totalFeature = 0
if seqType == 'DNA' or seqType == 'RNA': None
else:
if seqType == 'PROT':
totalFeature = 7
else:
None
# end-if
save.datasetSave(X, totalFeature, 'pcpP5')
#end-def