[BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.5,1.6

Trevor Wennblom trevor at dev.open-bio.org
Mon Jan 1 00:12:56 UTC 2007


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

Modified Files:
	restriction_enzyme.rb 
Log Message:


Index: restriction_enzyme.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** restriction_enzyme.rb	31 Dec 2006 21:50:31 -0000	1.5
--- restriction_enzyme.rb	1 Jan 2007 00:12:54 -0000	1.6
***************
*** 203,227 ****
      # Returns a Bio::REBASE object loaded with all of the enzyme data on file.
      #
!     #--
!     # FIXME: Use File.join
!     #++
!     def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml')
!       #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml')
! 
!       @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml)
        @@rebase_enzymes
      end
  
!     # Primitive way of determining if a string is an enzyme name.
!     #
!     # A nucleotide or nucleotide
!     # set can't ever contain an 'i'.  Restriction enzymes always end in 'i'.
      #
!     #--
!     # FIXME: Change this to actually look up the enzyme name to see if it's valid.
!     #++
      #
!     def self.enzyme_name?( str )
!       str[-1].chr.downcase == 'i'
      end
  
--- 203,226 ----
      # Returns a Bio::REBASE object loaded with all of the enzyme data on file.
      #
!     # ---
!     # *Arguments*
!     # * _none_
!     # *Returns*:: Bio::REBASE
!     def self.rebase
!       enzymes_yaml_file = File.join(File.dirname(File.expand_path(__FILE__)), 'restriction_enzyme', 'enzymes.yaml')
!       @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml_file)
        @@rebase_enzymes
      end
  
!     # Check if supplied name is the name of an available enzyme
      #
!     # See Bio::REBASE.enzyme_name?
      #
!     # ---
!     # *Arguments*
!     # * +name+: Enzyme name
!     # *Returns*:: +true/false+
!     def self.enzyme_name?( name )
!       self.rebase.enzyme_name?(name)
      end
  



More information about the bioruby-cvs mailing list