[BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.6,1.7

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


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

Modified Files:
	rebase.rb 
Log Message:


Index: rebase.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rebase.rb	31 Dec 2006 23:22:03 -0000	1.6
--- rebase.rb	1 Jan 2007 00:12:54 -0000	1.7
***************
*** 80,83 ****
--- 80,84 ----
  # 
  #   pp rebase.enzymes[0..4]                     # ["AarI", "AasI", "AatI", "AatII", "Acc16I"]
+ #   pp rebase.enzyme_name?('aasi')              # true
  #   pp rebase['AarI'].pattern                   # "CACCTGC"
  #   pp rebase['AarI'].blunt?                    # false
***************
*** 198,201 ****
--- 199,215 ----
      @data.keys.sort
    end
+   
+   # Check if supplied name is the name of an available enzyme
+   #
+   # ---
+   # *Arguments*
+   # * +name+: Enzyme name
+   # *Returns*:: +true/false+
+   def enzyme_name?(name)
+     enzymes.each do |e|
+       return true if e.downcase == name.downcase
+     end
+     return false
+   end
  
    # Save the current data



More information about the bioruby-cvs mailing list