[BioRuby-cvs] bioruby/lib/bio/shell/plugin flatfile.rb,1.1,1.2

Katayama Toshiaki k at pub.open-bio.org
Sun Sep 25 01:25:17 EDT 2005


Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin
In directory pub.open-bio.org:/tmp/cvs-serv1787/lib/bio/shell/plugin

Modified Files:
	flatfile.rb 
Log Message:
* changed to use Bio::FlatFileIndex#search through block


Index: flatfile.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/flatfile.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** flatfile.rb	23 Sep 2005 13:57:08 -0000	1.1
--- flatfile.rb	25 Sep 2005 05:25:14 -0000	1.2
***************
*** 59,64 ****
    def bioflat_search(dbname, keyword)
      dir = Core::SAVEDIR + Core::BIOFLAT + dbname.to_s
! #   Bio::FlatFileIndex.open(dir) do |db|
!     db = Bio::FlatFileIndex.open(dir)
        if results = db.include?(keyword)
          results.each do |entry_id|
--- 59,63 ----
    def bioflat_search(dbname, keyword)
      dir = Core::SAVEDIR + Core::BIOFLAT + dbname.to_s
!     Bio::FlatFileIndex.open(dir) do |db|
        if results = db.include?(keyword)
          results.each do |entry_id|
***************
*** 68,73 ****
          display "No hits found"
        end
! #   end
!     db.close
    end
  
--- 67,71 ----
          display "No hits found"
        end
!     end
    end
  



More information about the bioruby-cvs mailing list