HI, I am trying to use the ProtParam tool to connect to Expasy, but am getting the following error message:
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: http://www.expasy.org/cgi-bin/protparam error: 301 Moved Permanently
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/share/perl5/Bio/Root/Root.pm:472
STACK: Bio::Tools::Protparam::new /usr/share/perl5/Bio/Tools/Protparam.pm:128
STACK: ./protanalysis.pl:12
the only thing I can get from googling the issue is to update to bioperl-live which I have done.
Here is my code by the way:
use Bio::DB::GenBank;
use Bio::Tools::Protparam;
my $filename='test.fasta';
my $gb = Bio::SeqIO->new(-file => "<$filename",
-format => "fasta");
my $fa = Bio::SeqIO->new(-file => ">gball.fa",
-format => "fasta",
-flush => 0); # go as fast as we can!
while( my $seq = $gb->next_seq ) {
my $pp = Bio::Tools::Protparam->new(seq=>$seq->seq);
print
"ID : ", $seq->display_id,"\n",
"Amino acid number : ",$pp->amino_acid_number(),"\n",
"Number of negative amino acids : ",$pp->num_neg(),"\n",
"Number of positive amino acids : ",$pp->num_pos(),"\n",
"Molecular weight : ",$pp->molecular_weight(),"\n",
"Theoretical pI : ",$pp->theoretical_pI(),"\n",
"Total number of atoms : ", $pp->total_atoms(),"\n",
"Number of carbon atoms : ",$pp->num_carbon(),"\n",
"Number of hydrogen atoms : ",$pp->num_hydrogen(),"\n",
"Number of nitrogen atoms : ",$pp->num_nitro(),"\n",
"Number of oxygen atoms : ",$pp->num_oxygen(),"\n",
"Number of sulphur atoms : ",$pp->num_sulphur(),"\n",
"Half life : ", $pp->half_life(),"\n",
"Instability Index : ", $pp->instability_index(),"\n",
"Stability class : ", $pp->stability(),"\n",
"Aliphatic_index : ",$pp->aliphatic_index(),"\n",
"Gravy : ", $pp->gravy(),"\n",
"Composition of A : ", $pp->AA_comp('A'),"\n",
"Composition of R : ", $pp->AA_comp('R'),"\n",
"Composition of N : ", $pp->AA_comp('N'),"\n",
"Composition of D : ", $pp->AA_comp('D'),"\n",
"Composition of C : ", $pp->AA_comp('C'),"\n",
"Composition of Q : ", $pp->AA_comp('Q'),"\n",
"Composition of E : ", $pp->AA_comp('E'),"\n",
"Composition of G : ", $pp->AA_comp('G'),"\n",
"Composition of H : ", $pp->AA_comp('H'),"\n",
"Composition of I : ", $pp->AA_comp('I'),"\n",
"Composition of L : ", $pp->AA_comp('L'),"\n",
"Composition of K : ", $pp->AA_comp('K'),"\n",
"Composition of M : ", $pp->AA_comp('M'),"\n",
"Composition of F : ", $pp->AA_comp('F'),"\n",
"Composition of P : ", $pp->AA_comp('P'),"\n",
"Composition of S : ", $pp->AA_comp('S'),"\n",
"Composition of T : ", $pp->AA_comp('T'),"\n",
"Composition of W : ", $pp->AA_comp('W'),"\n",
"Composition of Y : ", $pp->AA_comp('Y'),"\n",
"Composition of V : ", $pp->AA_comp('V'),"\n",
"Composition of B : ", $pp->AA_comp('B'),"\n",
"Composition of Z : ", $pp->AA_comp('Z'),"\n",
"Composition of X : ", $pp->AA_comp('X'),"\n";
}
This shouldn't be that much of a struggle if I have the latest version of bioperl right? Can anyone suggest anything I have done wrong?
Thanks very much.
@Neilfws thanks very much, however looking at the ProtParam.pm in my bioperl-live git repository (cloned into my etc folder) the line I have is: line 107: @args=('-url'=>'http://web.expasy.org/cgi-bin/protparam/protparam','-form'=>'sequence',@args); - so that seems up to date too. am I perhaps not calling the latest version of bioperl to be used?
"Cloned in my etc folder" is not the same thing as installing bioperl-live. There should be a README or INSTALL file in there telling you how to install to your system.