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.


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

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


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

def entry_id
  @entry_id
end

#predictionObject (readonly)

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


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

def prediction
  @prediction
end

#tmhsObject (readonly)

Transmembrane helixes ary


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

def tmhs
  @tmhs
end