Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: mitoprot bioperl code help

by molecules (Monk)
on Mar 20, 2012 at 18:53 UTC ( #960628=note: print w/ replies, xml ) Need Help??


in reply to mitoprot bioperl code help

This much works on my machine.

use 5.008; # Require at least Perl version 5.8 use strict; # Must declare all variables before using them use warnings; # Emit helpful warnings use Bio::Tools::Analysis::Protein::Mitoprot; use Bio::PrimarySeq; my $seq = new Bio::PrimarySeq( -seq =>'MIKLCVHHJHJHJHJHJHJHNLAILAKAHLIELALAL', -primary_id=>'test', ); # a Bio::PrimarySeqI object my $mitoprot = Bio::Tools::Analysis::Protein::Mitoprot->new(-seq => $s +eq); # sequence must be >!5aa long and start with an M. # run Mitoprot prediction on amino acid sequence $mitoprot->run(); print $mitoprot->result; # print raw prediction to STDOUT 1;
It gives the following output:
Input sequence length : 31 aa


                 VALUES OF COMPUTED PARAMETERS

Net charge of query sequence                    :  +1
Analysed region                                 :  28
Number of basic residues in targeting sequence  :   2
Number of acidic residues in targeting sequence :   1
Cleavage site                                   : not predictable
Cleaved sequence                                : 

                         HYDROPHOBIC SCALE USED

                    GES       KD       GVH1       ECS

H17         :      0.365     1.571    -0.153     0.534
MesoH       :     -0.410    -0.410    -0.410    -0.410
MuHd_075    :     16.751     8.794     5.615     2.837
MuHd_095    :     19.407    14.027     7.300     3.693
MuHd_100    :     14.856    12.028     6.718     2.831
MuHd_105    :     17.763    15.164     7.100     3.885
Hmax_075    :      5.017     5.000    -2.544     3.990
Hmax_095    :      8.313    10.762     0.128     3.806
Hmax_100    :      6.100    10.400     0.010     3.710
Hmax_105    :      4.433     8.400    -2.501     3.640

                            PROBABILITY

of export to mitochondria: 0.0001


Comment on Re: mitoprot bioperl code help
Download Code
Re^2: mitoprot bioperl code help
by cburger (Acolyte) on Mar 21, 2012 at 03:31 UTC

    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!!

      Try removing these lines and seeing if it works:
      my $rawdata = my $analysis_object->result; print "rawdata: $rawdata\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://960628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-09-17 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls