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 205 def initialize(str) 206 @cterm = '' 207 @score = 0 208 @profile = 0 209 @spptna = 0 210 @sppta = 0 211 @fp = 0 212 @prediction = 0 213 214 if /PTS1 query prediction/m =~ str 215 @output = str 216 parse 217 else 218 raise 219 end 220 end
Private Instance Methods
parse()
click to toggle source
# File lib/bio/appl/pts1.rb 225 def parse 226 @output.each_line do |line| 227 case line 228 when /Name<\/td><td>(\S.+)<\/td><\/tr>/ 229 @entry_id = $1 230 when /C-terminus<\/td><td>(\w+)<\/td>/ 231 @cterm = $1 232 when /Score<\/b><td><b>(-?\d.+?)<\/b><\/td><\/tr>/ 233 @score = $1 234 when /Profile<\/i><\/td><td>(.+?)<\/td>/ 235 @profile = $1 236 when /S_ppt \(non-accessibility\)<\/i><\/td><td>(.+?)<\/td>/ 237 @spptna = $1 238 when /S_ppt \(accessibility\)<\/i><\/td><td>(.+?)<\/td>/ 239 @sppta = $1 240 when /P\(false positive\)<\/i><\/td><td>(.+?)<\/td>/ 241 @fp = $1 242 when /Prediction classification<\/i><\/td><td>(\w.+?)<\/td>/ 243 @prediction = $1 244 else 245 end 246 end 247 end