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
38 39 40 |
# File 'app/models/pacbio/request.rb', line 38 def container tube || well end |
#generate_primary_aliquot ⇒ Object
While this aliquot is not volume tracked we can just create it with empty data
30 31 32 33 34 35 36 |
# File 'app/models/pacbio/request.rb', line 30 def generate_primary_aliquot Aliquot.create!( source: self, aliquot_type: :primary, state: :created ) end |
#sequencing_plates ⇒ Object
46 47 48 |
# File 'app/models/pacbio/request.rb', line 46 def sequencing_plates libraries.collect(&:sequencing_plates).flatten.uniq end |
#sequencing_runs ⇒ Array
Returns of Runs that the request is used in.
51 52 53 |
# File 'app/models/pacbio/request.rb', line 51 def sequencing_runs libraries.collect(&:sequencing_plates).flatten.collect(&:run).uniq end |
#source_identifier ⇒ Object
42 43 44 |
# File 'app/models/pacbio/request.rb', line 42 def source_identifier container&.identifier end |