Class: Pacbio::Request
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pacbio::Request
- Includes:
- Aliquotable, TubeMaterial, WellMaterial
- Defined in:
- app/models/pacbio/request.rb
Overview
Pacbio::Request A request can have many libraries
Instance Method Summary collapse
- #container ⇒ Object
-
#generate_primary_aliquot ⇒ Object
While this aliquot is not volume tracked we can just create it with empty data.
- #sequencing_plates ⇒ Object
-
#sequencing_runs ⇒ Array
Of Runs that the request is used in.
- #source_identifier ⇒ Object
Methods included from Aliquotable
Methods included from Material
Instance Method Details
#container ⇒ Object
37 38 39 |
# File 'app/models/pacbio/request.rb', line 37 def container tube || well end |
#generate_primary_aliquot ⇒ Object
While this aliquot is not volume tracked we can just create it with empty data
29 30 31 32 33 34 35 |
# File 'app/models/pacbio/request.rb', line 29 def generate_primary_aliquot Aliquot.create!( source: self, aliquot_type: :primary, state: :created ) end |
#sequencing_plates ⇒ Object
45 46 47 |
# File 'app/models/pacbio/request.rb', line 45 def sequencing_plates libraries.collect(&:sequencing_plates).flatten.uniq end |
#sequencing_runs ⇒ Array
Returns of Runs that the request is used in.
50 51 52 |
# File 'app/models/pacbio/request.rb', line 50 def sequencing_runs libraries.collect(&:sequencing_plates).flatten.collect(&:run).uniq end |
#source_identifier ⇒ Object
41 42 43 |
# File 'app/models/pacbio/request.rb', line 41 def source_identifier container&.identifier end |