Class: Pacbio::Pool
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pacbio::Pool
- Includes:
- Aliquotable, MultiSourcedPool
- Defined in:
- app/models/pacbio/pool.rb
Overview
Pool
Instance Method Summary collapse
- #collection? ⇒ Boolean
-
#sequencing_plates ⇒ Array
Of Plates attached to a sequencing run.
-
#sequencing_runs ⇒ Array
Of Runs that the pool is used in.
- #used_aliquots_attributes=(used_aliquot_options) ⇒ Object
Methods included from MultiSourcedPool
Methods included from Aliquotable
Instance Method Details
#collection? ⇒ Boolean
53 54 55 |
# File 'app/models/pacbio/pool.rb', line 53 def collection? used_aliquots.length > 1 end |
#sequencing_plates ⇒ Array
Returns of Plates attached to a sequencing run.
44 45 46 |
# File 'app/models/pacbio/pool.rb', line 44 def sequencing_plates wells&.collect(&:plate) end |
#sequencing_runs ⇒ Array
Returns of Runs that the pool is used in.
49 50 51 |
# File 'app/models/pacbio/pool.rb', line 49 def sequencing_runs wells&.collect(&:run)&.uniq end |
#used_aliquots_attributes=(used_aliquot_options) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'app/models/pacbio/pool.rb', line 33 def used_aliquots_attributes=() self.used_aliquots = .map do |attributes| if attributes['id'] update_item(attributes, indexed_used_aliquots, 'Aliquot') else Aliquot.new(attributes.merge(aliquot_type: :derived)) end end end |