libraries/FlowCytometrySoftware.rb
# Guides technician to apply settings to the selected wells. Wells are selected by sampleType (different sampleTypes require different settings)
Guides technician to apply settings to the selected wells. Wells are selected by sampleType (different sampleTypes require different settings)
Guides technician to apply settings to the selected wells . Wells are selected by sampleType ( different sampleTypes require different settings )
def apply_settings(instrument:)
      log_info 'instrument.experimental_item.object_type.name.downcase', instrument.experimental_item.object_type.name.downcase
    if instrument.experimental_item.object_type.name.downcase.include? 'bead'
      sample_type_name = instrument.experimental_item.sample.sample_type.name.to_sym
    else
      sample_type_name = collection_from(instrument.experimental_item).matrix.flatten.uniq.reject {|sid| sid == -1 }.map {|sid| s = Sample.find(sid); s.sample_type.name }.uniq.first.to_sym
    end
    show do
      title "Apply Settings"
      separator
      image instrument.software.fetch(:images).fetch(:apply_settings)
      note "Apply the following settings to the wells you have selected"
      note "<b>Make sure that the settings are as follows:</b>"
      instrument.software.fetch(:sample_type_settings).fetch(sample_type_name).each {|setting, val| bullet "Set <b>#{setting}</b> to <b>#{val}</b>"}
      check "Finally, click <b>Apply Settings</b>"
      bullet "Save experimental measurement as <b>#{get_experiment_filename(instrument: instrument)}</b>"
    end
  end
def apply_settings ( instrument : ) log_info 'instrument.experimental_item.object_type.name.downcase' , instrument . experimental_item . object_type . name . downcase if instrument . experimental_item . object_type . name . downcase . include? 'bead' sample_type_name = instrument . experimental_item . sample . sample_type . name . to_sym else sample_type_name = collection_from ( instrument . experimental_item ) . matrix . flatten . uniq . reject { | sid | sid == - 1 } . map { | sid | s = Sample . find ( sid ) ; s . sample_type . name } . uniq . first . to_sym end show do title "Apply Settings" separator image instrument . software . fetch ( :images ) . fetch ( :apply_settings ) note "Apply the following settings to the wells you have selected" note "<b>Make sure that the settings are as follows:</b>" instrument . software . fetch ( :sample_type_settings ) . fetch ( sample_type_name ) . each { | setting , val | bullet "Set <b>#{setting}</b> to <b>#{val}</b>" } check "Finally, click <b>Apply Settings</b>" bullet "Save experimental measurement as <b>#{get_experiment_filename(instrument: instrument)}</b>" end end
Guides technician to apply settings to the selected wells.
Guides technician to apply settings to the selected wells .
instrument