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

How to execute GCG via CGI?

S.Lee bioinformatics at hanmail.net
Mon Dec 2 20:36:19 EST 2002


Thank you very much, Rick.

I tried your code snippet and it worked great in initializing GCG
environment when run FROM THE SHELL.

However, it still does not run ON THE WEB. It does not produce an output
file.

Could you please take a look at my CGI script and let me know what is going
on? (Of course, I chmod'ed the output directory writable to ugo, so writing
privilege issue cannot be the reason).

Thanks!

------------------------------------------------------------
#!/usr/sbin/perl

print "Content-type: text/html\n";
print "\n";

$execstr = "/usr/users/gcg/gcgbin/execute/tofasta
SP_BA:Q93J69 -OUTfile=/SOME_DIRECTORY/out.tfa -default";

$tmpname = "tmpdir.gcgtmp";
open (GCGFILE,">$tmpname");
print $GCGFILE "#!/bin/tcsh\n";
print $GCGFILE "source /usr/gcg/gcgstartup\n";
print $GCGFILE "gcg\n";
print $GCGFILE "$execstr\n";
close $GCGFILE;
chmod 0770, $tmpname;
system($tmpname);

------------------------------------------------------------------

"Rick Westerman" <westerman at purdue.edu> wrote in message
news:3DEBD7FF.4040705 at purdue.edu...
> 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
=-----
> >
> >
>




-----------== 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