Class: V1::Pacbio::PoolResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::Pacbio::PoolResource
- Includes:
- Shared::RunSuitability
- Defined in:
- app/resources/v1/pacbio/pool_resource.rb
Overview
Add POST and PATCH examples
Access this resource via the /v1/pacbio/pools/
endpoint.
Provides a JSON:API representation of Pacbio::Pool.
For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for the service implementation of the JSON:API standard. This resource represents a Pacbio Pool and can return all pools, a single pool or multiple pools along with their relationships.
Filters:
-
sample_name
-
barcode
Primary relationships:
-
tube TubeResource
-
used_aliquots AliquotResource
-
primary_aliquot AliquotResource
-
requests RequestResource
-
libraries LibraryResource
Relationship trees:
-
used_aliquots.tag.tag_set
-
requests.tube,tube
-
libraries.tube
-
libraries.request
-
requests.plate.wells.requests
Direct Known Subclasses
Constant Summary collapse
- ALIQUOT_ATTRIBUTES =
%w[id volume concentration template_prep_kit_box_barcode insert_size tag_id source_id source_type].freeze
Instance Attribute Summary collapse
-
#available_volume ⇒ Float
The available volume of the pool.
-
#barcode ⇒ String
readonly
The barcode of the pool (via tube).
-
#concentration ⇒ Float
The concentration of the pool.
-
#created_at ⇒ String
The creation time of the pool.
-
#insert_size ⇒ Integer
The insert size of the pool.
-
#library_attributes ⇒ Hash
The attributes of the library.
-
#primary_aliquot_attributes ⇒ Hash
The attributes of the primary aliquot.
-
#source_identifier ⇒ String
readonly
The source identifier of the pool.
-
#template_prep_kit_box_barcode ⇒ String
The barcode of the template prep kit box.
-
#updated_at ⇒ String
The last update time of the pool.
-
#used_aliquots_attributes ⇒ Array<Hash>
The attributes of the used aliquots.
-
#used_volume ⇒ Float
The used volume of the pool.
-
#volume ⇒ Float
The volume of the pool.
Class Method Summary collapse
Instance Method Summary collapse
- #fetchable_fields ⇒ Object
- #publish_messages_on_creation ⇒ Object
- #publish_messages_on_update ⇒ Object
Methods included from Shared::RunSuitability
Instance Attribute Details
#available_volume ⇒ Float
Returns the available volume of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#barcode ⇒ String (readonly)
Returns the barcode of the pool (via tube).
101 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 101 attribute :barcode, readonly: true |
#concentration ⇒ Float
Returns the concentration of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#created_at ⇒ String
Returns the creation time of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#insert_size ⇒ Integer
Returns the insert size of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#library_attributes ⇒ Hash
Returns the attributes of the library.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#primary_aliquot_attributes ⇒ Hash
Returns the attributes of the primary aliquot.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#source_identifier ⇒ String (readonly)
Returns the source identifier of the pool.
97 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 97 attribute :source_identifier, readonly: true |
#template_prep_kit_box_barcode ⇒ String
Returns the barcode of the template prep kit box.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#updated_at ⇒ String
Returns the last update time of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#used_aliquots_attributes ⇒ Array<Hash>
Returns the attributes of the used aliquots.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#used_volume ⇒ Float
Returns the used volume of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
#volume ⇒ Float
Returns the volume of the pool.
90 91 92 93 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 90 attributes :volume, :concentration, :template_prep_kit_box_barcode, :insert_size, :created_at, :updated_at, :library_attributes, :used_aliquots_attributes, :primary_aliquot_attributes, :used_volume, :available_volume |
Class Method Details
.default_sort ⇒ Object
108 109 110 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 108 def self.default_sort [{ field: 'created_at', direction: :desc }] end |
.records_for_populate(*_args) ⇒ Object
142 143 144 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 142 def self.records_for_populate(*_args) super.preload(source_wells: :plate) end |
Instance Method Details
#fetchable_fields ⇒ Object
138 139 140 |
# File 'app/resources/v1/pacbio/pool_resource.rb', line 138 def fetchable_fields super - %i[library_attributes used_aliquots_attributes primary_aliquot_attributes] end |