[BioRuby-cvs] bioruby/lib/bio/shell/plugin seq.rb,1.12,1.13

Katayama Toshiaki k at pub.open-bio.org
Sun Nov 27 21:06:49 EST 2005


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

Modified Files:
	seq.rb 
Log Message:
* seq method is moved to bio/shell/access


Index: seq.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/seq.rb,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** seq.rb	25 Nov 2005 16:47:10 -0000	1.12
--- seq.rb	28 Nov 2005 02:06:47 -0000	1.13
***************
*** 29,33 ****
  require 'bio/sequence'
  require 'bio/util/color_scheme'
- require 'bio/shell/plugin/codon'
  
  module Bio::Shell
--- 29,32 ----
***************
*** 35,72 ****
    private
  
-   # 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)
-     if arg.kind_of?(Bio::Sequence)
-       s = arg
-     elsif arg.respond_to?(:gets) or File.exists?(arg)
-       entry = flatauto(arg)
-     elsif arg[/:/]
-       db, entry_id = arg.split(/:/)
-       str = obda_get_entry(db, entry_id)
-       entry = parse(str)
-     else
-       tmp = arg
-     end
- 
-     if entry.respond_to?(:seq)
-       tmp = entry.seq
-     elsif entry.respond_to?(:naseq)
-       s = entry.naseq
-     elsif entry.respond_to?(:aaseq)
-       s = entry.aaseq
-     end
- 
-     if tmp and tmp.is_a?(String) and not tmp.empty?
-       s = Bio::Sequence.auto(tmp)
-     end
- 
-     return s || ""
-   end
- 
- 
    # Convert sequence to colored HTML string
    def htmlseq(str)
--- 34,37 ----
***************
*** 134,137 ****
--- 99,105 ----
          hash[codon] = percent
        end
+       #--
+       #*TODO* how to hide this method
+       #++
        rep << codon_usage_table(1, hash).output
  



More information about the bioruby-cvs mailing list