Class: TagGroup
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- TagGroup
- Includes:
- SharedBehaviour::Named, Uuid::Uuidable
- Defined in:
- app/models/tag_group.rb
Defined Under Namespace
Classes: AdapterType, FormObject
Constant Summary collapse
- CHROMIUM_ADAPTER_TYPE =
'Chromium'
Instance Method Summary collapse
- #adapter_type_name ⇒ Object
- #adapter_type_name=(name) ⇒ Object
-
#indexed_tags ⇒ Object
Returns a Hash that maps from the tag index in the group to the oligo sequence for the tag.
- #tags_sorted_by_map_id ⇒ Object
Methods included from SharedBehaviour::Named
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Method Details
#adapter_type_name ⇒ Object
28 29 30 |
# File 'app/models/tag_group.rb', line 28 def adapter_type_name adapter_type.try(:name) || TagGroup::AdapterType::UNSPECIFIED end |
#adapter_type_name=(name) ⇒ Object
32 33 34 |
# File 'app/models/tag_group.rb', line 32 def adapter_type_name=(name) self.adapter_type = TagGroup::AdapterType.find_by!(name:) end |
#indexed_tags ⇒ Object
Returns a Hash that maps from the tag index in the group to the oligo sequence for the tag
37 38 39 |
# File 'app/models/tag_group.rb', line 37 def .to_h { |tag| [tag.map_id, tag.oligo] } end |
#tags_sorted_by_map_id ⇒ Object
24 25 26 |
# File 'app/models/tag_group.rb', line 24 def .sort_by(&:map_id) end |