Class: Nimbus::Individual

Inherits:
Object
  • Object
show all
Defined in:
lib/nimbus/individual.rb

Overview

Nimbus Individual object.

It represents a single individual of a training or testing sample.

This class stores information about a individual:

  • id,

  • values for all the SNPs of the individual,

  • fenotype if present,

  • the prediction is it exists.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(i, fen, snps = []) ⇒ Individual

Initialize individual with passed data.


18
19
20
21
22
# File 'lib/nimbus/individual.rb', line 18

def initialize(i, fen, snps=[])
  self.id = i
  self.fenotype = fen
  self.snp_list = snps
end

Instance Attribute Details

#fenotypeObject

Returns the value of attribute fenotype


15
16
17
# File 'lib/nimbus/individual.rb', line 15

def fenotype
  @fenotype
end

#idObject

Returns the value of attribute id


15
16
17
# File 'lib/nimbus/individual.rb', line 15

def id
  @id
end

#predictionObject

Returns the value of attribute prediction


15
16
17
# File 'lib/nimbus/individual.rb', line 15

def prediction
  @prediction
end

#snp_listObject

Returns the value of attribute snp_list


15
16
17
# File 'lib/nimbus/individual.rb', line 15

def snp_list
  @snp_list
end