IUBio Biosequences .. Software .. Molbio soft .. Network News .. FTP

How to execute GCG via CGI?

Rick Westerman westerman at purdue.edu
Mon Dec 2 17:00:31 EST 2002


My pipeline code uses a temporary file:

my $tmpname = "$tmpdir.gcgtmp";

if ($GCGFILE->open (">$tmpname"))
        {
        print $GCGFILE "#!/bin/csh\n";
        print $GCGFILE "source /usr/gcg/gcgstartup\n";
        print $GCGFILE "gcg\n";
        print $GCGFILE "$execstr\n";
        close $GCGFILE;
        chmod 0770, $tmpname;
        system($tmpname);
        }

This causes a bunch of initialization code to start up and does not trap 
for errors (all right in my apps) however it does work.

S.Lee wrote:

>I have a Perl script that calls a gcg program (tofasta), and runs well at
>UNIX shell.
>
>A code snippet is, for example, as follows.
>
>system("/usr/users/gcg/gcgbin/execute/tofasta SP_BA:Q93J69 -default");
>
>Then, I needed to create an on-line resource, so I converted that Perl
>script into a CGI script and executed on-line.
>
>Now, I cannot execute the gcg tofasta program with the CGI script; It simply
>does not run. I can guess that the reason is related to gcg initialization
>and environment (As you know, typing gcg at the command prompt initializes
>your environment and gives you access to gcg programs. But CGI script cannot
>do that).
>
>Does anyone know how to execute a CGI script that calls a gcg program?
>
>Thanks in advance.
>
>
>
>
>
>-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
>   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
>-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
>  
>




More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net