[BioRuby-cvs] bioruby/lib/bio/appl/tmhmm report.rb,1.4,1.5

Mitsuteru C. Nakao nakao at pub.open-bio.org
Sun Nov 6 11:10:10 EST 2005


Update of /home/repository/bioruby/bioruby/lib/bio/appl/tmhmm
In directory pub.open-bio.org:/tmp/cvs-serv13513/lib/bio/appl/tmhmm

Modified Files:
	report.rb 
Log Message:
* Converted to RDoc.


Index: report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/tmhmm/report.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** report.rb	26 Sep 2005 13:00:06 -0000	1.4
--- report.rb	6 Nov 2005 16:10:07 -0000	1.5
***************
*** 1,6 ****
  #
! # bio/appl/tmhmm/report.rb - TMHMM report class
  # 
! #   Copyright (C) 2003 Mitsuteru C. Nakao <n at bioruby.org>
  #
  #  This library is free software; you can redistribute it and/or
--- 1,16 ----
  #
! # = bio/appl/tmhmm/report.rb - TMHMM report class
  # 
! # Copyright::  Copyright (C) 2003 Mitsuteru C. Nakao <n at bioruby.org>
! # Licence::    LGPL
! #
! #  $Id$
! #
! # == Description
! #
! #
! # == Example
! # == References
! #--
  #
  #  This library is free software; you can redistribute it and/or
***************
*** 18,28 ****
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  #
! #  $Id$
  #
  
  module Bio
  
    class TMHMM
  
      def TMHMM.reports(data)
        entry     = []
--- 28,40 ----
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  #
! #++
  #
  
  module Bio
  
+   # = TMHMM class for http://www.cbs.dtu.dk/services/TMHMM/
    class TMHMM
  
+     # Splits multiple reports into a report entry.
      def TMHMM.reports(data)
        entry     = []
***************
*** 58,76 ****
      end
  
! 
      class Report
  
        def initialize(entry = nil)
          parse_header(entry)
          @tmhs = parse_tmhs(entry)
        end
-       attr_reader :tmhs, :entry_id, :query_len, :predicted_tmhs,
-         :exp_aas_in_tmhs, :exp_first_60aa, :total_prob_of_N_in
-       alias length query_len
  
        def helix
          @tmhs.map {|t| t if t.status == 'TMhelix' }.compact
        end
  
        def to_s
          [
--- 70,111 ----
      end
  
!     # = TMHMM report parser class.
      class Report
  
+       # Returns an Array of Bio::TMHMM::TMH.
+       attr_reader :tmhs
+ 
+       # Returns
+       attr_reader :entry_id
+ 
+       # Returns
+       attr_reader :query_len
+ 
+       # Returns
+       attr_reader :predicted_tmhs
+ 
+       # Returns
+       attr_reader :exp_aas_in_tmhs
+ 
+       # Returns
+       attr_reader :exp_first_60aa
+ 
+       # Returns
+       attr_reader :total_prob_of_N_in
+ 
+       alias length query_len
+ 
+       #
        def initialize(entry = nil)
          parse_header(entry)
          @tmhs = parse_tmhs(entry)
        end
  
+       # Returns an Array of Bio::TMHMM::TMH including only "TMhelix".
        def helix
          @tmhs.map {|t| t if t.status == 'TMhelix' }.compact
        end
  
+       #
        def to_s
          [
***************
*** 89,92 ****
--- 124,128 ----
        private
  
+       #
        def parse_header(raw)
          raw.each do |line|
***************
*** 109,112 ****
--- 145,149 ----
        end
  
+       #
        def parse_tmhs(raw)
          tmhs = []
***************
*** 127,132 ****
--- 164,186 ----
  
  
+     # = Container class of the trainsmembrane helix(TMH) and the other
+     #   segments.
      class TMH
  
+       # Returns
+       attr_accessor :entry_id
+ 
+       # Returns
+       attr_accessor :version
+ 
+       # Returns the status of the TMH. ("outside", "TMhelix" or "inside").
+       attr_accessor :status
+ 
+       # Returns an Range of TMH position.
+       attr_accessor :range
+ 
+       alias pos range
+ 
+       #
        def initialize(entry_id = nil, version = nil, status = nil, range = nil)
          @entry_id = entry_id
***************
*** 135,141 ****
          @range    = range
        end
-       attr_accessor :entry_id, :version, :status, :range
-       alias pos range
  
        def to_s
          [@entry_id, @version, @status, @range.first, @range.last].join("\t")
--- 189,194 ----
          @range    = range
        end
  
+       #
        def to_s
          [@entry_id, @version, @status, @range.first, @range.last].join("\t")
***************
*** 161,164 ****
--- 214,218 ----
      puts ent.to_s
      pp ent
+ 
      p [:entry_id, ent.entry_id]
      p [:query_len, ent.query_len]
***************
*** 183,241 ****
  
  end
- 
- 
- =begin
- 
- = Bio::TMHMM
- 
-     TMHMM class for ((<URL:http://www.cbs.dtu.dk/services/TMHMM/>))
- 
- --- Bio::TMHMM.reports(str) 
- 
-       Splits multiple reports into a report entry.
- 
- 
- = Bio::TMHMM::Report
- 
-     TMHMM report parser class.
- 
- --- Bio::TMHMM::Report.new(str)
- 
- --- Bio::TMHMM::Report#entry_id
- --- Bio::TMHMM::Report#query_len
- --- Bio::TMHMM::Report#predicted_tmhs
- --- Bio::TMHMM::Report#exp_aas_in_tmhs
- --- Bio::TMHMM::Report#exp_first_60aa
- --- Bio::TMHMM::Report#total_prob_of_N_in
- 
- 
- --- Bio::TMHMM::Report#tmhs
- 
-       Retruns an Array of Bio::TMHMM::TMH.
- 
- --- Bio::TMHMM::Report#helix
- 
-       Returns an Array of Bio::TMHMM::TMH including only "TMhelix".
- 
- = Bio::TMHMM::TMH
- 
-     Container class of the trainsmembrane helix(TMH) and the other 
-     segments.
- 
- --- Bio::TMHMM::TMH.new(entry_id, version, status, first_pos, last_pos)
- 
- --- Bio::TMHMM::TMH#entry_id
- --- Bio::TMHMM::TMH#version
- --- Bio::TMHMM::TMH#status
- 
-       Returns the status of the TMH. ("outside", "TMhelix" or "inside").
- 
- --- Bio::TMHMM::TMH#range
- 
-       Returns an Range of TMH position.
- 
- --- Bio::TMHMM::TMH#pos
- 
-       Alias to Bio::TMHMM:TMH#range
- 
- =end
--- 237,238 ----



More information about the bioruby-cvs mailing list