Class: Limber::Plate::Pool
- Inherits:
-
Object
- Object
- Limber::Plate::Pool
- Defined in:
- app/models/limber/plate/pool.rb
Overview
A pool is a set of samples due to be processed together with similar parameters. Usually they will end up eventually being combined together in a ‘pool although increasingly this definition is being stretched. Pool information is supplied as part of the plate json. The Pool class takes an individual pool, and provides a convenient interface
Instance Attribute Summary collapse
-
#submission_uuid ⇒ Object
readonly
The uuid of the submission associated with the pool.
Instance Method Summary collapse
-
#initialize(submission_uuid, pool_hash) ⇒ Pool
constructor
Create a new Pools from the pool information.
- #insert_size ⇒ Object
- #library_type_name ⇒ Object
- #primer_panel ⇒ Object
-
#ready_for_custom_pooling? ⇒ Boolean
Custom pooling is a little more flexible.
Constructor Details
#initialize(submission_uuid, pool_hash) ⇒ Pool
Create a new Pools from the pool information.
19 20 21 22 23 |
# File 'app/models/limber/plate/pool.rb', line 19 def initialize(submission_uuid, pool_hash) @submission_uuid = submission_uuid pool_hash ||= {} @pool_hash = pool_hash end |
Instance Attribute Details
#submission_uuid ⇒ Object (readonly)
The uuid of the submission associated with the pool
11 12 13 |
# File 'app/models/limber/plate/pool.rb', line 11 def submission_uuid @submission_uuid end |
Instance Method Details
#insert_size ⇒ Object
29 30 31 32 |
# File 'app/models/limber/plate/pool.rb', line 29 def insert_size sizes = @pool_hash.fetch('insert_size', ['Unknown']) sizes.to_a.join(' ') end |
#library_type_name ⇒ Object
25 26 27 |
# File 'app/models/limber/plate/pool.rb', line 25 def library_type_name @pool_hash.dig('library_type', 'name') || 'Unknown' end |
#primer_panel ⇒ Object
34 35 36 |
# File 'app/models/limber/plate/pool.rb', line 34 def primer_panel @primer_panel ||= Limber::Plate::PrimerPanel.new(@pool_hash['primer_panel']) end |
#ready_for_custom_pooling? ⇒ Boolean
Custom pooling is a little more flexible. Than automatic pooling, in that it DOESNT require downstream submission and is completely happy with empty pools
40 41 42 |
# File 'app/models/limber/plate/pool.rb', line 40 def ready_for_custom_pooling? @pool_hash.fetch('for_multiplexing', false) end |