[BioRuby] Help with Bio::Blast
Greg Traub
gtraub at flmnh.ufl.edu
Tue Aug 12 18:09:56 UTC 2008
Hello,
I'm new to BioRuby but not new to Ruby. I've been trying to write code
to submit a fasta formated sequence for BLAST search, however I never
get back anything thats usable. After reading the documentation, I
should be receiving xml formated responses to my search, but I dont
receive anything. I altered the code in Bio::Blast class to print out
whatever raw data was being sent back from my request and to my
surprise, I keep receiving standard formated HTML page that tells me my
request is either requesting the wrong program or the wrong database .
I've been trying to use 'blastn' with 'nr' or 'nr-nt' ...documentation
seems differ as to what the name of the databases are, so I've tried all
of them with no luck. Now what really gets me is that i should be
getting back XML. I would even an expect the error message to be in XML
but instead its in a HTML page with javascript included. This makes
me think that the request is going to URL not intended for XML
responses. Can anybody help me? I've pasted some example code that I've
tried below.
Thanks,
Greg
#files is array of file locations
#res is response
#im just trying to get back any info i can from the request
#in the example code below
blast = Bio::Blast.remote('blastn','nr')
files.each do |file|
Bio::FastaFormat.open(file).each_entry do |c|
reports = blast.query(c.seq)
reports.each { |report| res << report.query_seq }
end
end
--
Database Programmer
Florida Museum of Natural History
University of Florida
gtraub at flmnh.ufl.edu
(352) 392-1721 ext. 514
----------------------------------
Experience is what you get when
you didn't get what you want.
-National Vacuum sign
More information about the BioRuby
mailing list