Class: Robots::PlateToTubeRacksRobot
- Inherits:
-
SplittingRobot
- Object
- Robot
- SplittingRobot
- Robots::PlateToTubeRacksRobot
- Defined in:
- app/models/robots/plate_to_tube_racks_robot.rb
Overview
This plate to tube racks robot takes one parent plate, and transfers it to its child tubes that are on multiple tube racks. The tube racks handled by this robot are not actual recorded labware. Their barcodes are extracted from the metadata of the tubes and they are accessed using wrapper objects. When robot controller calls the robot’s verify or perform_transfer actions, the robot will first initialize its labware store with the plate and tube rack objects. The plate information comes from the Sequencescape API call, however the tube rack information comes from the metadata of the downstream tubes included in the same API response. Therefore, the bed verification of the tube racks depend on the verification of the plate.
The destination tube racks are distinguished by their barcodes. We assume that the tubes on the same tube rack have the same labware purpose. When multiple tubes of the same purpose and the same position are found, the latest tube is assumed to be on the tube rack and the other tubes are ignored. We also assume that there cannot be multiple tube racks with the tubes of the same labware purpose on the robot at the same time.
For bed verification, only the etched barcode of the tube racks are scanned, not the individual tubes. The number of tube racks to be verified not only depends on the robot’s configured relationships but also whether the plate has children with those purposes.
Constant Summary collapse
- PLATE_INCLUDES =
Option for including downstream tubes and metadata in Plate API response.
'purpose,wells,wells.downstream_tubes,wells.downstream_tubes.custom_metadatum_collection'
Instance Attribute Summary collapse
-
#relationships ⇒ Object
writeonly
Hash from robot config into @relationships.
Instance Method Summary collapse
-
#bed_class ⇒ Class
Returns the bed class for this robot.
-
#child_labware(plate) ⇒ Array<TubeRackWrapper>
Returns an array of child labware from the robot’s labware store for the given Plate.
-
#find_bed_labware(barcodes) ⇒ Array<Plate, TubeRackWrapper>
Returns an array of labware from the robot’s labware store for barcodes.
-
#perform_transfer(bed_labwares) ⇒ void
Performs the transfer between plate and tube racks.
-
#verify(params) ⇒ Report
Performs the bed verification of plate and tube racks.
-
#well_order ⇒ Symbol
Returns the well order for getting wells from the plate.
Instance Attribute Details
#relationships=(value) ⇒ Object (writeonly)
Hash from robot config into @relationships
28 29 30 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 28 def relationships=(value) @relationships = value end |
Instance Method Details
#bed_class ⇒ Class
Returns the bed class for this robot.
44 45 46 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 44 def bed_class Robots::Bed::PlateToTubeRacksBed end |
#child_labware(plate) ⇒ Array<TubeRackWrapper>
Returns an array of child labware from the robot’s labware store for the given Plate.
89 90 91 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 89 def child_labware(plate) labware_store.values.select { |labware| labware.respond_to?(:parent) && labware.parent.uuid == plate.uuid } end |
#find_bed_labware(barcodes) ⇒ Array<Plate, TubeRackWrapper>
Returns an array of labware from the robot’s labware store for barcodes. This method is called by the robot’s beds when they need to find their labware. The labware returned can be Plate objects or labware-like wrapper objects for tube racks.
79 80 81 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 79 def find_bed_labware() .filter_map { || labware_store[] } end |
#perform_transfer(bed_labwares) ⇒ void
This method returns an undefined value.
Performs the transfer between plate and tube racks. This method is called by the robot controller when the user clicks the start robot button.
54 55 56 57 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 54 def perform_transfer(bed_labwares) prepare_robot(bed_labwares) super end |
#verify(params) ⇒ Report
Performs the bed verification of plate and tube racks. This method is called by the robot controller when the user clicks the validate layout button.
66 67 68 69 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 66 def verify(params) prepare_robot(params[:bed_labwares]) super end |
#well_order ⇒ Symbol
Returns the well order for getting wells from the plate.
37 38 39 |
# File 'app/models/robots/plate_to_tube_racks_robot.rb', line 37 def well_order :coordinate end |