annotate local_ctd.py @ 35:a662eb3f87c2 draft

Uploaded
author jose_duarte
date Tue, 13 Jun 2023 09:53:42 +0000
parents 3d94608aea7a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
1 # -*- coding: utf-8 -*-
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
2 """
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
3 Compute the composition, transition and distribution descriptors based on the
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
4 different properties of AADs.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
5 The AADs with the same properties is marked as the same number. You can get 147
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
6 descriptors for a given protein sequence.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
7 References
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
8 ----------
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
9 .. [1] Inna Dubchak, Ilya Muchink, Stephen R.Holbrook and Sung-Hou Kim.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
10 Prediction of protein folding class using global description of amino
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
11 acid sequence. Proc.Natl. Acad.Sci.USA, 1995, 92, 8700-8704.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
12 .. [2] Inna Dubchak, Ilya Muchink, Christopher Mayor, Igor Dralyuk and Sung-Hou
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
13 Kim. Recognition of a Protein Fold in the Context of the SCOP
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
14 classification. Proteins: Structure, Function and
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
15 Genetics, 1999, 35, 401-407.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
16 Authors: Dongsheng Cao and Yizeng Liang.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
17 Date: 2010.11.22
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
18 Email: oriental-cds@163.com
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
19 """
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
20
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
21 # Core Library
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
22 import copy
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
23 import math
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
24 from typing import Any, Dict
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
25
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
26 _Hydrophobicity = {"1": "RKEDQN", "2": "GASTPHY", "3": "CLVIMFW"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
27 # '1'stand for Polar; '2'stand for Neutral, '3' stand for Hydrophobicity
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
28
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
29 _NormalizedVDWV = {"1": "GASTPD", "2": "NVEQIL", "3": "MHKFRYW"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
30 # '1'stand for (0-2.78); '2'stand for (2.95-4.0), '3' stand for (4.03-8.08)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
31
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
32 _Polarity = {"1": "LIFWCMVY", "2": "CPNVEQIL", "3": "KMHFRYW"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
33 # '1'stand for (4.9-6.2); '2'stand for (8.0-9.2), '3' stand for (10.4-13.0)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
34
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
35 _Charge = {"1": "KR", "2": "ANCQGHILMFPSTWYV", "3": "DE"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
36 # '1'stand for Positive; '2'stand for Neutral, '3' stand for Negative
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
37
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
38 _SecondaryStr = {"1": "EALMQKRH", "2": "VIYCWFT", "3": "GNPSD"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
39 # '1'stand for Helix; '2'stand for Strand, '3' stand for coil
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
40
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
41 _SolventAccessibility = {"1": "ALFCGIVW", "2": "RKQEND", "3": "MPSTHY"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
42 # '1'stand for Buried; '2'stand for Exposed, '3' stand for Intermediate
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
43
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
44 _Polarizability = {"1": "GASDT", "2": "CPNVEQIL", "3": "KMHFRYW"}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
45 # '1'stand for (0-0.108); '2'stand for (0.128-0.186), '3' stand for (0.219-0.409)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
46
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
47
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
48 # You can continuely add other properties of AADs to compute descriptors of
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
49 # protein sequence.
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
50
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
51 _AATProperty = (
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
52 _Hydrophobicity,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
53 _NormalizedVDWV,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
54 _Polarity,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
55 _Charge,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
56 _SecondaryStr,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
57 _SolventAccessibility,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
58 _Polarizability,
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
59 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
60
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
61 _AATPropertyName = (
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
62 "_Hydrophobicity",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
63 "_NormalizedVDWV",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
64 "_Polarity",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
65 "_Charge",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
66 "_SecondaryStr",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
67 "_SolventAccessibility",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
68 "_Polarizability",
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
69 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
70
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
71
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
72 def StringtoNum(ProteinSequence: str, AAProperty: Dict[Any, Any]) -> str:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
73 hardProteinSequence = copy.deepcopy(ProteinSequence)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
74 for k, m in list(AAProperty.items()):
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
75 for index in m:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
76 hardProteinSequence = hardProteinSequence.replace(index, k)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
77 TProteinSequence = hardProteinSequence
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
78
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
79 return TProteinSequence
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
80
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
81
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
82 def CalculateComposition(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
83 ProteinSequence: str, AAProperty: Dict[Any, Any], AAPName: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
84 TProteinSequence = StringtoNum(ProteinSequence, AAProperty)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
85 result = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
86 num = len(TProteinSequence)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
87 result[AAPName + "C" + "1"] = round(float(TProteinSequence.count("1")) / num, 3)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
88 result[AAPName + "C" + "2"] = round(float(TProteinSequence.count("2")) / num, 3)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
89 result[AAPName + "C" + "3"] = round(float(TProteinSequence.count("3")) / num, 3)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
90 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
91
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
92
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
93 def CalculateTransition(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
94 ProteinSequence: str, AAProperty: Dict[Any, Any], AAPName: str
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
95 ) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
96 TProteinSequence = StringtoNum(ProteinSequence, AAProperty)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
97 Result = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
98 num = len(TProteinSequence)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
99 CTD = TProteinSequence
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
100 Result[AAPName + "T" + "12"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
101 float(CTD.count("12") + CTD.count("21")) / (num - 1), 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
102 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
103 Result[AAPName + "T" + "13"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
104 float(CTD.count("13") + CTD.count("31")) / (num - 1), 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
105 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
106 Result[AAPName + "T" + "23"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
107 float(CTD.count("23") + CTD.count("32")) / (num - 1), 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
108 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
109 return Result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
110
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
111
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
112 def CalculateDistribution(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
113 ProteinSequence: str, AAProperty: Dict[Any, Any], AAPName: str
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
114 ) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
115 TProteinSequence = StringtoNum(ProteinSequence, AAProperty)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
116 Result: Dict[str, float] = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
117 Num = len(TProteinSequence)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
118 for i in ("1", "2", "3"):
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
119 num = TProteinSequence.count(i)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
120 ink = 1
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
121 indexk = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
122 cds = []
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
123 while ink <= num:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
124 indexk = TProteinSequence.find(i, indexk) + 1
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
125 cds.append(indexk)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
126 ink = ink + 1
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
127
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
128 if cds == []:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
129 Result[AAPName + "D" + i + "001"] = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
130 Result[AAPName + "D" + i + "025"] = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
131 Result[AAPName + "D" + i + "050"] = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
132 Result[AAPName + "D" + i + "075"] = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
133 Result[AAPName + "D" + i + "100"] = 0
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
134 else:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
135 Result[AAPName + "D" + i + "001"] = round(float(cds[0]) / Num * 100, 3)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
136 Result[AAPName + "D" + i + "025"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
137 float(cds[int(math.floor(num * 0.25)) - 1]) / Num * 100, 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
138 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
139 Result[AAPName + "D" + i + "050"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
140 float(cds[int(math.floor(num * 0.5)) - 1]) / Num * 100, 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
141 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
142 Result[AAPName + "D" + i + "075"] = round(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
143 float(cds[int(math.floor(num * 0.75)) - 1]) / Num * 100, 3
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
144 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
145 Result[AAPName + "D" + i + "100"] = round(float(cds[-1]) / Num * 100, 3)
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
146
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
147 return Result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
148
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
149
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
150 def CalculateCompositionHydrophobicity(ProteinSequence: str):
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
151 return CalculateComposition(ProteinSequence, _Hydrophobicity, "_Hydrophobicity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
152
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
153
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
154 def CalculateCompositionNormalizedVDWV(ProteinSequence: str):
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
155 return CalculateComposition(ProteinSequence, _NormalizedVDWV, "_NormalizedVDWV")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
156
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
157
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
158 def CalculateCompositionPolarity(ProteinSequence: str):
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
159 return CalculateComposition(ProteinSequence, _Polarity, "_Polarity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
160
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
161
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
162 def CalculateCompositionCharge(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
163 return CalculateComposition(ProteinSequence, _Charge, "_Charge")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
164
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
165
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
166 def CalculateCompositionSecondaryStr(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
167 return CalculateComposition(ProteinSequence, _SecondaryStr, "_SecondaryStr")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
168
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
169
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
170 def CalculateCompositionSolventAccessibility(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
171 return CalculateComposition(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
172 ProteinSequence, _SolventAccessibility, "_SolventAccessibility"
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
173 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
174
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
175
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
176 def CalculateCompositionPolarizability(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
177 return CalculateComposition(ProteinSequence, _Polarizability, "_Polarizability")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
178
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
179
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
180 def CalculateTransitionHydrophobicity(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
181 result = CalculateTransition(ProteinSequence, _Hydrophobicity, "_Hydrophobicity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
182 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
183
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
184
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
185 def CalculateTransitionNormalizedVDWV(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
186 result = CalculateTransition(ProteinSequence, _NormalizedVDWV, "_NormalizedVDWV")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
187 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
188
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
189
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
190 def CalculateTransitionPolarity(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
191 result = CalculateTransition(ProteinSequence, _Polarity, "_Polarity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
192 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
193
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
194
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
195 def CalculateTransitionCharge(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
196 result = CalculateTransition(ProteinSequence, _Charge, "_Charge")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
197 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
198
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
199
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
200 def CalculateTransitionSecondaryStr(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
201 result = CalculateTransition(ProteinSequence, _SecondaryStr, "_SecondaryStr")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
202 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
203
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
204
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
205 def CalculateTransitionSolventAccessibility(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
206 result = CalculateTransition(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
207 ProteinSequence, _SolventAccessibility, "_SolventAccessibility"
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
208 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
209 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
210
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
211
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
212 def CalculateTransitionPolarizability(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
213 result = CalculateTransition(ProteinSequence, _Polarizability, "_Polarizability")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
214 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
215
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
216
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
217 def CalculateDistributionHydrophobicity(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
218 result = CalculateDistribution(ProteinSequence, _Hydrophobicity, "_Hydrophobicity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
219 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
220
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
221
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
222 def CalculateDistributionNormalizedVDWV(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
223 result = CalculateDistribution(ProteinSequence, _NormalizedVDWV, "_NormalizedVDWV")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
224 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
225
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
226
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
227 def CalculateDistributionPolarity(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
228 result = CalculateDistribution(ProteinSequence, _Polarity, "_Polarity")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
229 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
230
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
231
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
232 def CalculateDistributionCharge(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
233 result = CalculateDistribution(ProteinSequence, _Charge, "_Charge")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
234 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
235
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
236
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
237 def CalculateDistributionSecondaryStr(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
238 result = CalculateDistribution(ProteinSequence, _SecondaryStr, "_SecondaryStr")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
239 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
240
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
241
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
242 def CalculateDistributionSolventAccessibility(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
243 result = CalculateDistribution(
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
244 ProteinSequence, _SolventAccessibility, "_SolventAccessibility"
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
245 )
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
246 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
247
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
248
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
249 def CalculateDistributionPolarizability(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
250 result = CalculateDistribution(ProteinSequence, _Polarizability, "_Polarizability")
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
251 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
252
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
253
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
254 def CalculateC(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
255 result: Dict[Any, Any] = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
256 result.update(CalculateCompositionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
257 result.update(CalculateCompositionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
258 result.update(CalculateCompositionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
259 result.update(CalculateCompositionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
260 result.update(CalculateCompositionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
261 result.update(CalculateCompositionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
262 result.update(CalculateCompositionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
263 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
264
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
265
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
266 def CalculateT(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
267 result: Dict[Any, Any] = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
268 result.update(CalculateTransitionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
269 result.update(CalculateTransitionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
270 result.update(CalculateTransitionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
271 result.update(CalculateTransitionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
272 result.update(CalculateTransitionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
273 result.update(CalculateTransitionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
274 result.update(CalculateTransitionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
275 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
276
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
277
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
278 def CalculateD(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
279 result: Dict[Any, Any] = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
280 result.update(CalculateDistributionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
281 result.update(CalculateDistributionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
282 result.update(CalculateDistributionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
283 result.update(CalculateDistributionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
284 result.update(CalculateDistributionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
285 result.update(CalculateDistributionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
286 result.update(CalculateDistributionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
287 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
288
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
289
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
290 def CalculateCTD(ProteinSequence: str) -> Dict[Any, Any]:
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
291 result: Dict[Any, Any] = {}
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
292 result.update(CalculateCompositionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
293 result.update(CalculateCompositionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
294 result.update(CalculateCompositionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
295 result.update(CalculateCompositionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
296 result.update(CalculateCompositionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
297 result.update(CalculateCompositionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
298 result.update(CalculateCompositionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
299 result.update(CalculateTransitionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
300 result.update(CalculateTransitionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
301 result.update(CalculateTransitionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
302 result.update(CalculateTransitionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
303 result.update(CalculateTransitionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
304 result.update(CalculateTransitionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
305 result.update(CalculateTransitionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
306 result.update(CalculateDistributionPolarizability(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
307 result.update(CalculateDistributionSolventAccessibility(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
308 result.update(CalculateDistributionSecondaryStr(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
309 result.update(CalculateDistributionCharge(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
310 result.update(CalculateDistributionPolarity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
311 result.update(CalculateDistributionNormalizedVDWV(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
312 result.update(CalculateDistributionHydrophobicity(ProteinSequence))
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
313 return result
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
314
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
315
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
316
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
317
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
318
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
319
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
320
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
321
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
322
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
323
3d94608aea7a Uploaded
jose_duarte
parents:
diff changeset
324