[Bioperl-l] script to visit biosite question

Brian Tam tam@akkadix.com
Thu, 14 Dec 2000 12:38:33 -0800


I don't know if this is the appropriate forum to post this question, but
since it's Perl- and computational biology-related I might as well give it a

I'm trying to query Genscan (http://genes.mit/edu/GENSCAN.html), a gene
prediction program, from the Unix shell with a Perl script.  Yes, I know I
could paste in the sequences and 'run' the software from the web page
itself, but I've got hundreds of sequences to input, too many to do
manually.  And I get no response from their mail server, so that alternative
won't do, either.
Anyway, I've created the following user, request, and response objects: 
   use LWP::UserAgent;
   $ua = new LWP::UserAgent;
   $ua->agent("AgentName/0.1 " . $ua->agent);

   my $req = new HTTP::Request POST =>
   $req->content([-o => Arabidopsis, -n => $a_sequence, -p => 'Predicted CDS
and peptides', submit => 'Run GENSCAN']);
   my $res = $ua->request($req);
   if ($res->is_success) {
       print $res->content;
   } else {
       print "Bad luck this time\n";
$a_sequence is a sequence of "A"s, "T"s, "G"s, and "C"s you can randomly
distribute as a test case, of course.  When I run the script, it never
succeeds in returning anything.  In fact, I have to kill the process because
it just 'hangs'.  Am I calling Genscan incorrectly, inputting the parameters
wrong, or what?  Maybe I just don't have the knack of handling forms yet,
but the control names, "-o", "-n", "-p", sure look weird! 
Any help would be greatly appreciated.  Please e-mail responses to
btam@akkadix.com.   Thanks.

---Brian Tam
   Scientific Programmer
   Akkadix Corp.
   La Jolla, CA  92037