Class: Bio::HMMER::HMMER3::TabularReport

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/appl/hmmer/hmmer3/tabular_report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#formatObject (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

#hitsObject (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