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 documentation does not yet include a detailed description of what this resource represents.
This documentation does not yet include detailed descriptions for relationships, attributes and filters.
This documentation does not yet include any example usage of the API via cURL or similar.
Access this resource via the /v1/pacbio/container_material/
endpoint.
Provides a JSON:API representation of ContainerMaterial.
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.
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
62 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 62 attributes :barcode, :created_at, :material_type |
#concentration ⇒ Float
Returns the concentration of the library.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 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.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
62 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 62 attributes :barcode, :created_at, :material_type |
#deactivated_at ⇒ DateTime?
Returns the deactivation time of the library, or nil if not deactivated.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 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.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#library_type ⇒ String
Returns the type of the library.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
62 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 62 attributes :barcode, :created_at, :material_type |
#number_of_smrt_cells ⇒ Integer
Returns the number of SMRT cells required for the library.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 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.
52 53 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 52 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.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 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.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
#volume ⇒ Float
Returns the volume of the library.
34 35 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 34 attributes :state, :insert_size, :volume, :concentration, :template_prep_kit_box_barcode, :deactivated_at, :sample_names |
Class Method Details
.records_for_populate(*_args) ⇒ Object
77 78 79 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 77 def self.records_for_populate(*_args) super.preload(:container, material: %i[material_type sample]) end |
Instance Method Details
#fetchable_fields ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'app/resources/v1/pacbio/container_material_resource.rb', line 64 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 |