Class: SequencescapeExcel::SpecialisedField::ChromiumTagWell
- Inherits:
-
Object
- Object
- SequencescapeExcel::SpecialisedField::ChromiumTagWell
- Includes:
- Base
- Defined in:
- app/sequencescape_excel/sequencescape_excel/specialised_field/chromium_tag_well.rb
Overview
ChromiumTagWell
Constant Summary collapse
- TAGS_PER_WELL =
4
Instance Attribute Summary collapse
-
#sf_tag_group ⇒ Object
Returns the value of attribute sf_tag_group.
Attributes included from Base
#sample_manifest_asset, #value
Instance Method Summary collapse
Instance Attribute Details
#sf_tag_group ⇒ Object
Returns the value of attribute sf_tag_group.
12 13 14 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/chromium_tag_well.rb', line 12 def sf_tag_group @sf_tag_group end |
Instance Method Details
#link(other_fields) ⇒ Object
33 34 35 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/chromium_tag_well.rb', line 33 def link(other_fields) self.sf_tag_group = other_fields[SequencescapeExcel::SpecialisedField::ChromiumTagGroup] end |
#update(_attributes = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/chromium_tag_well.rb', line 18 def update(_attributes = {}) return unless valid? if asset.aliquots.one? .each { |tag| tag.multitag!(asset) } elsif aliquot_count == TAGS_PER_WELL .zip(aliquots).each { |tag, aliquot| aliquot.assign_attributes(tag:) } else # We should never end up here, as our validation should handle this # However if that fails, something has gone wrong, and we shouldn't proceed # Fail noisily raise StandardError, 'Tag aliquot mismatch' end end |