Class: V1::Pacbio::ContainerMaterialResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::Pacbio::ContainerMaterialResource
- Defined in:
- app/resources/v1/pacbio/container_material_resource.rb
Overview
This endpoint can’t be directly accessed via the /v1/pacbio/container_material/
Provides a JSON:API representation of ContainerMaterial.
endpoint, as it is only accessible via the nested route under TubeResource and WellResource using includes.
Instance Attribute Summary collapse
-
#barcode ⇒ Object
Delegations to container.
-
#concentration ⇒ Float
The concentration of the library.
-
#cost_code ⇒ String
The cost code for the library.
-
#created_at ⇒ String
The creation time of the container.
-
#deactivated_at ⇒ DateTime?
The deactivation time of the library, or nil if not deactivated.
-
#estimate_of_gb_required ⇒ Float
The estimated gigabytes required for the library.
-
#external_study_id ⇒ String
The external study ID for the library.
-
#insert_size ⇒ Integer
The insert size of the library.
-
#library_type ⇒ String
The type of the library.
-
#material_type ⇒ String
The type of material in the container.
-
#number_of_smrt_cells ⇒ Integer
The number of SMRT cells required for the library.
-
#sample_name ⇒ String
The name of the sample in the library.
-
#sample_names ⇒ Object
TODO: Moved here as dropped it from library, but this should probably become sample name.
-
#sample_species ⇒ String
The species of the sample in the library.
-
#state ⇒ String
The state of the library.
-
#template_prep_kit_box_barcode ⇒ String
The barcode of the template prep kit box.
-
#volume ⇒ Float
The volume of the library.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#barcode ⇒ Object
Delegations to container
57 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 57 attributes :barcode, :created_at, :material_type |
#concentration ⇒ Float
Returns the concentration of the library.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#cost_code ⇒ String
Returns the cost code for the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#created_at ⇒ String
Returns the creation time of the container.
57 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 57 attributes :barcode, :created_at, :material_type |
#deactivated_at ⇒ DateTime?
Returns the deactivation time of the library, or nil if not deactivated.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#estimate_of_gb_required ⇒ Float
Returns the estimated gigabytes required for the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#external_study_id ⇒ String
Returns the external study ID for the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#insert_size ⇒ Integer
Returns the insert size of the library.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#library_type ⇒ String
Returns the type of the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#material_type ⇒ String
Returns the type of material in the container.
57 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 57 attributes :barcode, :created_at, :material_type |
#number_of_smrt_cells ⇒ Integer
Returns the number of SMRT cells required for the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#sample_name ⇒ String
Returns the name of the sample in the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#sample_names ⇒ Object
TODO: Moved here as dropped it from library, but this should probably become sample name. But overall, not really convinced this model should be exposed via the API.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#sample_species ⇒ String
Returns the species of the sample in the library.
47 48 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 47 attributes :library_type, :estimate_of_gb_required, :number_of_smrt_cells, :cost_code, :external_study_id, :sample_name, :sample_species |
#state ⇒ String
Returns the state of the library.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#template_prep_kit_box_barcode ⇒ String
Returns the barcode of the template prep kit box.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#volume ⇒ Float
Returns the volume of the library.
29 30 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 29 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
Class Method Details
.records_for_populate(*_args) ⇒ Object
72 73 74 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 72 def self.records_for_populate(*_args) super.preload(:container, material: %i[material_type sample]) end |
Instance Method Details
#fetchable_fields ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 59 def fetchable_fields case @model.material when ::Pacbio::Library %i[state barcode volume concentration template_prep_kit_box_barcode insert_size created_at deactivated_at sample_names material_type] when ::Pacbio::Request %i[library_type estimate_of_gb_required number_of_smrt_cells cost_code external_study_id sample_name barcode sample_species created_at material_type] else super end end |