Class: SequencescapeExcel::SpecialisedField::DualIndexTagWell
- Inherits:
-
Object
- Object
- SequencescapeExcel::SpecialisedField::DualIndexTagWell
- Includes:
- Base, ValueRequired, ValueToUpcase
- Defined in:
- app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb
Overview
DualIndexTagWell
Constant Summary collapse
- PLATE_SIZE =
96
Instance Attribute Summary collapse
-
#sf_dual_index_tag_set ⇒ Object
Returns the value of attribute sf_dual_index_tag_set.
Attributes included from Base
#sample_manifest_asset, #value
Instance Method Summary collapse
-
#dual_index_tag_set ⇒ Object
From the validation in DualIndexTagSet, we know this tag set is a valid dual index tag set with a visible tag group and visible tag2 group.
- #link(other_fields) ⇒ Object
- #tag2_group_id ⇒ Object
- #tag_group_id ⇒ Object
- #update(_attributes = {}) ⇒ Object
Methods included from ValueToUpcase
Instance Attribute Details
#sf_dual_index_tag_set ⇒ Object
Returns the value of attribute sf_dual_index_tag_set.
17 18 19 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 17 def sf_dual_index_tag_set @sf_dual_index_tag_set end |
Instance Method Details
#dual_index_tag_set ⇒ Object
From the validation in DualIndexTagSet, we know this tag set is a valid dual index tag set with a visible tag group and visible tag2 group
40 41 42 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 40 def dual_index_tag_set @dual_index_tag_set = TagSet.find(sf_dual_index_tag_set.tag_set_id) if sf_dual_index_tag_set&.tag_set_id end |
#link(other_fields) ⇒ Object
34 35 36 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 34 def link(other_fields) self.sf_dual_index_tag_set = other_fields[SequencescapeExcel::SpecialisedField::DualIndexTagSet] end |
#tag2_group_id ⇒ Object
48 49 50 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 48 def tag2_group_id @tag2_group_id ||= ::TagGroup.find_by(id: dual_index_tag_set.tag2_group_id, visible: true).id end |
#tag_group_id ⇒ Object
44 45 46 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 44 def tag_group_id @tag_group_id ||= ::TagGroup.find_by(id: dual_index_tag_set.tag_group_id, visible: true).id end |
#update(_attributes = {}) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/dual_index_tag_well.rb', line 25 def update(_attributes = {}) return unless valid? raise StandardError, 'Tag aliquot mismatch' unless asset.aliquots.one? # For dual index tags, tag is a i7 oligo and tag2 is a i5 oligo asset.aliquots.first.update(tag:, tag2:) end |