class Bio::ExportPred::Result

Public Class Methods

all_result_names() click to toggle source
# File lib/bio/appl/exportpred.rb, line 82
def self.all_result_names
  @@all_result_names
end
create_from_line(line, options={}) click to toggle source

Given the STDOUT from the ExportPred program, create a programmatically manipulatable Bio::ExportPred::Result object

TODO: explain options={}

# File lib/bio/appl/exportpred.rb, line 54
def self.create_from_line(line, options={})
  result = Result.new
  if !line or line == ''
    result.predicted_rle = false unless options[:no_RLE]
    result.predicted_kld = false unless options[:no_KLD]
    return result
  end
  
  # line is going to be something like
  # metoo RLE     6.44141     [a-met:M][a-leader:AVSTYNNTRRNGLRYVLKRR][a-hydrophobic:TILSVFAVICMLSL][a-spacer:NLSIFENNNNNYGFHCNKRH][a-RLE:FKSLAEA][a-tail:SPEEHNNLRSHSTSDPKKNEEKSLSDEINKCDMKKYTAEEINEMINSSNEFINRNDMNIIFSYVHESEREKFKKVEENIFKFIQSIVETYKIPDEYKMRKFKFAHFEMQGYALKQEKFLLEYAFLSLNGKLCERKKFKEVLEYVKREWIEFRKSMFDVWKEKLASEFREHGEMLNQKRKLKQHELDRRAQREKMLEEHSRGIFAKGYLGEVESETIKKKTEHHENVNEDNVEKPKLQQHKVQPPKVQQQKVQPPKSQQQKVQPPKSQQQKVQPPKVQQQKVQPPKVQKPKLQNQKGQKQVSPKAKGNNQAKPTKGNKLKKN]
  splits = line.split("\t")
  raise Exception, "Badly parsed line: #{line}" if splits.length != 4
  if splits[1] == 'RLE'
    result.predicted_rle = true
  elsif splits[1] = 'KLD'
    result.predicted_kld = true
  end
  result.score = splits[2].to_f
  return result
end

Public Instance Methods

predicted?() click to toggle source
# File lib/bio/appl/exportpred.rb, line 75
def predicted?
  @predicted_rle or @predicted_kld
end
Also aliased as: signal?
signal?()
Alias for: predicted?