-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomputeSeqAAHydrophobicity.pm
172 lines (160 loc) · 4.87 KB
/
computeSeqAAHydrophobicity.pm
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#---------------------------------------------------------------------------
# Singapore, 21st October 2011
# ACADEMIC SOFTWARE LICENSE for TMSOC
# ***********************************
# Copyright:
# Wing-Cheong Wong, Sebastian Maurer-Stroh, Georg Schneider, Frank Eisenhaber
# Bioinformatics Institute (BII) A*STAR Singapore
# This software is subjected to license restrictions. The software is
# provided as is. In its present form and without written consent of
# the copyright holder, the software is provided in accordance with GPL
# (www.gnu.org/licenses/gpl.html). Among other issues, this excludes any
# warranty and indemnity when using this software. For a commercial license,
# please approach the authors (via email to wongwc@bii.a-star.edu.sg).
# When publishing results with this software, please refer to:
# Wing-Cheong Wong, Sebastian Maurer-Stroh, Frank Eisenhaber, 2011,
# "Not all transmembrane helices are born equal: Towards the extension of
# the sequence homology concept to the membrane proteins", Biology Direct
# When observing bugs or strange behavior of the software, the user is
# encouraged to contact the authors.
#---------------------------------------------------------------------------
# Hydrophobicity scales based on Stephen H. White laboratory at UC Irvine
#---------------------------------------------------------------------------
use strict; # Forces variables to be declared
use POSIX;
sub computeSeqAAHydrophobicity {
my($sequence) = @_;
my $i;
my @seqArray;
my $validlength;
# my $validAA;
my $interfaceSum;
my $octanolSum;
my $octanolInterfaceSum;
my $interfaceScale;
my $octanolScale;
my $octanolInterfaceScale;
@seqArray = split(//,uc($sequence));
$validlength = scalar(@seqArray);
if (scalar(@seqArray) > 0) {
# Sum the interface and octanol scales for the sequence
$interfaceSum = 0;
$octanolSum = 0;
$octanolInterfaceSum = 0;
for ($i=0; $i<scalar(@seqArray); $i++) {
if ($seqArray[$i] eq 'A') {
$interfaceSum += 0.17;
$octanolSum += 0.51;
$octanolInterfaceSum += 0.33;
}
elsif ($seqArray[$i] eq 'R') {
$interfaceSum += 0.81;
$octanolSum += 1.81;
$octanolInterfaceSum += 1.00;
}
elsif ($seqArray[$i] eq 'N') {
$interfaceSum += 0.42;
$octanolSum += 0.85;
$octanolInterfaceSum += 0.43;
}
elsif ($seqArray[$i] eq 'D') {
$interfaceSum += 1.23;
$octanolSum += 3.64;
$octanolInterfaceSum += 2.41;
}
elsif ($seqArray[$i] eq 'C') {
$interfaceSum += -0.24;
$octanolSum += -0.02;
$octanolInterfaceSum += 0.22;
}
elsif ($seqArray[$i] eq 'E') {
$interfaceSum += 2.02;
$octanolSum += 3.63;
$octanolInterfaceSum += 1.61;
}
elsif ($seqArray[$i] eq 'Q') {
$interfaceSum += 0.58;
$octanolSum += 0.77;
$octanolInterfaceSum += 0.19;
}
elsif ($seqArray[$i] eq 'G') {
$interfaceSum += 0.01;
$octanolSum += 1.15;
$octanolInterfaceSum += 1.14;
}
elsif ($seqArray[$i] eq 'H') {
$interfaceSum += 0.96;
$octanolSum += 2.33;
$octanolInterfaceSum += 1.37;
}
elsif ($seqArray[$i] eq 'I') {
$interfaceSum += -0.31;
$octanolSum += -1.12;
$octanolInterfaceSum += -0.81;
}
elsif ($seqArray[$i] eq 'L') {
$interfaceSum += -0.56;
$octanolSum += -1.25;
$octanolInterfaceSum += -0.69;
}
elsif ($seqArray[$i] eq 'K') {
$interfaceSum += 0.99;
$octanolSum += 2.80;
$octanolInterfaceSum += 1.81;
}
elsif ($seqArray[$i] eq 'M') {
$interfaceSum += -0.23;
$octanolSum += -0.67;
$octanolInterfaceSum += -0.44;
}
elsif ($seqArray[$i] eq 'F') {
$interfaceSum += -1.13;
$octanolSum += -1.71;
$octanolInterfaceSum += -0.58;
}
elsif ($seqArray[$i] eq 'P') {
$interfaceSum += 0.45;
$octanolSum += 0.14;
$octanolInterfaceSum += -0.31;
}
elsif ($seqArray[$i] eq 'S') {
$interfaceSum += 0.13;
$octanolSum += 0.46;
$octanolInterfaceSum += 0.33;
}
elsif ($seqArray[$i] eq 'T') {
$interfaceSum += 0.14;
$octanolSum += 0.25;
$octanolInterfaceSum += 0.11;
}
elsif ($seqArray[$i] eq 'W') {
$interfaceSum += -1.85;
$octanolSum += -2.09;
$octanolInterfaceSum += -0.24;
}
elsif ($seqArray[$i] eq 'Y') {
$interfaceSum += -0.94;
$octanolSum += -0.71;
$octanolInterfaceSum += 0.23;
}
elsif ($seqArray[$i] eq 'V') {
$interfaceSum += 0.07;
$octanolSum += -0.46;
$octanolInterfaceSum += -0.53;
}
else {
$validlength -= 1;
}
}
$interfaceScale = 0.0;
$octanolScale = 0.0;
$octanolInterfaceScale = 0.0;
if ($validlength > 0) {
$interfaceScale = $interfaceSum;
$octanolScale = $octanolSum;
$octanolInterfaceScale = $octanolInterfaceSum;
}
}
return ($octanolScale, $interfaceScale, $octanolInterfaceScale);
}
1;