Class: LabwareCreators::PcrCyclesBinnedPlateForDuplexSeq
- Inherits:
-
PcrCyclesBinnedPlateBase
- Object
- Base
- StampedPlate
- PcrCyclesBinnedPlateBase
- LabwareCreators::PcrCyclesBinnedPlateForDuplexSeq
- Defined in:
- app/models/labware_creators/pcr_cycles_binned_plate_for_duplex_seq.rb
Overview
Handles the generation of a plate with wells binned according to the number of PCR cycles that has been determined by the customer. Uploads a file supplied by the customer that has a row per each well and includes Sample Volume, Diluent Volume, PCR Cycles, Sub-Pool and Coverage columns. Uses the PCR Cycles column to determine the binning arrangement of the wells, and the Sample Volume and Diluent Volume columns in the well transfers. Sub-Pool and Coverage need to be stored for a later step downstream in the pipeline, at the point where custom pooling is performed. Wells in the bins are applied to the destination by column order. If there is enough space on the destination plate each new bin will start in a new column. Otherwise bins will run consecutively without gaps.
Source Plate Dest Plate --
–+–~ --
–+–~ |A1| pcr_cycles = 12 (bin 2) |B1|A1|C1| --
–+–~ --
–+–~ |B1| pcr_cycles = 15 (bin 1) |D1|E1| | --
–+–~ + --
–+–~ |C1| pcr_cycles = 10 (bin 3) | |G1| | --
–+–~ --
–+–~ |D1| pcr_cycles = 15 (bin 1) | | | | --
–+–~ --
–+–~ |E1| pcr_cycles = 12 (bin 2) | | | | --
–+–~ --
–+–~ |G1| pcr_cycles = 12 (bin 2) | | | |
Constant Summary collapse
- CUSTOMER_FILENAME =
'duplex_seq_customer_file.csv'
Instance Method Summary collapse
Constructor Details
This class inherits a constructor from LabwareCreators::Base
Instance Method Details
#after_transfer! ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'app/models/labware_creators/pcr_cycles_binned_plate_for_duplex_seq.rb', line 35 def after_transfer! # called as part of the 'super' call in the 'save' method # retrieve child plate through v2 api, using uuid got through v1 api child_v2 = Sequencescape::Api::V2.plate_with_custom_includes(CHILD_PLATE_INCLUDES, uuid: child.uuid) # update fields on each well with various metadata fields_to_update = %w[diluent_volume pcr_cycles submit_for_sequencing sub_pool coverage] child_wells_by_location = child_v2.wells.index_by(&:location) well_details.each do |parent_location, details| child_position = transfer_hash[parent_location]['dest_locn'] child_well = child_wells_by_location[child_position] (child_well, details, fields_to_update) end end |
#update_well_with_metadata(well, metadata, fields_to_update) ⇒ Object
53 54 55 56 |
# File 'app/models/labware_creators/pcr_cycles_binned_plate_for_duplex_seq.rb', line 53 def (well, , fields_to_update) = fields_to_update.index_with { |field| [field] } well.update() end |