[Bioperl-l] please help me to check why this perl script does not work!

Fei Li lifei03 at gmail.com
Sun May 29 03:36:45 EDT 2005


I wish to submit some protein sequences via LWP:UserAgent  to the
http://www.cbs.dtu.dk/services/ChloroP/

The error message is given as follows:

<HTML><HEAD><TITLE>Webface Error</TITLE></HEAD><font
color=red><h1>Webface Error: </h1><h4>
Read: Field not declared; 'seqpaste'</h4>
<br>
</font></HTML>

*********************************


#! /usr/bin/perl -w
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;

my $browser = LWP::UserAgent->new;
my @seq;
my $count =0;

my $infile = "my_test_file"; #input my Fasta file

open INPUT, "$infile" or die "can not open $infile:$!";
open OUTPUT, ">>$infile.ChloroP.res" or die "Cannot create the output file: $!";

@seq = <INPUT>;
my $total = @seq;

foreach my $item (@seq){
        $count ++;
        chomp $item;
         my $response =
$browser->post('http://www.cbs.dtu.dk/cgi-bin/nph-webface',
                       [ "SEQPASTE" => "$item",
                       	 "submit" => "Submit"]
                         );
          warn "WARN!: ", $response->status_line, "\n" unless
$response->is_success;

          if($response->is_success){
                  my $result = $response->content;
                  open OUTPUT, ">>$infile.ChloroP.res" or die "Cannot
create the output file: $!";
                  print OUTPUT "$result\n";
                  print OUTPUT "\n*********************************\n\n\n";
            }
  print "$count of $total finished\n";
  }

 close OUTPUT;
 close INPUT;



More information about the Bioperl-l mailing list