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

Mitsuteru C. Nakao nakao at pub.open-bio.org
Sun Dec 18 12:08:31 EST 2005


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

Modified Files:
	prosite.rb 
Log Message:
* Added some RDoc documents.


Index: prosite.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/prosite.rb,v
retrieving revision 0.11
retrieving revision 0.12
diff -C2 -d -r0.11 -r0.12
*** prosite.rb	26 Sep 2005 13:00:06 -0000	0.11
--- prosite.rb	18 Dec 2005 17:08:29 -0000	0.12
***************
*** 1,6 ****
  #
! # bio/db/prosite.rb - PROSITE database class
  #
! #   Copyright (C) 2001 KATAYAMA Toshiaki <k at bioruby.org>
  #
  #  This library is free software; you can redistribute it and/or
--- 1,16 ----
  #
! # = bio/db/prosite.rb - PROSITE database class
! #
! # Copyright::  Copyright (C) 2001 KATAYAMA Toshiaki <k at bioruby.org>
! # Licence::    LGPL
! #
! # $Id$
! #
! # == Description
  #
! #
! # == Example
! # == References
! #--
  #
  #  This library is free software; you can redistribute it and/or
***************
*** 18,22 ****
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  #
! #  $Id$
  #
  
--- 28,32 ----
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  #
! #++
  #
  
***************
*** 27,32 ****
    class PROSITE < EMBLDB
  
!     DELIMITER	= RS = "\n//\n"
!     TAGSIZE	= 5
  
      def initialize(entry)
--- 37,49 ----
    class PROSITE < EMBLDB
  
!     # Delimiter
!     DELIMITER = "\n//\n"
! 
!     # Delimiter
!     RS = DELIMITER
! 
!     # Bio::DB API
!     TAGSIZE = 5
! 
  
      def initialize(entry)
***************
*** 39,42 ****
--- 56,60 ----
      #  ID   ENTRY_NAME; ENTRY_TYPE.  (ENTRY_TYPE : PATTERN, MATRIX, RULE)
      #
+     # Returns
      def name
        unless @data['ID']
***************
*** 45,48 ****
--- 63,68 ----
        @data['ID']
      end
+ 
+     # Returns
      def division
        unless @data['TYPE']
***************
*** 57,60 ****
--- 77,81 ----
      #  AC   PSnnnnn;
      #
+     # Returns
      def ac
        unless @data['AC']
***************
*** 63,66 ****
--- 84,88 ----
        @data['AC']
      end
+ 
      alias entry_id ac
  
***************
*** 70,76 ****
--- 92,100 ----
      #  DT   MMM-YYYY (CREATED); MMM-YYYY (DATA UPDATE); MMM-YYYY (INFO UPDATE).
      #
+     # Returns
      def dt
        field_fetch('DT')
      end
+ 
      alias date dt
  
***************
*** 80,86 ****
--- 104,112 ----
      #  DE   Description.
      #
+     # Returns
      def de
        field_fetch('DE')
      end
+ 
      alias definition de
  
***************
*** 90,93 ****
--- 116,120 ----
      #  see - pa2re method
      #
+     # Returns
      def pa
        field_fetch('PA')
***************
*** 96,99 ****
--- 123,127 ----
        @data['PA']
      end
+ 
      alias pattern pa
  
***************
*** 103,109 ****
--- 131,139 ----
      #  see - ma2re method
      #
+     # Returns
      def ma
        field_fetch('MA')
      end
+ 
      alias profile ma
  
***************
*** 115,121 ****
--- 145,153 ----
      #  The rule is described in ordinary English and is free-format.
      #
+     # Returns
      def ru
        field_fetch('RU')
      end
+ 
      alias rule ru
  
***************
*** 138,141 ****
--- 170,174 ----
      #              profile because they are partial (fragment) sequences.
      #
+     # Returns
      def nr
        unless @data['NR']
***************
*** 159,224 ****
--- 192,274 ----
        @data['NR']
      end
+ 
      alias statistics nr
  
+     # Returns
      def release
        statistics['RELEASE']
      end
  
+     # Returns
      def swissprot_release_number
        release.first
      end
  
+     # Returns
      def swissprot_release_sequences
        release.last
      end
  
+     # Returns
      def total
        statistics['TOTAL']
      end
  
+     # Returns
      def total_hits
        total.first
      end
  
+     # Returns
      def total_sequences
        total.last
      end
  
+     # Returns
      def positive
        statistics['POSITIVE']
      end
  
+     # Returns
      def positive_hits
        positive.first
      end
  
+     # Returns
      def positive_sequences
        positive.last
      end
  
+     # Returns
      def unknown
        statistics['UNKNOWN']
      end
  
+     # Returns
      def unknown_hits
        unknown.first
      end
  
+     # Returns
      def unknown_sequences
        unknown.last
      end
  
+     # Returns
      def false_pos
        statistics['FALSE_POS']
      end
  
+     # Returns
      def false_positive_hits
        false_pos.first
      end
  
+     # Returns
      def false_positive_sequences
        false_pos.last
      end
  
+     # Returns
      def false_neg
        statistics['FALSE_NEG']
***************
*** 226,229 ****
--- 276,280 ----
      alias false_negative_hits false_neg
  
+     # Returns
      def partial
        statistics['PARTIAL']
***************
*** 242,245 ****
--- 293,297 ----
      #              by a program (because it is too unspecific).
      #
+     # Returns
      def cc
        unless @data['CC']
***************
*** 252,257 ****
--- 304,311 ----
        @data['CC']
      end
+ 
      alias comment cc
  
+     # Returns
      def taxon_range(expand = nil)
        range = comment['TAXO-RANGE']
***************
*** 272,279 ****
--- 326,335 ----
      end
  
+     # Returns
      def max_repeat
        comment['MAX-REPEAT'].to_i
      end
  
+     # Returns
      def site
        if comment['SITE']
***************
*** 283,286 ****
--- 339,343 ----
      end
  
+     # Returns
      def skip_flag
        if comment['SKIP-FLAG'] == 'TRUE'
***************
*** 312,315 ****
--- 369,373 ----
      #   consideration.
      #
+     # Returns
      def dr
        unless @data['DR']
***************
*** 324,329 ****
--- 382,389 ----
        @data['DR']
      end
+ 
      alias sp_xref dr
  
+     # Returns
      def list_xref(flag, by_name = nil)
        ary = []
***************
*** 341,360 ****
--- 401,425 ----
      end
  
+     # Returns
      def list_truepositive(by_name = nil)
        list_xref('T', by_name)
      end
  
+     # Returns
      def list_falsenegative(by_name = nil)
        list_xref('F', by_name)
      end
  
+     # Returns
      def list_falsepositive(by_name = nil)
        list_xref('P', by_name)
      end
  
+     # Returns
      def list_potentialhit(by_name = nil)
        list_xref('P', by_name)
      end
  
+     # Returns
      def list_unknown(by_name = nil)
        list_xref('?', by_name)
***************
*** 366,369 ****
--- 431,435 ----
      #  3D   name; [name2;...]
      #
+     # Returns
      def pdb_xref
        unless @data['3D']
***************
*** 378,381 ****
--- 444,448 ----
      #  DO   PDOCnnnnn;
      #
+     # Returns
      def pdoc_xref
        @data['DO'] = fetch('DO').chomp(';')
***************
*** 421,424 ****
--- 488,492 ----
      # translated as: Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
      #
+     # Returns
      def pa2re(pattern)
        pattern.gsub!(/\s/, '')	# remove white spaces
***************
*** 442,445 ****
--- 510,514 ----
      # prosite/profile.txt:
      #
+     # Returns
      def ma2re(matrix)
        raise NotImplementedError



More information about the bioruby-cvs mailing list