[BioRuby] Extracting identity from Bio::Blast::Report::Hit

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Tue Nov 18 08:32:41 UTC 2008


Hi,

On Tue, 18 Nov 2008 12:03:58 +0900
"Rob Syme" <rob.syme at gmail.com> wrote:

> Hi all,
> I'm running a blast against a local database, but I'm only getting
> some of the information back:
> 
> local_blast_factory = Bio::Blast.local('blastn','/home/.../sn15cds')
> query = "TAT...sequence...TAA"
> report = local_blast_factory.query(query)
> 
> report.each do |hit|
>   puts hit.identity.class
> end
> 
> Gives:
> NilClass
> NilClass
> 
> Most of the other variables (eg: query_def, definition, hsps) work
> fine. I don't know why the identity information can't be extracted.
> Are there particular arguments I need to give the blast factory so
> that I can extract the identity information?
> Thanks in advance.

Which BioRuby version, Ruby version, OS, and machine you are using?

Perhaps because the blast report format was 8 (Tab-deliminated).
In some previous version of bioruby, default format was 8.

A workaround is to set "-m 7" option (XML output format)
when creating factory object, for example,
  Bio::Blast.local('blastn','/home/.../sn15cds', '-m 7 -e 10')

-- 
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org



More information about the BioRuby mailing list