class Bio::PTS1::Report
Parser for the PTS1 prediction Report (in HTML).¶ ↑
Attributes
cterm[R]
Amino acids subsequence at C-terminal region.
entry_id[R]
Query sequence name.
fp[R]
False positive probability
output[R]
Raw output
prediction[R]
Prediction (“Targeted”, “Twilight zone” and “Not targeted”)
profile[R]
Profile
score[R]
Score
sppta[R]
S_ppt (accessibility)
spptna[R]
S_ppt (non accessibility)
Public Class Methods
new(str)
click to toggle source
Parsing PTS1 HTML report.
Example¶ ↑
report = Bio::PTS1::Report.new(str) report.cterm
# File lib/bio/appl/pts1.rb, line 205 def initialize(str) @cterm = '' @score = 0 @profile = 0 @spptna = 0 @sppta = 0 @fp = 0 @prediction = 0 if /PTS1 query prediction/m =~ str @output = str parse else raise end end
Private Instance Methods
parse()
click to toggle source
# File lib/bio/appl/pts1.rb, line 225 def parse @output.each_line do |line| case line when /Name<\/td><td>(\S.+)<\/td><\/tr>/ @entry_id = $1 when /C-terminus<\/td><td>(\w+)<\/td>/ @cterm = $1 when /Score<\/b><td><b>(-?\d.+?)<\/b><\/td><\/tr>/ @score = $1 when /Profile<\/i><\/td><td>(.+?)<\/td>/ @profile = $1 when /S_ppt \(non-accessibility\)<\/i><\/td><td>(.+?)<\/td>/ @spptna = $1 when /S_ppt \(accessibility\)<\/i><\/td><td>(.+?)<\/td>/ @sppta = $1 when /P\(false positive\)<\/i><\/td><td>(.+?)<\/td>/ @fp = $1 when /Prediction classification<\/i><\/td><td>(\w.+?)<\/td>/ @prediction = $1 else end end end