[Bioperl-l] RemoteBlast: No Significant Matches (works for web interface)

affan qureshi aqureshi at cs.odu.edu
Sun Nov 7 21:58:43 EST 2004


Hi,
I am trying to use the Remote Blast example for my own Nucleotide sequence
but I get No Significant Matches found response from the server. However
the same query gives me matches for the web-based interface
"Nucleotide-nucleotide BLAST (blastn)" on the NCBI website.

Do you know what I could be doing wrong? I searched the archive but saw a
similar question for which i couldnt find the answer. Also is there a way
to see the actual parameters being passed to the server and compare them
with the web-based ones?

Thanks a lot,

Affan

Here is my code:

sub doBlast {
        #this is the filename containing nucleotide sequence
	my($filename) = @_;


	my $prog = 'blastn';
	my $db   = 'nr';
	my $e_val= '1e-10';

	my @params = ( '-prog' => $prog,
			'-data' => $db,
			'-expect' => $e_val,
			'-readmethod' => 'SearchIO' );

	my $factory = Bio::Tools::Run::RemoteBlast->new(@params);

	#change a paramter
	#$Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = 'Homo sapiens
[ORGN]';

	#remove a parameter
	#delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'};

	my $v = 1;
	#$v is just to turn on and off the messages

	my $seqio = Bio::SeqIO->new(-file=>$filename, '-format' => 'fasta' );

	while (my $input = $seqio->next_seq()) {

		#Blast a sequence against a database:

		my $r = $factory->submit_blast($input);

		print STDERR "waiting..." if( $v > 0 );
		while ( my @rids = $factory->each_rid ) {
		foreach my $rid ( @rids ) {
			my $rc = $factory->retrieve_blast($rid);
			if( !ref($rc) ) {
				if( $rc < 0 ) {
					$factory->remove_rid($rid);
				}
				print STDERR "." if ( $v > 0 );
				sleep 5;
			} else {
				my $result = $rc->next_result();
				#save the output
				my $filename = 'results/'.$result->query_name().".blast";
				$factory->save_output($filename);
				$factory->remove_rid($rid);
				print "\nQuery Name: ", $result->query_name(), "\n";
				while ( my $hit = $result->next_hit ) {
					next unless ( $v > 0);
					print "\thit name is ", $hit->name, "\n";
					while( my $hsp = $hit->next_hsp ) {
					print "\t\tscore is ", $hsp->score, "\n";
					}
				}
			}
		}
		}
	}

}




More information about the Bioperl-l mailing list