| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Wurst; |
|
2
|
|
|
|
|
|
|
# rcsid = "$Id: Wurst.pm,v 1.2 2008/01/18 15:05:59 margraf Exp $" |
|
3
|
2
|
|
|
2
|
|
30851
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
95
|
|
|
4
|
2
|
|
|
2
|
|
10
|
use Carp; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
168
|
|
|
5
|
2
|
|
|
2
|
|
22
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
517
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
|
8
|
|
|
|
|
|
|
require DynaLoader; |
|
9
|
|
|
|
|
|
|
require AutoLoader; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
@ISA = qw(Exporter DynaLoader ); |
|
13
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
|
14
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
|
15
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Please please delete "str_to_class" XXXX do not forget !!! |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@EXPORT = qw( |
|
20
|
|
|
|
|
|
|
aa_2_prob_vec |
|
21
|
|
|
|
|
|
|
aa_strct_2_prob_vec |
|
22
|
|
|
|
|
|
|
aa_strct_clssfcn_read |
|
23
|
|
|
|
|
|
|
aa_strct_dump |
|
24
|
|
|
|
|
|
|
aa_strct_nclass |
|
25
|
|
|
|
|
|
|
aa_strct_size |
|
26
|
|
|
|
|
|
|
ac_dump |
|
27
|
|
|
|
|
|
|
ac_nclass |
|
28
|
|
|
|
|
|
|
ac_read |
|
29
|
|
|
|
|
|
|
ac_size |
|
30
|
|
|
|
|
|
|
blst_chk_read |
|
31
|
|
|
|
|
|
|
check_data_read |
|
32
|
|
|
|
|
|
|
computeMembership |
|
33
|
|
|
|
|
|
|
computeMembershipAA |
|
34
|
|
|
|
|
|
|
computeMembershipAAProf |
|
35
|
|
|
|
|
|
|
coord_get_sec_s |
|
36
|
|
|
|
|
|
|
coord_has_sec_s |
|
37
|
|
|
|
|
|
|
coord_c_n_dist |
|
38
|
|
|
|
|
|
|
coord_calc_psi |
|
39
|
|
|
|
|
|
|
coord_calc_phi |
|
40
|
|
|
|
|
|
|
coord_psi |
|
41
|
|
|
|
|
|
|
coord_phi |
|
42
|
|
|
|
|
|
|
coord_deletion |
|
43
|
|
|
|
|
|
|
coord_geo_gap |
|
44
|
|
|
|
|
|
|
coord_get_seq |
|
45
|
|
|
|
|
|
|
coord_name |
|
46
|
|
|
|
|
|
|
coord_read |
|
47
|
|
|
|
|
|
|
coord_rmsd |
|
48
|
|
|
|
|
|
|
coord_size |
|
49
|
|
|
|
|
|
|
coord_2_bin |
|
50
|
|
|
|
|
|
|
coord_2_pdb |
|
51
|
|
|
|
|
|
|
coord_2_pnlty |
|
52
|
|
|
|
|
|
|
coord_2_spdb |
|
53
|
|
|
|
|
|
|
dme_thresh |
|
54
|
|
|
|
|
|
|
find_alt_path_score_simple |
|
55
|
|
|
|
|
|
|
file_pre_read |
|
56
|
|
|
|
|
|
|
file_un_read |
|
57
|
|
|
|
|
|
|
func_int |
|
58
|
|
|
|
|
|
|
func_float |
|
59
|
|
|
|
|
|
|
func_char |
|
60
|
|
|
|
|
|
|
funcs1_char |
|
61
|
|
|
|
|
|
|
funcs2_char |
|
62
|
|
|
|
|
|
|
get_clssfcn |
|
63
|
|
|
|
|
|
|
get_nbor |
|
64
|
|
|
|
|
|
|
get_rmsd |
|
65
|
|
|
|
|
|
|
get_solv_data |
|
66
|
|
|
|
|
|
|
get_torsion_data |
|
67
|
|
|
|
|
|
|
get_seq_id_simple |
|
68
|
|
|
|
|
|
|
make_model |
|
69
|
|
|
|
|
|
|
model_pdb_num |
|
70
|
|
|
|
|
|
|
make_model |
|
71
|
|
|
|
|
|
|
merge_alignments |
|
72
|
|
|
|
|
|
|
model_pdb_num |
|
73
|
|
|
|
|
|
|
model_res_num |
|
74
|
|
|
|
|
|
|
multal_string |
|
75
|
|
|
|
|
|
|
split_multal |
|
76
|
|
|
|
|
|
|
pair_set_chimera |
|
77
|
|
|
|
|
|
|
pair_set_coverage |
|
78
|
|
|
|
|
|
|
pair_set_gap |
|
79
|
|
|
|
|
|
|
pair_set_string |
|
80
|
|
|
|
|
|
|
pair_set_pretty_string |
|
81
|
|
|
|
|
|
|
pair_set_score |
|
82
|
|
|
|
|
|
|
pair_set_extend |
|
83
|
|
|
|
|
|
|
param_fx_read |
|
84
|
|
|
|
|
|
|
param_rs_read |
|
85
|
|
|
|
|
|
|
pdb_read |
|
86
|
|
|
|
|
|
|
prob_vec_info |
|
87
|
|
|
|
|
|
|
prob_vec_read |
|
88
|
|
|
|
|
|
|
prob_vec_size |
|
89
|
|
|
|
|
|
|
prob_vec_length |
|
90
|
|
|
|
|
|
|
prob_vec_copy |
|
91
|
|
|
|
|
|
|
prob_vec_write |
|
92
|
|
|
|
|
|
|
prof_aa_2_prob_vec |
|
93
|
|
|
|
|
|
|
prof_aa_strct_2_prob_vec |
|
94
|
|
|
|
|
|
|
pvec_avg |
|
95
|
|
|
|
|
|
|
ReadRescoreParam |
|
96
|
|
|
|
|
|
|
remove_seq |
|
97
|
|
|
|
|
|
|
score_mat_add |
|
98
|
|
|
|
|
|
|
score_mat_info |
|
99
|
|
|
|
|
|
|
score_mat_diag_wipe |
|
100
|
|
|
|
|
|
|
score_mat_double_matrix |
|
101
|
|
|
|
|
|
|
score_mat_write_gnuplot |
|
102
|
|
|
|
|
|
|
score_mat_new |
|
103
|
|
|
|
|
|
|
score_mat_read |
|
104
|
|
|
|
|
|
|
score_mat_scale |
|
105
|
|
|
|
|
|
|
score_mat_shift |
|
106
|
|
|
|
|
|
|
score_mat_string |
|
107
|
|
|
|
|
|
|
score_mat_sum_smpl |
|
108
|
|
|
|
|
|
|
score_mat_sum_sec |
|
109
|
|
|
|
|
|
|
score_mat_sum_full |
|
110
|
|
|
|
|
|
|
score_mat_write |
|
111
|
|
|
|
|
|
|
sec_s_data_read |
|
112
|
|
|
|
|
|
|
sec_s_data_string |
|
113
|
|
|
|
|
|
|
seq_from_string |
|
114
|
|
|
|
|
|
|
seq_get_1 |
|
115
|
|
|
|
|
|
|
seq_num |
|
116
|
|
|
|
|
|
|
seq_print_many |
|
117
|
|
|
|
|
|
|
seq_print |
|
118
|
|
|
|
|
|
|
seq_read |
|
119
|
|
|
|
|
|
|
seq_read_many |
|
120
|
|
|
|
|
|
|
seq_size |
|
121
|
|
|
|
|
|
|
seqprof_get_seq |
|
122
|
|
|
|
|
|
|
seqprof_str |
|
123
|
|
|
|
|
|
|
scor_set_fromvec |
|
124
|
|
|
|
|
|
|
scor_set_scale |
|
125
|
|
|
|
|
|
|
scor_set_simpl |
|
126
|
|
|
|
|
|
|
scor_set_to_vec |
|
127
|
|
|
|
|
|
|
score_fx |
|
128
|
|
|
|
|
|
|
score_fx_prof |
|
129
|
|
|
|
|
|
|
score_prof_prof |
|
130
|
|
|
|
|
|
|
score_pvec |
|
131
|
|
|
|
|
|
|
score_rs |
|
132
|
|
|
|
|
|
|
score_sec |
|
133
|
|
|
|
|
|
|
score_smat |
|
134
|
|
|
|
|
|
|
score_sprof |
|
135
|
|
|
|
|
|
|
str_to_class |
|
136
|
|
|
|
|
|
|
strct_2_prob_vec |
|
137
|
|
|
|
|
|
|
struct_2_prob_vec |
|
138
|
|
|
|
|
|
|
sub_mat_read |
|
139
|
|
|
|
|
|
|
sub_mat_string |
|
140
|
|
|
|
|
|
|
sub_mat_shift |
|
141
|
|
|
|
|
|
|
sub_mat_scale |
|
142
|
|
|
|
|
|
|
sub_mat_get_by_c |
|
143
|
|
|
|
|
|
|
sub_mat_get_by_i |
|
144
|
|
|
|
|
|
|
sub_mat_set_by_c |
|
145
|
|
|
|
|
|
|
sub_mat_set_by_i |
|
146
|
|
|
|
|
|
|
wurstli_hello |
|
147
|
|
|
|
|
|
|
$EXT_LONG |
|
148
|
|
|
|
|
|
|
$EXT_SHORT |
|
149
|
|
|
|
|
|
|
$N_AND_W |
|
150
|
|
|
|
|
|
|
$S_AND_W |
|
151
|
|
|
|
|
|
|
); |
|
152
|
|
|
|
|
|
|
$VERSION = '0.01'; |
|
153
|
2
|
|
|
2
|
|
12
|
use vars qw($EXT_LONG $EXT_SHORT $N_AND_W $S_AND_W); |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
252
|
|
|
154
|
|
|
|
|
|
|
*EXT_LONG = \0; |
|
155
|
|
|
|
|
|
|
*EXT_SHORT = \1; |
|
156
|
|
|
|
|
|
|
*N_AND_W = \0; |
|
157
|
|
|
|
|
|
|
*S_AND_W = \1; |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
bootstrap Wurst $VERSION; |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
# Preloaded methods go here. |
|
162
|
|
|
|
|
|
|
sub END { |
|
163
|
2
|
|
|
2
|
|
10439
|
free_scratch(); |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
2
|
|
|
2
|
|
16
|
use strict; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
776
|
|
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
# ----------------------- score_mat_sum_smpl ------------------------ |
|
169
|
|
|
|
|
|
|
# OK Mr Smartypants. There are two very nasty tricks here. |
|
170
|
|
|
|
|
|
|
# 1. The first argument will be modified. $rmat is a matrix to be |
|
171
|
|
|
|
|
|
|
# passed back to the interpreter. |
|
172
|
|
|
|
|
|
|
# 2. On calling the score_m.. function, we pass in $$rmat, not $rmat. |
|
173
|
|
|
|
|
|
|
# After exiting, $rmat will have been mutated into the correct class. |
|
174
|
|
|
|
|
|
|
# More tricks |
|
175
|
|
|
|
|
|
|
# * The C code expects some float arrays, but usually we do not |
|
176
|
|
|
|
|
|
|
# want to use this feature. The magic below with the $null variable |
|
177
|
|
|
|
|
|
|
# is simply to pass NULL pointers to the C code. |
|
178
|
|
|
|
|
|
|
# * The last arguement is a "pair_set" - the result of a previous |
|
179
|
|
|
|
|
|
|
# alignment calculation. It is optional, hence the two versions of |
|
180
|
|
|
|
|
|
|
# of the call. |
|
181
|
|
|
|
|
|
|
sub score_mat_sum_smpl (\$ $ $ $ $ $ $; $) |
|
182
|
|
|
|
|
|
|
{ |
|
183
|
1
|
|
|
1
|
0
|
4564063
|
my ($rmat, $scores, $pgap_open, $pgap_widen, $qgap_open, $qgap_widen, |
|
184
|
|
|
|
|
|
|
$align_type, $bias_set) = @_; |
|
185
|
1
|
|
|
|
|
5
|
my $null = 0; |
|
186
|
1
|
|
|
|
|
8
|
bless (\$null, 'floatPtr'); |
|
187
|
1
|
|
|
|
|
4
|
my $ret; |
|
188
|
1
|
50
|
|
|
|
12
|
if ( ! defined ($bias_set)) { |
|
189
|
1
|
|
|
|
|
40014
|
$ret = |
|
190
|
|
|
|
|
|
|
score_mat_sum_full ($$rmat, $scores, $pgap_open, $pgap_widen, |
|
191
|
|
|
|
|
|
|
$qgap_open, $qgap_widen, \$null, \$null, |
|
192
|
|
|
|
|
|
|
$align_type); |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
} else { |
|
195
|
0
|
|
|
|
|
0
|
$ret = |
|
196
|
|
|
|
|
|
|
score_mat_sum_full ($$rmat, $scores, $pgap_open, $pgap_widen, |
|
197
|
|
|
|
|
|
|
$qgap_open, $qgap_widen, \$null, \$null, |
|
198
|
|
|
|
|
|
|
$align_type, $bias_set); |
|
199
|
|
|
|
|
|
|
} |
|
200
|
1
|
|
|
|
|
29
|
return $ret; |
|
201
|
|
|
|
|
|
|
} |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
# ----------------------- wurstli_hello ------------------------ |
|
205
|
|
|
|
|
|
|
sub wurstli_hello |
|
206
|
|
|
|
|
|
|
{ |
|
207
|
0
|
|
|
0
|
0
|
|
print "wurstli wurstli\n"; |
|
208
|
|
|
|
|
|
|
} |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
# ----------------------- score_mat_sum_sec ------------------------ |
|
211
|
|
|
|
|
|
|
sub score_mat_sum_sec ($ $ $ $ $ $ $ $ $; $) |
|
212
|
|
|
|
|
|
|
{ |
|
213
|
0
|
|
|
0
|
0
|
|
my ($rmat, $scores, $coord, $sec_pnlty, |
|
214
|
|
|
|
|
|
|
$pgap_open, $pgap_widen, $qgap_open, $qgap_widen, |
|
215
|
|
|
|
|
|
|
$align_type, $bias_set) = @_; |
|
216
|
0
|
|
|
|
|
|
my $null = 0; |
|
217
|
0
|
|
|
|
|
|
bless (\$null, 'floatPtr'); |
|
218
|
|
|
|
|
|
|
|
|
219
|
0
|
0
|
|
|
|
|
if (! defined ($sec_pnlty)) { |
|
220
|
0
|
|
|
|
|
|
print STDERR "score_mat_sum_sec: called with \"sec_pnlty\" undef\n"; |
|
221
|
0
|
|
|
|
|
|
print STDERR "score_mat_sum_sec: setting to 1.0\n"; |
|
222
|
0
|
|
|
|
|
|
$sec_pnlty = 1; |
|
223
|
|
|
|
|
|
|
} |
|
224
|
0
|
|
|
|
|
|
my $mult = coord_2_pnlty ($coord, $sec_pnlty); |
|
225
|
0
|
|
|
|
|
|
my $ret; |
|
226
|
0
|
0
|
|
|
|
|
if ( ! defined ($bias_set)) { |
|
227
|
0
|
|
|
|
|
|
$ret = |
|
228
|
|
|
|
|
|
|
score_mat_sum_full ($rmat, $scores, $pgap_open, $pgap_widen, |
|
229
|
|
|
|
|
|
|
$qgap_open, $qgap_widen, $mult, \$null, |
|
230
|
|
|
|
|
|
|
$align_type); |
|
231
|
|
|
|
|
|
|
} else { |
|
232
|
0
|
|
|
|
|
|
$ret = |
|
233
|
|
|
|
|
|
|
score_mat_sum_full ($rmat, $scores, $pgap_open, $pgap_widen, |
|
234
|
|
|
|
|
|
|
$qgap_open, $qgap_widen, $mult, \$null, |
|
235
|
|
|
|
|
|
|
$align_type, $bias_set); |
|
236
|
|
|
|
|
|
|
} |
|
237
|
0
|
|
|
|
|
|
return $ret; |
|
238
|
|
|
|
|
|
|
} |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
1; |
|
244
|
|
|
|
|
|
|
__END__ |