[BioRuby] Bio::Blast not fully functional?
Toshiaki Katayama
ktym at hgc.jp
Fri May 18 16:00:33 UTC 2007
Fredrik,
This is because Bio::Blast.remote uses '-m 8' option
which returns a tabular output format without target sequences.
You can use XML output for your purpose by changing the following line
> factory = Bio::Blast.remote('blastp', 'nr-aa')
to
factory = Bio::Blast.remote('blastp', 'nr-aa', '-m 7')
Regards,
Toshiaki
On 2007/05/15, at 14:54, Fredrik Johansson wrote:
> Hello all,
> I am reading in the tutorial at
> http://dev.bioruby.org/wiki/en/?Tutorial.rd
> about BLAST and I try to use it according to this tutorial (see the code
> below).
> However, many of the entries in the 'hit' variable in the code below
> seems to be nil. hit.identity and hit.target_seq are for example two
> methods that just answer nil when I call them. Am I missing something?
>
> #!/usr/bin/env ruby
> require 'bio'
> factory = Bio::Blast.remote('blastp', 'nr-aa')
> Bio::FlatFile.open(Bio::FastaFormat, '/home/fred/pdb/test.fasta.txt') do
> |ff|
> ff.each do |entry|
> report = factory.query(entry)
> report.each do |hit|
> if hit.evalue < 0.001
> puts hit.target_id
> puts hit.target_seq
> end
> end
> end
> end
>
> Thanks for any help!
> Best regards,
> Fredrik Johansson
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
More information about the BioRuby
mailing list