[Bioperl-l] I can't access clustalw from my cgi perl program...
nisa_dar
vdar at yorku.ca
Wed May 21 18:41:00 UTC 2008
Hi,
My multiple alignment program works fine from command line but when i put
the
same piece of code in my cgi perl program, it gives me the same error, which
is,
Can't locate Bio/Tools/Run/Alignment/Clustalw.pm in @INC (@INC contains:
/export/share/iNquiry/perl/lib/5.8.5/x86_64-linux-thread-multi
/export/share/iNquiry/perl/lib/5.8.5
/export/share/iNquiry/perl/lib/x86_64-linux-thread-multi
/export/share/iNquiry/perl/lib/5.8.4 /export/share/iNquiry/perl/lib/5.8.3
/export/share/iNquiry/perl/lib/5.8.2 /export/share/iNquiry/perl/lib/5.8.1
/export/share/iNquiry/perl/lib/5.8.0 /export/share/iNquiry/perl/lib
/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5
/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4
/usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl .) at
/export/share/iNquiry/www/cgi-bin/bipod/nisa/snpfinder.cgi line 14.
BEGIN failed--compilation aborted at
/export/share/iNquiry/www/cgi-bin/bipod/nisa/snpfinder.cgi line 14.
Here is my cgi perl program
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Carp qw/fatalsToBrowser/;
use Bio::SeqIO;
use Bio::Align::AlignI;
use Bio::AlignIO;
use Bio::AlignIO::msf;
use Bio::SimpleAlign;
use Bio::PrimarySeq;
use Bio::Tools::Run::Alignment::Clustalw;
use Bio::PrimarySeqI;
use Bio::Root::IO;
use Bio::Seq;
use Bio::TreeIO;
use Bio::Root::Root Bio::Tools::Run::WrapperBase;
use Bio::LocatableSeq;
BEGIN {
$ENV{CLUSTALDIR} = '/opt/Bio/bin/clustalw';
}
print"Content-type: text/html\n\n";
if (param()){ #condition if user supplied some data
my $new_seq=param("sequence"); #to store sequence from text box of form
my $selection=param("size");#to store drop down menu selection for
translation type
my $file1=param("uploadfile");#variable for name of the file
my $address=param("email");#variable to hold e.mail address
if ($file1=~/.+/) {#test condition, if user supplied a file
my $R_FH = upload("uploadfile");#get file handle
my $in = Bio::AlignIO->new(-file => $file1 ,
-format => 'fasta');
my $out = Bio::AlignIO->new(-file => ">out.aln.pfam" ,
-format => 'pfam');
while ( my $aln1 = $in->next_aln() ) {
$out->write_aln($aln1);
}
close $R_FH;
open FH, "out.aln.pfam" || die "Alignment file doesn't exist\n";
while(<FH>){
print $_,"\n";
}
close FH;
#To send results through e.mail
$report=~s/<br \/>/\n/g;#change new line character
$report=~s/(<.+?>)//g;#remove html tags
$report=~s/( )/ /g;#change space character
open(MAIL, "|/usr/sbin/sendmail -t") or die"can't compose an e.mail";
print MAIL "To:$address\n";
print MAIL "From: nisa\n";
print MAIL "Subject: results of $file1\n";
print MAIL "\n$report\n";
close(MAIL);#close mail
}else{#error message if no file name is entered
print "<html><head><h3>Error: </h3></head><body>You did not enter a file
name,please upload a file<br /></body></html>";
}
}
Please let me know what should I do, because clustalw is there and my other
programs (non web-based) are working.
Thanks
Nisa
--
View this message in context: http://www.nabble.com/I-can%27t-access-clustalw-from-my-cgi-perl-program...-tp17367665p17367665.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l
mailing list