Class: Sequencescape::Api::V2::Aliquot
- Inherits:
-
Base
- Object
- Base
- Sequencescape::Api::V2::Aliquot
- Defined in:
- app/sequencescape/sequencescape/api/v2/aliquot.rb
Overview
rubocop:todo Style/Documentation
Instance Method Summary collapse
-
#equivalent_attributes ⇒ Object
This is our best attempt at mimicking the equivalent aliquot behaviour over in Sequencescape Aliquot::equivalent_attributes We use a smaller subset of attributes here, to avoid sending everything over the api.
- #order_group ⇒ Object
-
#tag_pair ⇒ Object
Returns the combination of tag and tag2 oligos for the aliquot.
- #tagged? ⇒ Boolean
Instance Method Details
#equivalent_attributes ⇒ Object
This is our best attempt at mimicking the equivalent aliquot behaviour over in Sequencescape Aliquot::equivalent_attributes We use a smaller subset of attributes here, to avoid sending everything over the api. In future we could consider:
-
Sending over all attributes
-
Hashing the attributes sequencescape side and sending that over.
But for the moment this will suffice, as in practice existing process should ensure that these values are sufficient. In the event these assumptions are violated, Sequencescape will still prevent the transfer, it just wont be as user-friendly.
25 26 27 |
# File 'app/sequencescape/sequencescape/api/v2/aliquot.rb', line 25 def equivalent_attributes [request_id || request.id, suboptimal] end |
#order_group ⇒ Object
34 35 36 |
# File 'app/sequencescape/sequencescape/api/v2/aliquot.rb', line 34 def order_group [relationships.study.dig(:data, :id), relationships.project.dig(:data, :id)] end |
#tag_pair ⇒ Object
Returns the combination of tag and tag2 oligos for the aliquot
30 31 32 |
# File 'app/sequencescape/sequencescape/api/v2/aliquot.rb', line 30 def tag_pair [tag_oligo, tag2_oligo] end |
#tagged? ⇒ Boolean
11 12 13 |
# File 'app/sequencescape/sequencescape/api/v2/aliquot.rb', line 11 def tagged? tag_oligo.present? || tag2_oligo.present? end |