[Bioperl-l] RE: blastall + perl
Joseph Bedell
jbedell at oriongenomics.com
Fri Jul 2 10:27:06 EDT 2004
Hi Jahan,
Unfortunately, I don't think the problem you are having was ever
resolved during that Bioperl thread below. I'm CC'ing the Bioperl list
to see if anyone else can help you with this problem.
Joey
>-----Original Message-----
>From: Jahan S Ghaznavi [mailto:ghaznavi at cse.psu.edu]
>Sent: Friday, July 02, 2004 8:57 AM
>To: Joseph Bedell
>Subject: blastall + perl
>
>
>Hi
>First I would like thank you for trying to help me.
>I wrote a cliet and server using soap::lite. When I run the client it
uses
>a module analysis
>where the blastall has been called.
>When I run it i get the erroer below. here is the link to where i
found
>you had the same
>problem
>"http://bioperl.org/pipermail/bioperl-l/2003-December/014202.html"
>
>
>here is the error
>ghaznavi at posnania:~/Perl-code/perl-fork/soap-fork/temp$ perl -T
>new_test_soap.pl
>Fault:
>SOAP-ENV:Server,
>------------- EXCEPTION -------------
>MSG: blastall call crashed: -1 /home/biosoft/NCBI_tools/blastall -p
blastp
>-d
>"/home/biosoft/NCBI_tools/db/nr" -i /tmp/NWNIDOVgh7 -o ccc.out
>
>STACK Bio::Tools::Run::StandAloneBlast::_runblast
>/usr/lib/perl5/site_perl/5.8.3/Bio/Tools/Run/StandAloneBlast.pm:732
>STACK Bio::Tools::Run::StandAloneBlast::_generic_local_blast
>/usr/lib/perl5/site_perl/5.8.3/Bio/Tools/Run/StandAloneBlast.pm:680
>STACK Bio::Tools::Run::StandAloneBlast::blastall
>/usr/lib/perl5/site_perl/5.8.3/Bio/Tools/Run/StandAloneBlast.pm:536
>STACK Analysis::method_blastp Analysis.pm:49
>STACK Analysis::run Analysis.pm:127
>STACK (eval) /usr/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm:2322
>STACK (eval) /usr/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm:2310
>STACK SOAP::Server::handle
/usr/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm:2282
>STACK SOAP::Transport::HTTP::Server::handle
>/usr/lib/perl5/site_perl/5.8.3/SOAP/Transport/HTTP.pm:286
>STACK SOAP::Transport::HTTP::Daemon::ForkOnAccept::handle
>SOAP/Transport/HTTP/Daemon/ForkOnAccept.pm:32
>STACK toplevel serv_fork.pl:24
>
>--------------------------------------
>
>here is teh code
>if you need moew info please let me know. I am very thankfull for what
ever
>you could do.
>Thanks
>Jahan
>
>
># -*- perl -*-
>use strict;
>use vars qw(%ENV);
>$ENV{PATH}="/home/biosoft/bin:/home/biosoft/glimmer:/home/biosoft/NCBI_
tool
>s/:/home/biosoft/NCBI_tools/db";
>
>
>#$ENV{PATH}="/home/biosoft/NCBI_tools/";
>package Analysis;
>
>use DBconnector;
>#use blast_module;
>
>#-------------------------------------
>use Bio::Perl;
>use Bio::SeqIO;
>#use Bio::searchIO;
>use Bio::Tools::Run::StandAloneBlast;
>
>$Bio::Tools::Run::StandAloneBlast::DATADIR =
'/home/biosoft/NCBI_tools/db';
>$ENV{'BLASTDB'}="/home/bios:q!oft/NCBI_tools/db";
>
>sub hello
> {
> print "aloalaoalaoalo \n";
> }
>
>sub method_blastp
> {
>
> my $database="nr";
> my $program = "blastp";
> my $outfile = "ccc.out";
> my $_READMRTHOD = "Blast";
> my $file_name = "test.fa";
> my $type = "fasta";
> # my $self = shift;
> #my ($database,$program,$outfile,$_READMRTHOD,$file_name,$type)=@_;
> my @program = ('database'=>$database,'program' =>
>$program,'outfile'=>$outfile,'_READMETHOD'=>$_READMRTHOD);
> my $factory = Bio::Tools::Run::StandAloneBlast->new(@program);
> print " $database $program $outfile $_READMRTHOD $file_name $type
\n";
>
> # my $res = $factory->submit_blast($file_name);
> #push @outfile "/home/ghaznavi/Perl-code/perl-fork/soap-
>fork/temp/out1";
> #$factory->save_output($res, at outfile);
> my $str = Bio::SeqIO->new(-file=>$file_name,'-format'=>$type);
> my $input = $str->next_seq();
> print " ++++ \n";
> print " $input \n";
> my $blast_report = $factory->blastall($input) or die " i can not do
it
>";
> print "---**-- $blast_report \n";
> return 1;
> }
>#-------------------------------------
>use Time::localtime;
>
>sub query {
> die "Not Implemented\n";
>}
>
>sub run {
> # die "Not Implemented\n";
> print "child proccess: PID=$$ \n";
> print "$_[1]{'program'} \n";
> my %hash;
> $hash{'program'} = $_[1]{'program'};
> print "---- $hash{'program'} ---- ";
> $hash{'protein_db'} = $_[1]{'protein_db'};
> $hash{'filter'} = $_[1]{'filter'};
> $hash{'Expect'} = $_[1]{'Expect'};
> $hash{'gapped_alig'} = $_[1]{'gapped_alig'};
> $hash{'mismatch'} = $_[1]{'mismatch'};
> $hash{'match'} = $_[1]{'match'};
> $hash{'matrix'} = $_[1]{'matrix'};
> $hash{'gc_query'} = $_[1]{'gc_query'};
> $hash{'gc_db'} = $_[1]{'gc_db'};
> $hash{'strand'} = $_[1]{'strand'};
> $hash{'Descriptions'} = $_[1]{'Descriptions'};
> $hash{'Alignments'} = $_[1]{'Alignments'};
> $hash{'view_alignments'} = $_[1]{'view_alignments'};
> $hash{'show_gi'} = $_[1]{'show_gi'};
> $hash{'believe'} = $_[1]{'believe'};
> $hash{'htmloutput'} = $_[1]{'htmloutput'};
> $hash{'external_links'} = $_[1]{'external_links'};
> $hash{'one_HSP_per_line'} = $_[1]{'one_HSP_per_line'};
> $hash{'image_query'} = $_[1]{'image_query'};
>
#----------------------------------------------------------------
>------------------
>my $connection = new DBconnector;
>
>#connection->connect;
>my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=
localtime(time);
>my $year = localtime->year();
>my $hour = localtime->hour();
>my $min = localtime->min();
>my $sec = localtime->sec();
>my $time = $hour.$min.$sec;
>my $PID=$$;
>my $id = $PID.$time;
>print "!!!!!! $PID + $time = $id \n";
>$connection->add("$id","$hash{'program'}","zz","kk");
>$connection->stats;
>$connection->purge("$id");
>$connection->down("$id");
>
>#my $blast = new blast_module;
>open (FILEHANDLE, ">test.fa") or die "no such a file ";
>print FILEHANDLE ">gi|523232|emb|AAC12345|sp|D12567 titin fragment
>MHRHHRTGYSAAYGPLKJHGYVHFIMCVVVSWWASDVVTYIPLLLNNSSAGWKRWWWIIFGGE
>GHGHHRTYSALWWPPLKJHGSKHFILCVKVSWLAKKERTYIPKKILLMMGGWWAAWWWI";
>close (FILEHANDLE);
>print " $outfile \n";
>hello();
>print " $database \n";
>my $tt = method_blastp();
> $ENV{PATH} = '/usr/bin';
> print $ENV{PATH} ;
>
> open (STDOUT,">log.txt") or die "open() error: $!";
> print STDOUT "\$exitvalue ";
> #exec ("ls -l"); # or die "system failed : $?";
> exec ("date");
>}
>
>sub echo {
> return @_;
>}
>
>1;
>
More information about the Bioperl-l
mailing list