libraries/HighThroughputHelper.rb
# Sort replicate culture arrays by strain then by total moles of final concentration inducer 
#
# @param cultures [Array] of arrays of culture composition hash objects 
# @returns sorted_cultures [Array] of sorted arrays of culture composition hash objects 
Sort replicate culture arrays by strain then by total moles of final concentration inducer
Sort replicate culture arrays by strain then by total moles of final concentration inducer
def sort_culture_composition_objs(cultures:)
    sorted_cultures = []
    groupby_strain_name = cultures.group_by {|rep_arr| rep_arr.first.fetch('Strain').keys.first }
    groupby_strain_name.map {|sname, rep_arrays|
      rep_arrays.sort! {|arr_a, arr_b| get_comparison(arr_a.first) <=> get_comparison(arr_b.first) }.each {|rep_array| sorted_cultures.push(rep_array) }
    }
    return sorted_cultures
  end
def sort_culture_composition_objs ( cultures : ) sorted_cultures = [ ] groupby_strain_name = cultures . group_by { | rep_arr | rep_arr . first . fetch ( 'Strain' ) . keys . first } groupby_strain_name . map { | sname , rep_arrays | rep_arrays . sort! { | arr_a , arr_b | get_comparison ( arr_a . first ) <=> get_comparison ( arr_b . first ) } . each { | rep_array | sorted_cultures . push ( rep_array ) } } return sorted_cultures end
Sort replicate culture arrays by strain then by total moles of final concentration inducer
Sort replicate culture arrays by strain then by total moles of final concentration inducer
sorted_cultures [Array] of sorted arrays of culture composition hash objects
sorted_cultures [ Array ] of sorted arrays of culture composition hash objects
cultures
of arrays of culture composition hash objects
of arrays of culture composition hash objects