Class: Bio::SOSUI::Report

Inherits:
Object show all
Defined in:
lib/bio/appl/sosui/report.rb

Overview

Defined Under Namespace

Classes: TMH

Constant Summary collapse

DELIMITER =

Delimiter

"\n>"
RS =
DELIMITER

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output_report) ⇒ Report

Parser for SOSUI output report.



45
46
47
48
49
50
51
52
53
# File 'lib/bio/appl/sosui/report.rb', line 45

def initialize(output_report)
  entry       = output_report.split(/\n/)

  @entry_id   = entry[0].strip.sub(/^>/,'')
  @prediction = entry[1].strip
  @tms        = 0
  @tmhs       = []
  parse_tmh(entry) if /MEMBRANE/ =~ @prediction
end

Instance Attribute Details

#entry_idObject (readonly)

Query entry_id



35
36
37
# File 'lib/bio/appl/sosui/report.rb', line 35

def entry_id
  @entry_id
end

#predictionObject (readonly)

Returns the prediction result whether “MEMBRANE PROTEIN” or “SOLUBLE PROTEIN”.



39
40
41
# File 'lib/bio/appl/sosui/report.rb', line 39

def prediction
  @prediction
end

#tmhsObject (readonly)

Transmembrane helixes ary



42
43
44
# File 'lib/bio/appl/sosui/report.rb', line 42

def tmhs
  @tmhs
end