Class: Bio::PlasmoAPResult

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/appl/plasmoap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(points) ⇒ PlasmoAPResult

Returns a new instance of PlasmoAPResult.

Raises:

  • (Exception)


170
171
172
173
# File 'lib/bio/appl/plasmoap.rb', line 170

def initialize(points)
  @points = points
  raise Exception, "Bad PlasmoAP Score points: #{points}" if points < 0 or points > 5
end

Instance Attribute Details

#pointsObject (readonly)

Returns the value of attribute points.



169
170
171
# File 'lib/bio/appl/plasmoap.rb', line 169

def points
  @points
end

Instance Method Details

#==(another) ⇒ Object



188
189
190
# File 'lib/bio/appl/plasmoap.rb', line 188

def ==(another)
  @points == another.points
end

#apicoplast_targeted?Boolean Also known as: predicted?, signal?

‘+’ or ‘++’ scores were taken as apicoplast targeted in the paper does this result pass that test?

Returns:

  • (Boolean)


194
195
196
# File 'lib/bio/appl/plasmoap.rb', line 194

def apicoplast_targeted?
  @points >= 4
end

#to_sObject



175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/bio/appl/plasmoap.rb', line 175

def to_s
  case @points
  when 0..2
    return '-'
  when 3
    return '0'
  when 4
    return '+'
  when 5
    return '++'
  end
end