Class: FluidigmFile::Assay

Inherits:
Object
  • Object
show all
Defined in:
app/models/fluidigm_file.rb

Overview

rubocop:todo Style/Documentation

Constant Summary collapse

@@valid_markers =
%w[XX XY YY]
@@gender_map =
{ 'XX' => 'F', 'YY' => 'F', 'XY' => 'M' }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, result) ⇒ Assay

Returns a new instance of Assay.


58
59
60
61
# File 'app/models/fluidigm_file.rb', line 58

def initialize(name, result)
  @name   = name
  @result = result
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


53
54
55
# File 'app/models/fluidigm_file.rb', line 53

def name
  @name
end

#resultObject (readonly)

Returns the value of attribute result


53
54
55
# File 'app/models/fluidigm_file.rb', line 53

def result
  @result
end

Instance Method Details

#genderObject


67
68
69
# File 'app/models/fluidigm_file.rb', line 67

def gender
  @@gender_map[result] || 'U'
end

#gender_marker?Boolean

Returns:

  • (Boolean)

63
64
65
# File 'app/models/fluidigm_file.rb', line 63

def gender_marker?
  /^GS/.match?(name)
end

#pass?Boolean

Returns:

  • (Boolean)

71
72
73
# File 'app/models/fluidigm_file.rb', line 71

def pass?
  @@valid_markers.include?(result)
end