[BioRuby-cvs] bioruby/lib/bio/io ensembl.rb,1.9,1.10

Mitsuteru C. Nakao nakao at dev.open-bio.org
Thu Mar 29 14:14:19 UTC 2007


Update of /home/repository/bioruby/bioruby/lib/bio/io
In directory dev.open-bio.org:/tmp/cvs-serv12238/lib/bio/io

Modified Files:
	ensembl.rb 
Log Message:
* Added backward-conpatibility classes and test codes.


Index: ensembl.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/io/ensembl.rb,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ensembl.rb	29 Mar 2007 08:00:04 -0000	1.9
--- ensembl.rb	29 Mar 2007 14:14:17 -0000	1.10
***************
*** 179,183 ****
        end
  
!       if aqrgs[4].class == Hash
          options.update(args[4])
        end
--- 179,183 ----
        end
  
!       if args[4].class == Hash
          options.update(args[4])
        end
***************
*** 196,197 ****
--- 196,229 ----
  
  
+ 
+ # Codes for backward-compatibility.
+ #
+ class Bio::Ensembl
+   EBIServerURI = ENSEMBL_URL
+ 
+   def self.server_uri(uri = nil)
+     if uri
+       @uri = uri
+     else
+       @uri || EBIServerURI
+     end
+   end
+     
+   class Base
+     def self.exportview(*args)
+       Bio::Ensembl.new(Organism).exportview(*args)
+     end
+   end
+   
+   class Human < Base
+     Organism = Bio::Ensembl.human.organism
+   end
+   
+   class Mouse < Base
+     Organism = Bio::Ensembl.mouse.organism
+   end
+ end # class Bio::Ensembl
+ 
+ 
+ 
+ 




More information about the bioruby-cvs mailing list