Hi I'm new to bioperl and am trying to use the bioperl mitoprot wrapper to search protein sequences for mitochondrial target sequences. I tried the test code provided on the wiki link with Spombe fasta file. however I still have problems when it is supposed to read through a whole fasta file. it stops after the first sequence and doesn't go through the whole file. Any idea why? When I leave out the mitprot code part - and just print the id's it reads the whole file.
#!/usr/bin/perl-w
use strict;
use Bio::Tools::Analysis::Protein::Mitoprot;
use Bio::PrimarySeq; use Bio::SeqIO;
my $inputstream = Bio::SeqIO->new(-file => "myseq2.fa",-format => 'Fa
+sta');
# my $seqobj = $inputstream->next_seq();
while (my $seqobj = $inputstream->next_seq){
# print the sequence
print ">";
print $seqobj->id,"\n";
my $seq= $seqobj-> seq;
my $id= $seqobj->id;
my $seq = new Bio::PrimarySeq(-seq=>$seq, -primary_id=>$id);
my $mitoprot = Bio::Tools::Analysis::Protein::Mitoprot->new(-seq
+=> $seq); # sequence must be >!5aa long and start with an M.
$mitoprot->run();
die "Could not get a result" unless $mitoprot->status =~ /^COMPLETED
+/;
print $mitoprot->result; # print raw prediction to STDOUT
my $rawdata = my $analysis_object->result;
print "rawdata: $rawdata\n";
## ....................................................
} # close while
here is the output I get with error message :
>SPAC212.11.1
Input sequence length : 1887 aa
VALUES OF COMPUTED PARAMETERS
Net charge of query sequence : -14
Analysed region : 5
Number of basic residues in targeting sequence : 0
Number of acidic residues in targeting sequence : 0
Cleavage site : not predictable
Cleaved sequence :
HYDROPHOBIC SCALE USED
GES KD GVH1 ECS
H17 : 1.776 1.635 0.456 0.701
MesoH : -0.097 0.599 -0.205 0.261
MuHd_075 : 8.891 2.722 0.982 0.422
MuHd_095 : 40.686 26.860 12.359 9.439
MuHd_100 : 45.583 25.681 12.613 9.543
MuHd_105 : 45.113 22.080 11.556 8.739
Hmax_075 : 1.867 9.625 -1.365 2.660
Hmax_095 : 15.800 20.400 3.835 6.380
Hmax_100 : 16.000 20.300 3.835 6.190
Hmax_105 : 15.600 15.600 2.796 5.250
PROBABILITY
of export to mitochondria: 0.5284
Can't call method "result" on an undefined value at test.pl line 36, <
+GEN0> line 1.
Thanks again!