| Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
use Bio::Tools::Analysis::Protein::Mitoprot;
use Bio::PrimarySeq; my $seq = new Bio::PrimarySeq (-seq=>'IKLCVHHJHJHJHJHJHJHNLAILAKAHLIELALAL', -primary_id=>'test'); # a Bio::PrimarySeqI object my $mitoprot = Bio::Tools::Analysis::Protein::Mitoprot->new ( -seq => $seq ); # sequence must be >!5aa long and start with an M. # run Mitoprot prediction on a DNA sequence my $mitoprot->run(); die "Could not get a result" unless $mitoprot->status =~ /^COMPLETED/; print $mitoprot->result; # print raw prediction to STDOUT foreach my $feat ( $mitoprot->result('Bio::SeqFeatureI') ) { # do something to SeqFeature # e.g. print as GFF print $feat->gff_string, "\n"; # or store within the sequence - if it is a Bio::RichSeqI $seq->add_SeqFeature($feat); }
my $rawdata = $analysis_object->result;
my $data_ref = $analysis_object->result('parsed'); print "predicted
export prob is $data_ref->{'export_prob'}\n"; #
key values of returned hash are input_length, basic_aas, acidic_aas,my $ft = $analysis_object->result(Bio::SeqFeatureI);This the second implentation of Bio::SimpleAnalysisI which hopefully
print "export prob is ", ($ft->each_tag_value('export_prob'))[0] ,"\n";
| result | Description | Code |
| _init | No description | Code |
| _process_arguments | No description | Code |
| _run | No description | Code |
| result | code | next | Top |
Usage : $job->result (...)The method returns a result of an executed job. If the job was terminated by an error the result may contain an error message instead of the real data. This implementation returns differently processed data depending on argument: undef Returns the raw ASCII data stream but without HTML tags 'Bio::SeqFeatureI' The argument string defines the type of bioperl objects returned in anarray. The objects are Bio::SeqFeature::Generic. Feature primary tag is "SigSeq". Feature tags are input_length , basic_aas, acidic_aas, export_prob, charge, cleavage_site, method. 'parsed' hash references of parsed results { input_length =>, basic_aas=>,acidic_aas=>, export_prob=>, charge=>, cleavage_site=>}. |
| result | description | prev | next | Top |
my ($self,$value) = @_; #make sec feat of above threshold scores #}
my @sig_pdctns; my @fts; if ($value ) { my $result = IO::String->new($self->{'_result'}); my %results; while (my $line = <$result>) { #make array of all scores or threshold depending on $value
next unless $line =~ /\d/ || $line =~ /^Cle/; if ($line =~ /^Net[^+\-\d]+ # Net, then anything except +,- or digit
((\+|-)?\d+)/x) #then get charge with optional + or -
{ $results{'charge'} = $1; } elsif ($line =~ /^Input[^\d]+(\d+)/ ) { $results{'input_length'} = $1; } elsif ($line =~ /basic[^\d]+(\d+)$/ ) { $results{'basic_aas'} = $1; } elsif ($line =~ /acidic[^\d]+(\d+)$/) { $results{'acidic_aas'} = $1; } elsif ($line =~ /^Cleavage[^\d]+(\d+)$/) { $results{'cleavage_site'} = $1; } elsif ($line =~ /^Cleavage/) { $results{'cleavage_site'} = 'not predictable'; } elsif ($line =~ /^of export[^\d]+((0|1)\.\d+)$/) { $results{'export_prob'} = $1; } } if ($value eq 'Bio::SeqFeatureI') { push @fts, Bio::SeqFeature::Generic->new ( -start => 1, -end => ($results{'cleavage_site'} =~ /^\d+$/)?$results{'cleavage_site'}:$self->seq->length, -source => 'Mitoprot', -primary => 'Region', -tag =>{ export_prob => $results{'export_prob'}, charge => $results{'charge'}, basic_aas => $results{'basic_aas'}, acid_aas => $results{'acidic_aas'}, region_name => 'Transit_peptide', method => 'MitoProt', cleavage_site => $results{'cleavage_site'}, }, ); return @fts; #return Bioseqfeature array
} ## convert parsed data into a meta array format
else { return\% results; # hash based results ref
} } return $self->{'_result'};
| _init | description | prev | next | Top |
my $self = shift; $self->url($URL); $self->{'_ANALYSIS_SPEC'} =$ANALYSIS_SPEC; $self->{'_INPUT_SPEC'} =$INPUT_SPEC; $self->{'_RESULT_SPEC'} =$RESULT_SPEC; $self->{'_ANALYSIS_NAME'} =$ANALYSIS_SPEC->{'name'}; return $self;}
| _process_arguments | description | prev | next | Top |
#extra checking for sequence length}
#mitoprot specific argument testing
my ($self, $args) = @_; #use base checking for existence of mandatory fields
$self->SUPER::_process_arguments($args) ; #then check specifics
$self->throw ("1st_aa must be M") if $self->seq->subseq(1,1) !~ /M/i; $self->throw ("sequence must be at least 15aa long") if $self->seq->length< 15; return;
| _run | description | prev | next | Top |
#request submitted by get not by post}
my $self = shift; $self->delay(1); $self->sleep; $self->status('TERMINATED_BY_ERROR'); my $url = $self->url . "seq=".lc($self->seq->seq). "&seqnam="; my $request = GET $url; my $content = $self->request($request); my $text = $content->content; #1st reponse
#remove html stuff
$text =~ s/.*<PRE>(.*)<\/PRE>.*/$1/s; $text =~ s/<[^>]+>//sg; $self->status('COMPLETED') if $text ne '' && $self->seq->length > $MIN_LEN; $self->{'_result'} = $text;
| SEE ALSO | Top |
| FEEDBACK | Top |
| Mailing Lists | Top |
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
| Reporting Bugs | Top |
http://bugzilla.open-bio.org/
| AUTHORS | Top |
| APPENDIX | Top |