Class: Bio::HMMER::HMMER3::TabularReport
- Inherits:
-
Object
- Object
- Bio::HMMER::HMMER3::TabularReport
- Defined in:
- lib/bio/appl/hmmer/hmmer3/tabular_report.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#hits ⇒ Object
readonly
Returns the value of attribute hits.
Instance Method Summary collapse
-
#initialize(hmmer_output, format = nil) ⇒ TabularReport
constructor
A new instance of TabularReport.
Constructor Details
#initialize(hmmer_output, format = nil) ⇒ TabularReport
Returns a new instance of TabularReport.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bio/appl/hmmer/hmmer3/tabular_report.rb', line 20 def initialize(hmmer_output, format = nil) @hits = Array.new @line_number = 0 @format = format if hmmer_output.kind_of?(String) str = StringIO.new(hmmer_output) str.each_line() { |line| parse_line(line) } elsif hmmer_output.kind_of?(IO) hmmer_output.each_line() { |line| parse_line(line) } else raise "Unexpected hmmer_output class: excpected String or IO, found #{hmmer_output.class}" end end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
36 37 38 |
# File 'lib/bio/appl/hmmer/hmmer3/tabular_report.rb', line 36 def format @format end |
#hits ⇒ Object (readonly)
Returns the value of attribute hits.
35 36 37 |
# File 'lib/bio/appl/hmmer/hmmer3/tabular_report.rb', line 35 def hits @hits end |