line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Bioperl module for TargetP |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Please direct questions and support issues to |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Cared for by Emmanuel Quevillon |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Bio::Tools::TargetP - Results of one TargetP run |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use Bio::Tools::TargetP; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
#filename for TargetP result : |
21
|
|
|
|
|
|
|
$targetp = Bio::Tools::TargetP->new(-file => 'targetp.out'); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# filehandle for TargetP : |
24
|
|
|
|
|
|
|
$targetp = Bio::Tools::TargetP->new( -fh => \*INPUT ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
### targetp v1.1 prediction results ################################## |
27
|
|
|
|
|
|
|
#Number of query sequences: 11 |
28
|
|
|
|
|
|
|
#Cleavage site predictions included. |
29
|
|
|
|
|
|
|
#Using NON-PLANT networks. |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
#Name Len mTP SP other Loc RC TPlen |
32
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
33
|
|
|
|
|
|
|
#swall|Q9LIP3|C72Y_AR 500 0.245 0.935 0.009 S 2 22 |
34
|
|
|
|
|
|
|
#swall|Q52813|AAPQ_RH 400 0.170 0.462 0.577 _ 5 - |
35
|
|
|
|
|
|
|
#swall|O86459|AAT_RHI 400 0.346 0.046 0.660 _ 4 - |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# parse the results |
40
|
|
|
|
|
|
|
while($feature = $targetp->next_prediction()) { |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#$feature is a Bio::SeqFeature::Generic object |
43
|
|
|
|
|
|
|
my $method = $targetp->analysis_method(); |
44
|
|
|
|
|
|
|
my $vesion = $targetp->analysis_method_version() || $feature->source(); |
45
|
|
|
|
|
|
|
my $seqid = $feature->seq_id(); |
46
|
|
|
|
|
|
|
# ... |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# essential if you gave a filename at initialization (otherwise the file |
50
|
|
|
|
|
|
|
# will stay open) |
51
|
|
|
|
|
|
|
$targetp->close(); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
TargetP modules will provides parsed information about protein |
56
|
|
|
|
|
|
|
localization. It reads in a targetp output file. It parses the |
57
|
|
|
|
|
|
|
results, and returns a Bio::SeqFeature::Generic object for each |
58
|
|
|
|
|
|
|
seqeunces found to have a subcellular localization |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 FEEDBACK |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 Mailing Lists |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
User feedback is an integral part of the evolution of this and other |
65
|
|
|
|
|
|
|
Bioperl modules. Send your comments and suggestions preferably to |
66
|
|
|
|
|
|
|
the Bioperl mailing list. Your participation is much appreciated. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
69
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 Support |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
I |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
rather than to the module maintainer directly. Many experienced and |
78
|
|
|
|
|
|
|
reponsive experts will be able look at the problem and quickly |
79
|
|
|
|
|
|
|
address it. Please include a thorough description of the problem |
80
|
|
|
|
|
|
|
with code and data examples if at all possible. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 Reporting Bugs |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Report bugs to the Bioperl bug tracking system to help us keep track |
85
|
|
|
|
|
|
|
of the bugs and their resolution. Bug reports can be submitted via |
86
|
|
|
|
|
|
|
the web: |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
https://github.com/bioperl/bioperl-live/issues |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 AUTHORS - Emmanuel Quevillon |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Email emmanuel.quevillon@versailles.inra.fr |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Describe contact details here |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 APPENDIX |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
99
|
|
|
|
|
|
|
Internal methods are usually preceded with a _ |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# Let the code begin... |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
package Bio::Tools::TargetP; |
108
|
1
|
|
|
1
|
|
437
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
109
|
1
|
|
|
1
|
|
226
|
use Bio::Tools::AnalysisResult; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
110
|
1
|
|
|
1
|
|
288
|
use Bio::SeqFeature::Generic; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
111
|
1
|
|
|
1
|
|
6
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
112
|
|
|
|
|
|
|
|
113
|
1
|
|
|
1
|
|
6
|
use base qw(Bio::Tools::AnalysisResult); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
923
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
#Definition of 'Loc' field according to http://www.cbs.dtu.dk/services/TargetP/output.php |
117
|
|
|
|
|
|
|
my $MAPLOC = { |
118
|
|
|
|
|
|
|
'S' => 'Secretory pathway', |
119
|
|
|
|
|
|
|
'M' => 'Mitochondrion', |
120
|
|
|
|
|
|
|
'C' => 'Chloroplast', |
121
|
|
|
|
|
|
|
'_' => 'Any other', |
122
|
|
|
|
|
|
|
'*' => 'Unknown', |
123
|
|
|
|
|
|
|
'?' => 'Unknown', |
124
|
|
|
|
|
|
|
}; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 analysis_method |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Usage : $self->analysis_method(); |
130
|
|
|
|
|
|
|
Purpose : Inherited method. Overridden to ensure that the name matches |
131
|
|
|
|
|
|
|
Returns : String |
132
|
|
|
|
|
|
|
Argument : n/a |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
sub analysis_method { |
137
|
|
|
|
|
|
|
|
138
|
16
|
|
|
16
|
1
|
23
|
my ($self, $method) = @_; |
139
|
|
|
|
|
|
|
|
140
|
16
|
50
|
66
|
|
|
31
|
if($method && ($method !~ /TargetP/i)) { |
141
|
0
|
|
|
|
|
0
|
$self->throw("method $method not supported in " . ref($self)); |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
16
|
|
|
|
|
34
|
return $self->SUPER::analysis_method($method); |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 network |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Title : network |
150
|
|
|
|
|
|
|
Usage : $self->network($network) |
151
|
|
|
|
|
|
|
Function: This method Get/Set the network used for the analysis (PLANT or NON-PLANT) |
152
|
|
|
|
|
|
|
Example : |
153
|
|
|
|
|
|
|
Returns : string |
154
|
|
|
|
|
|
|
Arguments: On set, the network used |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=cut |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
sub network { |
159
|
|
|
|
|
|
|
|
160
|
33
|
|
|
33
|
0
|
42
|
my($self, $net) = @_; |
161
|
|
|
|
|
|
|
|
162
|
33
|
100
|
|
|
|
45
|
if(defined($net)){ |
163
|
2
|
|
|
|
|
3
|
$self->{'_network'} = $net; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
33
|
|
|
|
|
64
|
return $self->{'_network'}; |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 cleavage |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Title : cleavage |
174
|
|
|
|
|
|
|
Usage : $self->cleavage($cleavage) |
175
|
|
|
|
|
|
|
Function : This method Get/Set if SignalP program was used to run TargetP |
176
|
|
|
|
|
|
|
Example : |
177
|
|
|
|
|
|
|
Returns : 1 or 0 |
178
|
|
|
|
|
|
|
Arguments: On set, the cleavage used or not |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=cut |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub cleavage { |
183
|
|
|
|
|
|
|
|
184
|
2
|
|
|
2
|
0
|
5
|
my($self, $cleavage) = @_; |
185
|
|
|
|
|
|
|
|
186
|
2
|
50
|
|
|
|
4
|
if(defined($cleavage)){ |
187
|
2
|
50
|
|
|
|
5
|
$self->{'_cleavage'} = $cleavage =~ /not included/ ? '0' : '1'; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
2
|
|
|
|
|
4
|
return $self->{'_cleavage'}; |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head1 next_prediction |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Usage : $targetp->next_prediction() |
198
|
|
|
|
|
|
|
Purpose : Returns the next TargetP prediction |
199
|
|
|
|
|
|
|
Returns : A Bio::SeqFeature::Generic object |
200
|
|
|
|
|
|
|
Arguments: n/a |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=cut |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
sub next_prediction { |
205
|
|
|
|
|
|
|
|
206
|
16
|
|
|
16
|
0
|
28
|
my($self) = @_; |
207
|
|
|
|
|
|
|
|
208
|
16
|
100
|
|
|
|
22
|
unless($self->_parsed()){ |
209
|
1
|
|
|
|
|
3
|
$self->_parse_results(); |
210
|
1
|
|
|
|
|
17
|
$self->_parsed(1); |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
16
|
|
100
|
|
|
17
|
return shift @{$self->{'_features'}} || undef; |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head1 create_feature |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
Title : create_feature |
219
|
|
|
|
|
|
|
Usage : $self->create_feature(\%hash); |
220
|
|
|
|
|
|
|
Function : This method creates a new Bio::SeqFeature::Generic object |
221
|
|
|
|
|
|
|
Example : |
222
|
|
|
|
|
|
|
Returns : Bio::SeqFeature::Generic |
223
|
|
|
|
|
|
|
Arguments : hash reference |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=cut |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub create_feature { |
228
|
|
|
|
|
|
|
|
229
|
15
|
|
|
15
|
0
|
19
|
my($self, $feat) = @_; |
230
|
|
|
|
|
|
|
|
231
|
15
|
50
|
33
|
|
|
46
|
$self->throw("Need a reference to hash table") unless($feat && ref($feat) eq 'HASH'); |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
my $feature = Bio::SeqFeature::Generic->new( |
234
|
|
|
|
|
|
|
-seq_id => $feat->{seqid}, |
235
|
15
|
|
|
|
|
26
|
-source_tag => $self->analysis_method(), |
236
|
|
|
|
|
|
|
-primary_tag => 'signal_peptide', #Sequence Ontology compliant |
237
|
|
|
|
|
|
|
-strand => '+', |
238
|
|
|
|
|
|
|
); |
239
|
|
|
|
|
|
|
|
240
|
15
|
50
|
|
|
|
30
|
if(defined($feat->{seqlen})){ |
241
|
15
|
|
|
|
|
27
|
$feature->start(1); |
242
|
15
|
|
|
|
|
48
|
$feature->end($feat->{seqlen}); |
243
|
|
|
|
|
|
|
} |
244
|
15
|
50
|
|
|
|
51
|
$feature->add_tag_value('location', $MAPLOC->{$feat->{loc}}) if(exists($MAPLOC->{$feat->{loc}})); |
245
|
15
|
50
|
|
|
|
28
|
$feature->add_tag_value('chloroplastCutOff', $feat->{cTP}) if(defined($feat->{cTP})); |
246
|
15
|
50
|
|
|
|
33
|
$feature->add_tag_value('mitochondrionCutOff', $feat->{mTP}) if(defined($feat->{mTP})); |
247
|
15
|
50
|
|
|
|
35
|
$feature->add_tag_value('signalPeptideCutOff', $feat->{SP}) if(defined($feat->{SP})); |
248
|
15
|
50
|
|
|
|
37
|
$feature->add_tag_value('otherCutOff', $feat->{other}) if(defined($feat->{other})); |
249
|
15
|
50
|
|
|
|
34
|
$feature->add_tag_value('reliabilityClass', $feat->{RC}) if(defined($feat->{RC})); |
250
|
15
|
100
|
|
|
|
29
|
$feature->add_tag_value('signalPeptideLength', $feat->{TPLen}) if(defined($feat->{TPLen})); |
251
|
|
|
|
|
|
|
|
252
|
15
|
|
|
|
|
23
|
$feature->add_tag_value('network', $self->network()); |
253
|
|
|
|
|
|
|
|
254
|
15
|
|
|
|
|
25
|
return $feature; |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=head2 PRIVATE METHODS |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=cut |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=head2 _initialize_state |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
Title : _initialize_state |
266
|
|
|
|
|
|
|
Usage : n/a; usually called by _initialize() itself called by new() |
267
|
|
|
|
|
|
|
Function: This method is supposed to reset the state such that any 'history' |
268
|
|
|
|
|
|
|
is lost. State information that does not change during object |
269
|
|
|
|
|
|
|
lifetime is not considered as history, e.g. parent, name, etc shall |
270
|
|
|
|
|
|
|
not be reset. An inheriting object should only be concerned with |
271
|
|
|
|
|
|
|
state information it introduces itself, and for everything else |
272
|
|
|
|
|
|
|
call SUPER::_initialize_state(@args). |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
The argument syntax is the same as for new() and _initialize(), |
275
|
|
|
|
|
|
|
i.e., named parameters following the -name=>$value convention. |
276
|
|
|
|
|
|
|
The following parameters are dealt with by the implementation |
277
|
|
|
|
|
|
|
provided here: |
278
|
|
|
|
|
|
|
-INPUT, -FH, -FILE |
279
|
|
|
|
|
|
|
(tags are case-insensitive). |
280
|
|
|
|
|
|
|
Example : |
281
|
|
|
|
|
|
|
Returns : |
282
|
|
|
|
|
|
|
Args : |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=cut |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub _initialize_state { |
287
|
|
|
|
|
|
|
|
288
|
1
|
|
|
1
|
|
3
|
my ($self,@args,) = @_; |
289
|
|
|
|
|
|
|
# first call the inherited method! |
290
|
1
|
|
|
|
|
5
|
$self->SUPER::_initialize_state(@args); |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
# our private state variables |
293
|
1
|
|
|
|
|
2
|
$self->{'_features'} = [ ]; |
294
|
1
|
|
|
|
|
2
|
$self->{'_parameters'} = undef; |
295
|
1
|
|
|
|
|
1
|
$self->{'_format'} = undef; |
296
|
1
|
|
|
|
|
2
|
$self->{'_network'} = undef; |
297
|
1
|
|
|
|
|
2
|
$self->{'_cleavage'} = undef; |
298
|
1
|
|
|
|
|
14
|
$self->{'_parsed'} = 0; |
299
|
|
|
|
|
|
|
|
300
|
1
|
|
|
|
|
4
|
$self->analysis_method('TargetP'); |
301
|
|
|
|
|
|
|
|
302
|
1
|
|
|
|
|
2
|
return 1; |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
=head2 _predictions |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
Usage : $targetp->_prediction() |
308
|
|
|
|
|
|
|
Purpose : Returns the number of TargetP predictions |
309
|
|
|
|
|
|
|
Returns : A scalar (number) |
310
|
|
|
|
|
|
|
Arguments: n/a |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
=cut |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
sub _predictions { |
315
|
|
|
|
|
|
|
|
316
|
0
|
|
|
0
|
|
0
|
my($self) = @_; |
317
|
|
|
|
|
|
|
|
318
|
0
|
|
0
|
|
|
0
|
return scalar(@{$self->{'_features'}}) || 0; |
319
|
|
|
|
|
|
|
} |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
=head2 _parsed |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
Title : _parsed |
325
|
|
|
|
|
|
|
Usage : $targetp->_parsed(1) |
326
|
|
|
|
|
|
|
Function : This method is used to know if the output result is parsed or not |
327
|
|
|
|
|
|
|
For internal use only |
328
|
|
|
|
|
|
|
Example : |
329
|
|
|
|
|
|
|
Returns : 1/0 |
330
|
|
|
|
|
|
|
Arguments : 1/0 for setting |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=cut |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
sub _parsed { |
335
|
|
|
|
|
|
|
|
336
|
17
|
|
|
17
|
|
25
|
my($self, $value) = @_; |
337
|
|
|
|
|
|
|
|
338
|
17
|
100
|
|
|
|
25
|
if(defined($value)){ |
339
|
1
|
|
|
|
|
1
|
$self->{'_parsed'} = $value; |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
17
|
|
|
|
|
33
|
return $self->{'_parsed'}; |
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=head2 _parse_results |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
Title : _parse_results |
350
|
|
|
|
|
|
|
Usage : $self->_parse_results() |
351
|
|
|
|
|
|
|
Function : This method parses a TargetP output |
352
|
|
|
|
|
|
|
For internal use only |
353
|
|
|
|
|
|
|
Example : |
354
|
|
|
|
|
|
|
Returns : n/a |
355
|
|
|
|
|
|
|
Arguments: none |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=cut |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
sub _parse_results { |
360
|
|
|
|
|
|
|
|
361
|
2
|
|
|
2
|
|
447
|
my($self) = @_; |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
### targetp v1.1 prediction results ################################## |
365
|
|
|
|
|
|
|
#Number of query sequences: 11 |
366
|
|
|
|
|
|
|
#Cleavage site predictions included. |
367
|
|
|
|
|
|
|
#Using NON-PLANT networks. |
368
|
|
|
|
|
|
|
# |
369
|
|
|
|
|
|
|
#Name Len mTP SP other Loc RC TPlen |
370
|
|
|
|
|
|
|
#---------------------------------------------------------------------- |
371
|
|
|
|
|
|
|
#swall|Q9LIP3|C72Y_AR 500 0.245 0.935 0.009 S 2 22 |
372
|
|
|
|
|
|
|
#swall|Q52813|AAPQ_RH 400 0.170 0.462 0.577 _ 5 - |
373
|
|
|
|
|
|
|
#swall|O86459|AAT_RHI 400 0.346 0.046 0.660 _ 4 - |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
|
376
|
2
|
|
|
|
|
10
|
while(defined(my $line = $self->_readline())){ |
377
|
|
|
|
|
|
|
|
378
|
15
|
100
|
|
|
|
60
|
if($line =~ /targetp (v[\d\.]+)/){ |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
379
|
|
|
|
|
|
|
|
380
|
2
|
|
|
|
|
10
|
$self->analysis_method_version($1); |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
}elsif($line =~ /Cleavage site predictions (.*)/){ |
383
|
|
|
|
|
|
|
|
384
|
2
|
|
|
|
|
5
|
$self->cleavage($1); |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
}elsif($line =~ /Using (\S+) networks/){ |
387
|
|
|
|
|
|
|
|
388
|
2
|
|
|
|
|
4
|
$self->network($1); |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
}elsif($line =~ /^Name/){ |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
#We skip the next line which is '------------------' |
393
|
2
|
|
|
|
|
4
|
$self->_readline(); |
394
|
|
|
|
|
|
|
|
395
|
2
|
|
|
|
|
4
|
my $hash = { }; |
396
|
|
|
|
|
|
|
|
397
|
2
|
|
|
|
|
3
|
while(defined(my $line = $self->_readline())){ |
398
|
|
|
|
|
|
|
|
399
|
17
|
100
|
|
|
|
37
|
last if($line =~ /^----/); |
400
|
|
|
|
|
|
|
|
401
|
15
|
|
|
|
|
21
|
my $hash = $self->_parse_line($line); |
402
|
|
|
|
|
|
|
|
403
|
15
|
|
|
|
|
21
|
my $new_feature = $self->create_feature($hash); |
404
|
|
|
|
|
|
|
|
405
|
15
|
|
|
|
|
20
|
$self->_add_feature($new_feature); |
406
|
|
|
|
|
|
|
} |
407
|
|
|
|
|
|
|
} |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
2
|
|
|
|
|
4
|
return; |
411
|
|
|
|
|
|
|
} |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head2 _parse_line |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
Title : _parse_line |
416
|
|
|
|
|
|
|
Usage : $self->_parse_line($line) |
417
|
|
|
|
|
|
|
Function : This method parses the line result |
418
|
|
|
|
|
|
|
For internal use only |
419
|
|
|
|
|
|
|
Example : |
420
|
|
|
|
|
|
|
Returns : Hash reference |
421
|
|
|
|
|
|
|
Arguemnts: line to parse |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=cut |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
sub _parse_line { |
426
|
|
|
|
|
|
|
|
427
|
15
|
|
|
15
|
|
19
|
my($self, $line) = @_; |
428
|
|
|
|
|
|
|
|
429
|
15
|
50
|
|
|
|
23
|
$self->throw("No line to parse given") unless($line); |
430
|
|
|
|
|
|
|
|
431
|
15
|
|
|
|
|
19
|
my $hash = { }; |
432
|
15
|
|
|
|
|
17
|
my ($seqid, $seqlen, $cTP, $mTP, $SP, $other, $loc, $RC, $TPlen); |
433
|
|
|
|
|
|
|
|
434
|
15
|
50
|
|
|
|
18
|
if($self->network() eq 'NON-PLANT'){ |
435
|
|
|
|
|
|
|
|
436
|
15
|
|
|
|
|
97
|
($seqid, $seqlen, $mTP, $SP, $other, $loc, $RC, $TPlen) = split(/\s+/, $line); |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
}else{ |
439
|
|
|
|
|
|
|
|
440
|
0
|
|
|
|
|
0
|
($seqid, $seqlen, $cTP, $mTP, $SP, $other, $loc, $RC, $TPlen) = split(/\s+/, $line); |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
|
444
|
15
|
|
|
|
|
32
|
$hash->{seqid} = $seqid; |
445
|
15
|
|
|
|
|
22
|
$hash->{seqlen} = $seqlen; |
446
|
15
|
|
50
|
|
|
34
|
$hash->{cTP} = $cTP || undef; |
447
|
15
|
|
|
|
|
19
|
$hash->{mTP} = $mTP; |
448
|
15
|
|
|
|
|
18
|
$hash->{SP} = $SP; |
449
|
15
|
|
|
|
|
17
|
$hash->{other} = $other; |
450
|
15
|
|
|
|
|
16
|
$hash->{loc} = $loc; |
451
|
15
|
|
|
|
|
26
|
$hash->{RC} = $RC; |
452
|
15
|
100
|
66
|
|
|
49
|
$hash->{TPLen} = ($TPlen && $TPlen =~ /\d+/) ? $TPlen : undef; |
453
|
|
|
|
|
|
|
|
454
|
15
|
|
|
|
|
25
|
return $hash; |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
} |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
=head2 _add_feature |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
Title : _add_feature |
461
|
|
|
|
|
|
|
Usage : $self->_add_feature($feature) |
462
|
|
|
|
|
|
|
Function : This method stores a feature object |
463
|
|
|
|
|
|
|
For internal use only |
464
|
|
|
|
|
|
|
Example : |
465
|
|
|
|
|
|
|
Returns : n/a |
466
|
|
|
|
|
|
|
Arguments: Bio::SeqFeature::Generic |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=cut |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
sub _add_feature { |
471
|
|
|
|
|
|
|
|
472
|
15
|
|
|
15
|
|
20
|
my($self, $feature) = @_; |
473
|
|
|
|
|
|
|
|
474
|
15
|
50
|
|
|
|
43
|
$self->throw("Need a Bio::SeqFeature::Generic object") unless $feature->isa("Bio::SeqFeature::Generic"); |
475
|
|
|
|
|
|
|
|
476
|
15
|
|
|
|
|
16
|
push(@{$self->{'_features'}}, $feature); |
|
15
|
|
|
|
|
22
|
|
477
|
|
|
|
|
|
|
|
478
|
15
|
|
|
|
|
58
|
return; |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
} |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
=head2 _toString_location |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
Title : _toString_location |
485
|
|
|
|
|
|
|
Usage : $self->_toString_location($key) |
486
|
|
|
|
|
|
|
Function : This method convert the 'one letter code' location to |
487
|
|
|
|
|
|
|
the corresponding definition |
488
|
|
|
|
|
|
|
For internal use only |
489
|
|
|
|
|
|
|
Example : |
490
|
|
|
|
|
|
|
Returns : Location or undef |
491
|
|
|
|
|
|
|
Arguments: String |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
=cut |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
sub _toString_location { |
496
|
|
|
|
|
|
|
|
497
|
15
|
|
|
15
|
|
24
|
my($self, $key) = @_; |
498
|
|
|
|
|
|
|
|
499
|
15
|
50
|
33
|
|
|
52
|
if($key && exists($MAPLOC->{$key})){ |
500
|
15
|
|
|
|
|
51
|
return $MAPLOC->{$key}; |
501
|
|
|
|
|
|
|
} |
502
|
|
|
|
|
|
|
|
503
|
0
|
|
|
|
|
|
return; |
504
|
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
1; |