21
21
my $seq; # a Bio::PrimarySeqI object
23
23
my $tool = Bio::Tools::Analysis::Protein::Scansite->new
24
( -seq => $seq->primary_seq(),
24
( -seq => $seq->primary_seq );
27
26
# run Scansite prediction on a sequence
30
29
# alternatively you can say
31
30
$tool->seq($seq->primary_seq)->run;
49
This class is wrapper around the Scansite 2.0 server which produces
48
This class is a wrapper around the Scansite 2.0 server which produces
50
49
predictions for serine, threonine and tyrosine phosphorylation sites
51
50
in eukaryotic proteins. At present this is a basic wrapper for the
52
51
"Scan protein by input sequence" functionality, which takes a sequence
53
and searches for motifs. Optionally you can select the search
54
strincency as well. At present searches for specific phosphorylation
55
sites isn't supported, all predicted sites are returned.
57
See L<http://www.scansite.mit.edu/>.
59
This inherits Bio::SimpleAnalysisI which hopefully
60
makes it easier to write wrappers on various services. This class
61
uses a web resource and therefore inherits from Bio::WebAgent.
52
and searches for motifs, with the option to select the search
53
stringency. At present, searches for specific phosphorylation
54
sites are not supported; all predicted sites are returned.
58
The Scansite results can be obtained in several formats:
66
my $res = $tool->result('');
68
$res holds a string of the predicted sites in tabular format.
74
my $data_ref = $tool->result('value')
76
$data_ref is a reference to an array of hashes. Each element in the
77
array represents a predicted phosphorylation site. The hash keys are
78
the names of the data fields,i.e.,
80
'motif' => 'Casn_Kin1' # name of kinase
81
'percentile' => 0.155 # see Scansite docs
82
'position' => 9 # position in protein
83
'protein' => 'A1' # protein id
84
'score' => 0.3696 # see Scansite docs
85
'sequence' => 'ASYFDTASYFSADAT' # sequence surrounding site
86
'site' => 'S9' # phosphorylated residue
87
'zscore' => '-3.110' # see Scansite docs
93
my @fts = $tool->Result('Bio::SeqFeatureI');
95
which returns an array of L<Bio::SeqFeatureI> compliant objects with
96
primary tag value 'Site' and tag names of 'motif', 'score',
97
'sequence', 'zscore' as above.
101
See L<http://scansite.mit.edu/>.
103
This inherits Bio::SimpleAnalysisI which hopefully makes it easier to
104
write wrappers on various services. This class uses a web resource and
105
therefore inherits from L<Bio::WebAgent>.
73
117
Bioperl modules. Send your comments and suggestions preferably to one
74
118
of the Bioperl mailing lists. Your participation is much appreciated.
76
bioperl-l@bioperl.org - General discussion
77
http://bio.perl.org/MailList.html - About the mailing lists
120
bioperl-l@bioperl.org - General discussion
121
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
79
123
=head2 Reporting Bugs
81
125
Report bugs to the Bioperl bug tracking system to help us keep track
82
the bugs and their resolution. Bug reports can be submitted via email
126
the bugs and their resolution. Bug reports can be submitted via the
85
bioperl-bugs@bio.perl.org
86
http://bugzilla.bioperl.org/
129
http://bugzilla.open-bio.org/
103
146
package Bio::Tools::Analysis::Protein::Scansite;
104
use vars qw(@ISA $FLOAT @STRINGENCY );
147
use vars qw($FLOAT @STRINGENCY);
108
use HTTP::Request::Common qw (POST);
151
use HTTP::Request::Common qw(POST);
109
152
use Bio::SeqFeature::Generic;
110
use Bio::Tools::Analysis::SimpleAnalysisBase;
112
@ISA = qw(Bio::Tools::Analysis::SimpleAnalysisBase);
154
use base qw(Bio::Tools::Analysis::SimpleAnalysisBase);
114
156
$FLOAT = '[+-]?\d*\.\d*';
115
157
@STRINGENCY = qw(High Medium Low);
170
212
The method returns a scalar representing a result of an executed
171
job. If the job was terminated by an error the result
213
job. If the job was terminated by an error, the result may contain
214
an error message instead of the real data.
173
216
This implementation returns differently processed data depending on
189
232
Returns a reference to an array of hashes containing the data of one
190
phosphorylation site prediction. Key values are :
233
phosphorylation site prediction. Key values are:
192
235
motif, percentile, position, protein, score, site, zscore, sequence.
235
279
=head2 stringency
237
Usage : $job->stringency(...)
281
Usage : $job->stringency(...)
238
282
Returns : The significance stringency of a prediction
239
283
Args : None (retrieves value) or 'High', 'Medium' or 'Low'.
240
284
Purpose : Get/setter of the stringency to be sumitted for analysis.
252
296
$self->{'_stringency'} = $value;
255
return $self->{'_stringency'} || $self->input_spec->[4]{'default'} ;
299
return $self->{'_stringency'} || $self->input_spec->[2]{'default'} ;
258
302
=head2 protein_id
260
Usage : $job->protein_id(...)
304
Usage : $job->protein_id(...)
261
305
Returns : The sequence id of the protein or 'unnamed' if not set.
263
307
Purpose : Getter of the seq_id. Returns the display_id of the sequence
336
380
$self->{'_result'} = $out_Str;
337
381
$self->{'_parsed'} = \@parsed_Results;
339
## is successssful if there are results or if there are no results and
383
## is successsful if there are results or if there are no results and
340
384
## this beacuse there are no matches, not because of parsing errors etc.
341
385
$self->status('COMPLETED') if $text ne '' &&
342
386
(scalar @results > 0 ||
343
387
(scalar @results == 0 && $text =~/No sites found/));
388
if ($text =~ /server\s+error/i) {
389
$self->warn("There was an internal server error !- text below") ;
395
sub _process_arguments {
397
# extra checking for sequence length
398
# mitoprot specific argument testing
399
my ($self, $args) = @_;
400
#use base checking for existence of mandatory fields
401
$self->SUPER::_process_arguments($args);
403
# specific requirements
404
$self->throw("Sequence must be > 15 amino acids long!")
405
if $self->seq->length < 15;
406
$self->throw("Sequence must be protein")
407
unless $self->seq->alphabet() eq 'protein';
346
410
sub _make_header {