Class: Limber::Plate
- Inherits:
-
Sequencescape::Plate
- Object
- Sequencescape::Plate
- Limber::Plate
- Defined in:
- app/models/limber/plate.rb
Overview
Class Limber::Plate provides a client side representation of Sequencescape plates
Instance Method Summary collapse
- #human_barcode ⇒ Object
-
#number_of_columns ⇒ Integer
The width of the plate.
-
#number_of_rows ⇒ Integer
The height of the plate.
- #plate? ⇒ Boolean
- #pools_info ⇒ Object
- #purpose ⇒ Object
- #role ⇒ Object
- #tagged? ⇒ Boolean
- #tube? ⇒ Boolean
Instance Method Details
#human_barcode ⇒ Object
55 56 57 |
# File 'app/models/limber/plate.rb', line 55 def .machine end |
#number_of_columns ⇒ Integer
The width of the plate. Assumes a 3:2 ratio
25 26 27 |
# File 'app/models/limber/plate.rb', line 25 def number_of_columns Math.sqrt(size / 6).to_i * 3 end |
#number_of_rows ⇒ Integer
The height of the plate. Assumes a 4:3 ratio
34 35 36 |
# File 'app/models/limber/plate.rb', line 34 def number_of_rows Math.sqrt(size / 6).to_i * 2 end |
#plate? ⇒ Boolean
59 60 61 |
# File 'app/models/limber/plate.rb', line 59 def plate? true end |
#pools_info ⇒ Object
38 39 40 |
# File 'app/models/limber/plate.rb', line 38 def pools_info @pools_info ||= Pools.new(pools) end |
#purpose ⇒ Object
46 47 48 |
# File 'app/models/limber/plate.rb', line 46 def purpose plate_purpose end |
#role ⇒ Object
42 43 44 |
# File 'app/models/limber/plate.rb', line 42 def role label.prefix end |
#tagged? ⇒ Boolean
50 51 52 53 |
# File 'app/models/limber/plate.rb', line 50 def tagged? first_filled_well = wells.detect { |w| w.aliquots.first } first_filled_well && first_filled_well.aliquots.first.tag.identifier.present? end |
#tube? ⇒ Boolean
63 64 65 |
# File 'app/models/limber/plate.rb', line 63 def tube? false end |