diagnostic_rt_qpcr/operation_types/aliquot_primer_probe/protocol.rb
# Make 5 aliquots for each primer
# @param operations [OperationList] Array of operations grouped by primer
Make 5 aliquots for each primer
Make 5 aliquots for each primer
def make_aliquots(ops:, primer:)
    last_tube_id = '' 
    ops.each do |op|
      input_primers = Array.new(OUTPUT_ITEMS_NUM[:qty], primer.id)
      aliquot_tubes = op.outputs.map { |output| output.item.id }
      transfer_table = Table.new
                            .add_column('Primer Mix ID', input_primers)
                            .add_column('Destination Tube ID', aliquot_tubes)
      show do
        title 'Make Aliquots'
        check 'Label destination tube IDs according to the table.'
        check "Mix solution gently and aliquot #{qty_display(VOL_SUSPENSION)} \
              of rehydrated primer into each tube according to the table."
        table transfer_table
      end
      primer.mark_as_deleted 
      last_tube_id = aliquot_tubes[-1]
    end
    last_tube = Item.find(last_tube_id)
    last_tube.move(COLD_ROOM)
    last_tube.store
  end
def make_aliquots ( ops : , primer : ) last_tube_id = '' ops . each do | op | input_primers = Array . new ( OUTPUT_ITEMS_NUM [ :qty ] , primer . id ) aliquot_tubes = op . outputs . map { | output | output . item . id } transfer_table = Table . new . add_column ( 'Primer Mix ID' , input_primers ) . add_column ( 'Destination Tube ID' , aliquot_tubes ) show do title 'Make Aliquots' check 'Label destination tube IDs according to the table.' check "Mix solution gently and aliquot #{qty_display(VOL_SUSPENSION)} \
              of rehydrated primer into each tube according to the table." table transfer_table end primer . mark_as_deleted last_tube_id = aliquot_tubes [ - 1 ] end last_tube = Item . find ( last_tube_id ) last_tube . move ( COLD_ROOM ) last_tube . store end
Make 5 aliquots for each primer
Make 5 aliquots for each primer
# keep one of each primer # discard the input # One aliquot of each primer mix should be stored in the cold room instead # of freezer. However, this code doesn't actually work as one ObjectType # can only be associated with one location. # Leaving this here for completeness.
ops
<not_specific>
primer
<not_specific>
operations
<not_specific>
Array of operations grouped by primer
Array of operations grouped by primer