[BioRuby] Bio::Blast::RPSBlast::Report

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Wed Sep 24 07:52:45 UTC 2008


The Bio::Blast::RPSBlast was introduced in April 2008,
but bioruby 1.2.1, current latest release version,
was released in December 2007. This means you need
unreleased development version of bioruby in the github.

You can download snapshot as a tarball
http://github.com/bioruby/bioruby/tarball/master
and install it (or extract it and set -I option or
RUBYLIB enviroment etc.) Alternative way is to use git
(see http://github.com/bioruby/bioruby/wikis ).

As it is developmental version, it is unstable,
something may not work frequently, and incompatible
changes may be made. Please upgrade to new version
immediately after new version released.

In addtion, after commit 11f1787cf93c046c06d4a33a554210d56866274e,
the limitation of multi-fasta report is eliminated
when using with Bio::FlatFile.

    require 'bio'
    filename = 'test.rpsblast'
    Bio::FlatFile.open(Bio::Blast::RPSBlast::Report, filename) do |ff|
      i = 0
      ff.each do |e|
        i += 1
        print "Query\##{i} = ", e.query_def, "\n"
        j = 0
        e.each do |hit|
          j += 1
          print "Query\##{i}/Hit\##{j} = ", hit.target_def, "\n"
          k = 0
          hit.each do |hsp|
            k += 1             print "Query\##{i}/Hit\##{j}/Hsp\##{k} = ",
                value=#{hsp.evalue}, ",
              "Positions #{hsp.query_from}..#{hsp.query_to}:",
              "#{hsp.hit_from}..#{hsp.hit_to}\n"
            print "Query : #{hsp.qseq}\n"
            print "        #{hsp.midline}\n"
            print "Hit   : #{hsp.hseq}\n"
          end
        end             
      end
    end


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


On Wed, 17 Sep 2008 10:18:58 -0400
Sharvari Gujja <sgujja at broad.mit.edu> wrote:

> Hi,
> 
> Thank you so much for the info. However, on running the code for 
> rpsblast output parser, I get the following error:
> 
> *uninitialized constant Bio::Blast::RPSBlast (NameError)*
> 
> I am not sure what exactly I am missing here.
> 
> I really appreciate all the help.
> 
> Thanks
> S
> 
> Naohisa GOTO wrote:
> > On Tue, 16 Sep 2008 15:34:11 -0400
> > Sharvari Gujja <sgujja at broad.mit.edu> wrote:
> >
> >   
> >> Hi,
> >>
> >> Can someone please direct me to Bio::Blast::RPSBlast::Report 
> >> documentation/examples ?
> >>     
> >
> > http://lists.open-bio.org/pipermail/bioruby/2008-April/000624.html
> >
> > Note that the Bio::Blast::RPSBlast::Report exists still
> > only in development version, and the spec and usage
> > would be changed before the release version in near future.
> >
> > Naohisa Goto
> > ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
> > _______________________________________________
> > BioRuby mailing list
> > BioRuby at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioruby
> >   





More information about the BioRuby mailing list