libraries/HighThroughputHelper.rb
def associate_controls_to_collection(cultures:, collection:)
    collection_associations = AssociationMap.new(collection)
    empty_wells = collection.get_empty
    column_samples = cultures.map {|column| Sample.find_by_name(column.first.fetch("Strain").keys.first) }
    cultures.each_with_index do |replicates, idx| 
      replicates.each do |culture| 
        r, c = empty_wells.shift()
        collection.set(r, c, column_samples[idx])
        collection.save()
        culture.keys.each do |key|
          collection_associations.putrc(row=r, column=c, key=key, data=culture[key])
        end
      end
    end
    collection_associations.save()
  end
# Place cultures determined to be controls into the collection specified
# 
# @param cultures [Array] of instances of class CuitureComposition
# @param collection [Collection] is an Aq item that is a collection of part items
Place cultures determined to be controls into the collection specified
Place cultures determined to be controls into the collection specified
def associate_controls_to_collection(cultures:, collection:)
    collection_associations = AssociationMap.new(collection)
    empty_wells = collection.get_empty
    column_samples = cultures.map {|column| Sample.find_by_name(column.first.fetch("Strain").keys.first) }
    cultures.each_with_index do |replicates, idx| 
      replicates.each do |culture| 
        r, c = empty_wells.shift()
        collection.set(r, c, column_samples[idx])
        collection.save()
        culture.keys.each do |key|
          collection_associations.putrc(row=r, column=c, key=key, data=culture[key])
        end
      end
    end
    collection_associations.save()
  end
def associate_controls_to_collection ( cultures : , collection : ) collection_associations = AssociationMap . new ( collection ) empty_wells = collection . get_empty column_samples = cultures . map { | column | Sample . find_by_name ( column . first . fetch ( "Strain" ) . keys . first ) } cultures . each_with_index do | replicates , idx | replicates . each do | culture | r , c = empty_wells . shift ( ) collection . set ( r , c , column_samples [ idx ] ) collection . save ( ) culture . keys . each do | key | collection_associations . putrc ( row = r , column = c , key = key , data = culture [ key ] ) end end end collection_associations . save ( ) end
Place cultures determined to be controls into the collection specified
Place cultures determined to be controls into the collection specified
cultures
of instances of class CuitureComposition
of instances of class CuitureComposition
collection
None