Class: Nimbus::Individual
- Inherits:
-
Object
- Object
- Nimbus::Individual
- 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
-
#fenotype ⇒ Object
Returns the value of attribute fenotype.
-
#id ⇒ Object
Returns the value of attribute id.
-
#prediction ⇒ Object
Returns the value of attribute prediction.
-
#snp_list ⇒ Object
Returns the value of attribute snp_list.
Instance Method Summary collapse
-
#initialize(i, fen, snps = []) ⇒ Individual
constructor
Initialize individual with passed data.
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
#fenotype ⇒ Object
Returns the value of attribute fenotype.
15 16 17 |
# File 'lib/nimbus/individual.rb', line 15 def fenotype @fenotype end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/nimbus/individual.rb', line 15 def id @id end |
#prediction ⇒ Object
Returns the value of attribute prediction.
15 16 17 |
# File 'lib/nimbus/individual.rb', line 15 def prediction @prediction end |
#snp_list ⇒ Object
Returns the value of attribute snp_list.
15 16 17 |
# File 'lib/nimbus/individual.rb', line 15 def snp_list @snp_list end |