libraries/HighThroughputHelper.rb
# Guides tech through inoculting collection using Yeast Plates as the inoculum. Each replicate is uses a single colony.
Guides tech through inoculting collection using Yeast Plates as the inoculum. Each replicate is uses a single colony.
Guides tech through inoculting collection using Yeast Plates as the inoculum . Each replicate is uses a single colony .
def inoculate_colonies_from_agar_plates(collection:, input_media_hash:, inoculation_prep_hash:)
    media_part_matrix = search_part_associations(collection: collection, data_key: 'Media', attribute: 'item_id'); media_vol_hash = Hash.new(0)
    media_part_matrix.each {|row| row.reject {|i| i.nil? }.each {|media_id| media_vol_hash[media_id] += 1 } }
    show do
      title "Fill #{collection.object_type.name} #{collection.id} with Media"
      separator
      media_vol_hash.each do |media_id, count|
        media_vol_ml = (HighThroughputHelper.add_extra_vol(int: SATURATION_CULT_VOL*count)/1000.0).round(3)
        check "You will need <b>#{media_vol_ml}#{MILLILITERS}</b> of <b>#{input_media_hash[media_id].sample.name}</b> media"  
      end
      note "In the table, the item id of the media type is followed by the volume to dispense."
      note "Follow the table below to fill with the appropiate media type & volume:"
      table highlight_alpha_non_empty(collection) {|r,c| "#{media_part_matrix[r][c]}\n#{SATURATION_CULT_VOL}#{MICROLITERS}"} 
    end
    inoculation_prep_hash[collection.id].each do |input_item_id, media_to_rc_list|
      media_to_rc_list.each do |media_id, rc_list|
        show do
          title "Inoculate #{collection} with Single Colonies"
          separator
          note "In the table, the item id of the agar plate is displayed. If the same item is used, try to pick a different biological replicate (single colony) for each well."
          note "Follow the table below to inoculate a well with the appropriate item:"
          table highlight_alpha_rc(collection, rc_list){|r,c| "#{input_item_id}"} 
        end
      end
    end
  end
def inoculate_colonies_from_agar_plates ( collection : , input_media_hash : , inoculation_prep_hash : ) media_part_matrix = search_part_associations ( collection : collection , data_key : 'Media' , attribute : 'item_id' ) ; media_vol_hash = Hash . new ( 0 ) media_part_matrix . each { | row | row . reject { | i | i . nil? } . each { | media_id | media_vol_hash [ media_id ] += 1 } } show do title "Fill #{collection.object_type.name} #{collection.id} with Media" separator media_vol_hash . each do | media_id , count | media_vol_ml = ( HighThroughputHelper . add_extra_vol ( int : SATURATION_CULT_VOL * count ) / 1000.0 ) . round ( 3 ) check "You will need <b>#{media_vol_ml}#{MILLILITERS}</b> of <b>#{input_media_hash[media_id].sample.name}</b> media" end note "In the table, the item id of the media type is followed by the volume to dispense." note "Follow the table below to fill with the appropiate media type & volume:" table highlight_alpha_non_empty ( collection ) { | r , c | "#{media_part_matrix[r][c]}\n#{SATURATION_CULT_VOL}#{MICROLITERS}" } end inoculation_prep_hash [ collection . id ] . each do | input_item_id , media_to_rc_list | media_to_rc_list . each do | media_id , rc_list | show do title "Inoculate #{collection} with Single Colonies" separator note "In the table, the item id of the agar plate is displayed. If the same item is used, try to pick a different biological replicate (single colony) for each well." note "Follow the table below to inoculate a well with the appropriate item:" table highlight_alpha_rc ( collection , rc_list ) { | r , c | "#{input_item_id}" } end end end end
Guides tech through inoculting collection using Yeast Plates as the inoculum.
Guides tech through inoculting collection using Yeast Plates as the inoculum .
collection
input_media_hash
inoculation_prep_hash