Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: mitoprot bioperl code help

by cburger (Acolyte)
on Mar 21, 2012 at 03:31 UTC ( #960712=note: print w/ replies, xml ) Need Help??


in reply to Re: mitoprot bioperl code help
in thread mitoprot bioperl code help

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


Comment on Re^2: mitoprot bioperl code help
Select or Download Code
Replies are listed 'Best First'.
Re^3: mitoprot bioperl code help
by molecules (Monk) on Mar 21, 2012 at 15:50 UTC
    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://960712]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (18)
As of 2015-07-30 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls