[Biodevelopers] WWWBLAST: blast.REAL process can't read param values from pa

Pamela Culpepper pculpep at hotmail.com
Fri Apr 16 12:13:17 EDT 2004


Hancy,

Here is something you can try.

I have a JSP running under Jakarta Tomcat on Solaris that uses rsh to run 
Blast on an SGI 64 bit.
On the SGI, I have a Perl script that closes STDERR and then opens it, 
redirecting it to STDOUT.  It also massages the sequence submitted (checks 
for correct sequence, runs DNA through RepeatMasker) , sets up the Blast 
command line, gets a session number, and creates an HTML file with that 
session number as part of the file name (for uniqueness).  The HTML file 
contains the REFRESH meta-equiv.  I set the URL in the meta tag to the name 
of a C program I have on the Solaris that pulls the Blast alignment gif over 
from the SGI.  You shouldn't need this unless you want (or have) the gif. 
This script also opens the final BLast output file creating a header, etc.

This script then closes STDERR, STDOUT, STDIN and reopens them, redirecting 
them to >/dev/null.
After a fork in which the exec command contains the name of another Perl 
script that runs the actual blast program, the Blast command line, the name 
of the refresh file, and the name of the HTML file, the first script is 
exited.  The second script runs Blast and once Blast is finshed, it adds the 
Blast output to the HTML file, and then moves this file to the name of the 
Refresh file.

The Blast output is automatically refreshed to the users browser.

it's what I had to work with.

Pam



>From: "Hancy Frederic" <hancy at gene.ucl.ac.be>
>Reply-To: biodevelopers at bioinformatics.org
>To: <biodevelopers at bioinformatics.org>
>Subject: [Biodevelopers] WWWBLAST: blast.REAL process can't read  param 
>values from parent process
>Date: Fri, 16 Apr 2004 16:36:59 +0200
>
>Hi Malay,
>
>Thanks for your suggestion with @ARGV, I've tried it but it didn't work in 
>a
>first place. I've tried to read directly from STDIN without any success:
>
>my $query;
>if ($ENV{REQUEST_METHOD} eq 'POST') {
>	read (STDIN, $query, $ENV{CONTENT_LENGTH});
>	print $query;
>	}
>
>From what I understand of CGI, when the web server receives an HTTP 
>request,
>it reads the HTTP headers and passes the content body of the message to the
>CGI script on STDIN (cf. O'Reilly's CGI prog.). STDIN is empty for a GET
>request (no body), and should contain the encoded form data in the case of 
>a
>POST request. The content-length header is used for reading the right 
>amount
>of bytes from the content body of the POST request.
>
>So why can I access to my param values through the CGI.pm object, but not
>through STDIN? Well, the answer (after a week of struggle) is rather
>trivial: you can't do both! If you instantiate a cgi object, it reads all
>the data from STDIN, but nothing else seems to be available when running a
>command.
>
>Fred.
>
>ps: For anyone interested in my application, I'll soon post a url where you
>can get the sources.
>
>_______________________________________________
>Biodevelopers mailing list
>Biodevelopers at bioinformatics.org
>https://bioinformatics.org/mailman/listinfo/biodevelopers

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Biodevelopers mailing list