class Bio::SOSUI::Report
SOSUI output report parsing class¶ ↑
References¶ ↑
Constants
- DELIMITER
Delimiter
- RS
Attributes
entry_id[R]
Query #entry_id
prediction[R]
Returns the prediction result whether “MEMBRANE PROTEIN” or “SOLUBLE PROTEIN”.
tmhs[R]
Transmembrane helixes ary
Public Class Methods
new(output_report)
click to toggle source
Parser for SOSUI output report.
# 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
Private Instance Methods
parse_tmh(entry)
click to toggle source
Parser for TMH lines.
# File lib/bio/appl/sosui/report.rb, line 58 def parse_tmh(entry) entry.each do |line| if /NUMBER OF TM HELIX = (\d+)/ =~ line @tms = $1 elsif /TM (\d+) +(\d+)- *(\d+) (\w+) +(\w+)/ =~ line tmh = $1.to_i range = Range.new($2.to_i, $3.to_i) grade = $4 seq = $5 @tmhs.push(TMH.new(range, grade, seq)) end end end