[BioRuby] RPS Blast using Bioruby...

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Tue Apr 15 09:59:06 EDT 2008


Hi,

RPS Blast output parser is now added into CVS HEAD.

0. Database preparation

You can download formatted databases from NCBI.
Be careful that formatted databases are architecture-dependent.
For little-endian machines, you can download from
ftp://ftp.ncbi.nih.gov/pub/mmdb/cdd/little_endian
For big-endian machines, 
ftp://ftp.ncbi.nih.gov/pub/mmdb/cdd/big_endian

If you want to create database from scratch, please see
the document "Using RPS-BLAST with Biopython"
http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/python/rpsblast/
This is useful not only for Biopython users but also
for RPS-BLAST newbies.

1. Runs rpsblast command

 % rpsblast -i test.fst -d Pfam -o test.rpsblast

2. Parses the result

The usage of Bio::Blast::RPSBlast::Report is almost the same
as Bio::Blast::Default::Report, except for multi-query output
supports and some methods (see RDoc in the class).

Below is a sample script.

    require 'bio'
    filename = 'test.rpsblast'
    Bio::FlatFile.open(Bio::Blast::RPSBlast::Report, filename) do |ff|
      ff.each do |e|
        i = 0
        e.each_iteration do |result|
          i += 1
          print "Query\##{i} = ", result.query_def, "\n"
          j = 0
          result.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} = ",
                "evalue=#{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
    end

3. References

Using RPS-BLAST with Biopython
http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/python/rpsblast/



Regards,

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

On Mon, 14 Apr 2008 21:51:42 +0900
Naohisa GOTO <ngoto at gen-info.osaka-u.ac.jp> wrote:

> Hi, 
> 
> Currently, RPS-Blast is not suppoted in BioRuby.
> 
> In addition, currently, Bio::Blast in BioRuby does not support
> remote BLAST on NCBI. It supports GenomeNet or stand-alone BLAST.
> 
> Thanks,
> 
> Naohisa Goto
> ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
> 
> On Thu, 10 Apr 2008 15:34:29 -0400
> Sharvari Gujja <sgujja at broad.mit.edu> wrote:
> 
> > Hi all,
> > 
> > This is in reference to my earlier email on how to fetch CDD output from 
> > NCBI.
> > 
> > Like I said I am also trying to do RPS Blast on CDD database using 
> > Bio::Blast.
> > 
> > This is what I am trying to do:
> > 
> > #!/usr/bin/env ruby
> > require 'bio'
> > program = 'blastp'
> > db = 'nr-aa'
> > fasta = File.open("input1" , "r+")
> > blast = Bio::Blast.remote(program,db,'-e 1e-10')
> > report = blast.query(fasta.read)
> > report.each do |hit|
> > puts hit.target_id
> > end
> > 
> > How can I do rps blast on cdd?
> > 
> > Thanks
> > S
> > 
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby


More information about the BioRuby mailing list