[BioRuby-cvs] bioruby/lib/bio/shell access.rb, 1.2, 1.3 session.rb, 1.9, 1.10

Katayama Toshiaki k at pub.open-bio.org
Mon Nov 28 07:07:44 EST 2005


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

Modified Files:
	access.rb session.rb 
Log Message:
* display is removed or changed to puts
* removed require


Index: access.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/access.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** access.rb	28 Nov 2005 07:09:34 -0000	1.2
--- access.rb	28 Nov 2005 12:07:42 -0000	1.3
***************
*** 33,42 ****
    # Obtain a Bio::Sequence::NA (DNA) or a Bio::Sequence::AA (Amino Acid)
    # sequence from
!   #   * String -- "atgcatgc" or "MQKKP"
!   #   * File   -- "gbvrl.gbk" (only the first entry is used)
!   #   * ID     -- "embl:BUM"  (entry is retrieved by the OBDA)
    def seq(arg)
      seq = ""
- 
      if arg.kind_of?(Bio::Sequence)
        seq = arg
--- 33,42 ----
    # Obtain a Bio::Sequence::NA (DNA) or a Bio::Sequence::AA (Amino Acid)
    # sequence from
!   #   * String     -- "atgcatgc" or "MQKKP"
!   #   * IO         -- io = IO.popen("gzip -dc db.gz") (first entry only)
!   #   * "filename" -- "gbvrl.gbk" (first entry only)
!   #   * "db:entry" -- "embl:BUM"  (entry is retrieved by the ent method)
    def seq(arg)
      seq = ""
      if arg.kind_of?(Bio::Sequence)
        seq = arg
***************
*** 61,73 ****
        seq = Bio::Sequence.auto(tmp)
      end
- 
      return seq
    end
  
    def ent(arg)
      entry = ""
- 
      db, entry_id = arg.to_s.strip.split(/:/)
-     
      if arg.respond_to?(:gets) or File.exists?(arg)
        entry = flatfile(arg)
--- 61,74 ----
        seq = Bio::Sequence.auto(tmp)
      end
      return seq
    end
  
+   # Obtain a database entry from
+   #   * IO          -- IO object (first entry only)
+   #   * "filename"  -- local file (first entry only)
+   #   * "db:entry"  -- local bioflat, OBDA, KEGG API
    def ent(arg)
      entry = ""
      db, entry_id = arg.to_s.strip.split(/:/)
      if arg.respond_to?(:gets) or File.exists?(arg)
        entry = flatfile(arg)
***************
*** 79,84 ****
        entry = bget(arg)
      end
- 
-     display entry
      return entry
    end
--- 80,83 ----

Index: session.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/session.rb,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** session.rb	28 Nov 2005 07:10:59 -0000	1.9
--- session.rb	28 Nov 2005 12:07:42 -0000	1.10
***************
*** 37,41 ****
        eval(x, conf.workspace.binding).nil?
      }
!     display list.inspect
    end
  
--- 37,41 ----
        eval(x, conf.workspace.binding).nil?
      }
!     puts list.inspect
    end
  
***************
*** 104,108 ****
    end
  
!   def display(*obj)             # *TODO* spec?
      # The original idea is from http://sheepman.parfait.ne.jp/20050215.html
      if Bio::Shell.config[:pager]
--- 104,108 ----
    end
  
!   def display(*obj)
      # The original idea is from http://sheepman.parfait.ne.jp/20050215.html
      if Bio::Shell.config[:pager]
***************
*** 143,147 ****
        end
      end
!     display str
    end
  
--- 143,148 ----
        end
      end
!     puts str
!     return str
    end
  
***************
*** 176,184 ****
        Dir.chdir(dir)
      end
!     display Dir.pwd.inspect
    end
  
    def pwd
!     display Dir.pwd.inspect
    end
  
--- 177,185 ----
        Dir.chdir(dir)
      end
!     puts Dir.pwd.inspect
    end
  
    def pwd
!     puts Dir.pwd.inspect
    end
  
***************
*** 204,208 ****
          str << format("%s  %s%13d  %s\n", mode, date, byte, name)
        }
!       display str
      end
    end
--- 205,210 ----
          str << format("%s  %s%13d  %s\n", mode, date, byte, name)
        }
!       puts str
!       return str
      end
    end



More information about the bioruby-cvs mailing list