Class: V1::Ont::PoolResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::Ont::PoolResource
- Defined in:
- app/resources/v1/ont/pool_resource.rb
Overview
Access this resource via the /v1/ont/pools/ endpoint.
Provides a JSON:API representation of Ont::Pool.
Filters: * barcode - Filter pools by the barcode of the associated tube. * sample_name - Filter pools by the name of samples in the associated libraries.
Primary relationships:
Instance Attribute Summary collapse
-
#concentration ⇒ Float
The concentration of the pool.
-
#created_at ⇒ String
readonly
The creation timestamp of the pool.
-
#final_library_amount ⇒ Float
readonly
The final amount of the library in the pool.
- #insert_size ⇒ Integer, String
-
#kit_barcode ⇒ String
The barcode of the kit used.
-
#library_attributes ⇒ Object
writeonly
When a pool is updated and it is attached to a run we need # to republish the messages for the run after_update :publish_messages.
-
#source_identifier ⇒ String
readonly
The source identifier of the pool.
-
#tube_barcode ⇒ String
readonly
The barcode of the tube.
- #updated_at ⇒ Object readonly
-
#volume ⇒ Float
The volume of the pool.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#concentration ⇒ Float
Returns the concentration of the pool.
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
#created_at ⇒ String (readonly)
Returns the creation timestamp of the pool.
125 |
# File 'app/resources/v1/ont/pool_resource.rb', line 125 attributes :created_at, :updated_at, readonly: true |
#final_library_amount ⇒ Float (readonly)
Returns the final amount of the library in the pool.
132 |
# File 'app/resources/v1/ont/pool_resource.rb', line 132 attribute :final_library_amount, readonly: true |
#insert_size ⇒ Integer, String
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
#kit_barcode ⇒ String
Returns the barcode of the kit used.
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
#library_attributes=(library_parameters) ⇒ Object (writeonly)
When a pool is updated and it is attached to a run we need
to republish the messages for the run
after_update :publish_messages
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
#source_identifier ⇒ String (readonly)
Returns the source identifier of the pool.
129 |
# File 'app/resources/v1/ont/pool_resource.rb', line 129 attribute :source_identifier, readonly: true |
#tube_barcode ⇒ String (readonly)
Returns the barcode of the tube.
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
#updated_at ⇒ Object (readonly)
125 |
# File 'app/resources/v1/ont/pool_resource.rb', line 125 attributes :created_at, :updated_at, readonly: true |
#volume ⇒ Float
Returns the volume of the pool.
119 120 |
# File 'app/resources/v1/ont/pool_resource.rb', line 119 attributes :volume, :kit_barcode, :concentration, :insert_size, :library_attributes, :tube_barcode |
Class Method Details
.default_sort ⇒ Object
146 147 148 |
# File 'app/resources/v1/ont/pool_resource.rb', line 146 def self.default_sort [{ field: 'created_at', direction: :desc }] end |
.records_for_populate(*_args) ⇒ Object
165 166 167 |
# File 'app/resources/v1/ont/pool_resource.rb', line 165 def self.records_for_populate(*_args) super.preload(source_wells: :plate) end |
Instance Method Details
#fetchable_fields ⇒ Object
161 162 163 |
# File 'app/resources/v1/ont/pool_resource.rb', line 161 def fetchable_fields super - [:library_attributes] end |