[BioRuby-cvs] bioruby/lib/bio/db prosite.rb,0.12,0.13

Katayama Toshiaki k at pub.open-bio.org
Sun Dec 18 13:24:10 EST 2005


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

Modified Files:
	prosite.rb 
Log Message:
* fixed to pass the tests
* class method Bio::PROSITE.pa2re(pattern) #=> regexp is added
* pdb_xref method is fixed to remove ; from the last entry


Index: prosite.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/prosite.rb,v
retrieving revision 0.12
retrieving revision 0.13
diff -C2 -d -r0.12 -r0.13
*** prosite.rb	18 Dec 2005 17:08:29 -0000	0.12
--- prosite.rb	18 Dec 2005 18:24:08 -0000	0.13
***************
*** 434,438 ****
      def pdb_xref
        unless @data['3D']
!         @data['3D'] = fetch('3D').split(/; /)
        end
        @data['3D']
--- 434,438 ----
      def pdb_xref
        unless @data['3D']
!         @data['3D'] = fetch('3D').split(/; */)
        end
        @data['3D']
***************
*** 488,493 ****
      # translated as: Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
      #
!     # Returns
!     def pa2re(pattern)
        pattern.gsub!(/\s/, '')	# remove white spaces
        pattern.sub!(/\.$/, '')	# (1) remove trailing '.'
--- 488,492 ----
      # translated as: Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
      #
!     def self.pa2re(pattern)
        pattern.gsub!(/\s/, '')	# remove white spaces
        pattern.sub!(/\.$/, '')	# (1) remove trailing '.'
***************
*** 503,506 ****
--- 502,509 ----
        pattern.tr!('-', '')	# (6) each element is separated by a '-'
        Regexp.new(pattern)
+     end
+ 
+     def pa2re(pattern)
+       self.class.pa2re(pattern)
      end
  



More information about the bioruby-cvs mailing list