Commit c2edd580 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

clean more runb & webb

parent 03956ef1
......@@ -12,7 +12,7 @@ use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
use HTTP::Request::Common qw(POST);
use Getopt::Long ;
use Getopt::Long;
my ($program, $evalue, $vvalue, $dbname, $inputfile, $outputmethod, $filter, $html) = ('', '1.e-10',20, '', '', 0, 'on', 'off'); #Default values
my $ret = GetOptions( 'p=s' => \$program,
'e=s' => \$evalue,
......@@ -47,16 +47,16 @@ $html = 'on' if( $html eq 'T' );
# Build Command script
my @command;
# Add program
push( @command , "Program=$program" ) ;
push( @command , "Program=$program" );
# Add database
push( @command , "$dbtype=$dbname" ) ;
push( @command , "evalue=$evalue" ) ;
push( @command , "vvalue=$vvalue" ) ;
push( @command , "filter=$filter" ) ;
push( @command , "outputmethod=$outputmethod" ) ;
push( @command , "html=$html" ) ;
push( @command , "blastmethod=new" ) ;
push( @command , "raw=on" ) ;
push( @command , "$dbtype=$dbname" );
push( @command , "evalue=$evalue" );
push( @command , "vvalue=$vvalue" );
push( @command , "filter=$filter" );
push( @command , "outputmethod=$outputmethod" );
push( @command , "html=$html" );
push( @command , 'blastmethod=new' );
push( @command , 'raw=on' );
# Read sequence
......@@ -65,10 +65,10 @@ if ( $inputfile eq '' ){
while( <STDIN> ){
if( /^>/ ){
&RunBlast() if( $sequence ne '' );
$sequence = $_ ;
$sequence = $_;
}
else {
$sequence .= $_ ;
$sequence .= $_;
}
}
&RunBlast();
......@@ -78,11 +78,11 @@ elsif ( $inputfile ne ''){
while(<INFILE>){
if( /^>/ ){
&RunBlast() if( $sequence ne '' );
$sequence = $_ ;
$sequence = $_;
}
else {
# chomp();
$sequence .= $_ ;
$sequence .= $_;
}
}
close INFILE;
......@@ -96,9 +96,9 @@ else{
sub RunBlast{
my $mybody = join('&' , (@command , 'sequence='.uri_escape($sequence) )) ;
my $mybody = join('&' , (@command , 'sequence='.uri_escape($sequence) ));
# print $mybody ;
# print $mybody;
# my $r = HTTP::GHTTP->new();
# $r->set_uri("http://www.igs.cnrs-mrs.fr/adele/~database/blast.cgi");
# $r->set_uri("http://www.igs.cnrs-mrs.fr/adele/~database/newblast.cgi");
......
......@@ -591,7 +591,7 @@ sub LOCAL_BLAST
if ( $_=~ /Posted date:\s+(.+?)\n/ ) { $posted = $1;}
if ( $_=~ /(BLASTP\s+\S+)/o ) { $version = $1;}
print {$SOR2} $_;
push (@list_pdb, $_) ;
push (@list_pdb, $_);
if ( $_=~ /\s*(.+?)\s/ ){
print {*STDERR} "\n$1 done";
}
......@@ -640,7 +640,7 @@ sub PARSING {
my $version_d, my $database_d, my $poste_d;
undef $/; ($query, $length_query) = ( $intra_res[0] =~ /Query=\s+(\S+)\s+Length=\s*(\d+)/smo );
$/ = "\n";
open (F3, '<', 'web_tempo.result') or die ;
open (F3, '<', 'web_tempo.result') or die;
while ($_=<F3>){
if ($_=~ /(BLASTP\s+\S+)/o) { $version_d = $1;}
if ($_=~ /Database:\s+(.+?)$/o) { $database_d = $1;}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment