Thanks all for the help, I got it to run on the test file. I'm trying now to get it reading through a whole fasta file. But it stops after the first sequence and doesn't go through the whole file. Any idea why?

#!/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'); 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!!


In reply to Re^2: mitoprot bioperl code help by cburger
in thread mitoprot bioperl code help by cburger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.