Class: FluidigmFile::Assay
- Inherits:
-
Object
- Object
- FluidigmFile::Assay
- Defined in:
- app/models/fluidigm_file.rb
Constant Summary collapse
- @@valid_markers =
%w[XX XY YY]
- @@gender_map =
{ 'XX' => 'F', 'YY' => 'F', 'XY' => 'M' }
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #gender ⇒ Object
- #gender_marker? ⇒ Boolean
-
#initialize(name, result) ⇒ Assay
constructor
A new instance of Assay.
- #pass? ⇒ Boolean
Constructor Details
#initialize(name, result) ⇒ Assay
Returns a new instance of Assay.
40 41 42 43 |
# File 'app/models/fluidigm_file.rb', line 40 def initialize(name, result) @name = name @result = result end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
35 36 37 |
# File 'app/models/fluidigm_file.rb', line 35 def name @name end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
35 36 37 |
# File 'app/models/fluidigm_file.rb', line 35 def result @result end |
Instance Method Details
#gender ⇒ Object
49 50 51 |
# File 'app/models/fluidigm_file.rb', line 49 def gender @@gender_map[result] || 'U' end |
#gender_marker? ⇒ Boolean
45 46 47 |
# File 'app/models/fluidigm_file.rb', line 45 def gender_marker? /^GS/.match?(name) end |
#pass? ⇒ Boolean
53 54 55 |
# File 'app/models/fluidigm_file.rb', line 53 def pass? @@valid_markers.include?(result) end |