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)


175
176
177
178
# File 'lib/bio/appl/plasmoap.rb', line 175

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.



174
175
176
# File 'lib/bio/appl/plasmoap.rb', line 174

def points
  @points
end

Instance Method Details

#==(another) ⇒ Object



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

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)


199
200
201
# File 'lib/bio/appl/plasmoap.rb', line 199

def apicoplast_targeted?
  @points >= 4
end

#to_sObject



180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/bio/appl/plasmoap.rb', line 180

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