libraries/FlowCytometrySoftware.rb
#Guides technician through software to export, save, and upload data to Aq
Guides technician through software to export, save, and upload data to Aq
Guides technician through software to export save and upload data to Aq
def export_save_and_upload_measurement_data(instrument:, timepoint:)
    sw = instrument.software
    day = timepoint.strftime "%m%d%Y"
    hour = timepoint.strftime "%H%M"
    fcs_exports = show do 
      title "Export .fcs files #go to FlowCytometrySoftware library Attune module to customize this step"
      separator
      note 'Make sure that flow cytometer run is <b>DONE!</b>'
      note 'Press <b>CLOSE RUN DISPLAY</b>'
      note 'Select <b>File</b> => <b>Export ALL Samples as FCS...</b> (see below)'
      image instrument.software.fetch(:images).fetch(:export_new_data)
      note 'You will see a pop-up like below, record the directory ID #'
      image instrument.software.fetch(:images).fetch(:new_export_directory)
      get 'text', var: 'dirname', label: 'Enter the name of the export directory in Desktop/FCS Exports/'
    end
    if (!debug) 
      attempt = 0
      up_show, up_sym = {}, :file 
      while (up_show[up_sym].nil?) || (attempt == 3) do
        up_show, up_sym = upload_directory_show(saving_dir: sw[:saving_directory]+"/#{fcs_exports[:dirname]}")
        attempt += 1
      end
      upload_array = get_upload_array_from_show(up_show: up_show, up_sym: up_sym)
    else
      log_info 'UPLOADS Array debug'
      upload_array = [Upload.find(26482), Upload.find(26458)]
    end
    measurement_data = {
      mitem: instrument.measurement_item,
      day: day,
      hour: hour,
      uploads: upload_array
    }
    return measurement_data
  end
def export_save_and_upload_measurement_data ( instrument : , timepoint : ) sw = instrument . software day = timepoint . strftime "%m%d%Y" hour = timepoint . strftime "%H%M" fcs_exports = show do title "Export .fcs files #go to FlowCytometrySoftware library Attune module to customize this step" separator note 'Make sure that flow cytometer run is <b>DONE!</b>' note 'Press <b>CLOSE RUN DISPLAY</b>' note 'Select <b>File</b> => <b>Export ALL Samples as FCS...</b> (see below)' image instrument . software . fetch ( :images ) . fetch ( :export_new_data ) note 'You will see a pop-up like below, record the directory ID #' image instrument . software . fetch ( :images ) . fetch ( :new_export_directory ) get 'text' , var : 'dirname' , label : 'Enter the name of the export directory in Desktop/FCS Exports/' end if ( ! debug ) attempt = 0 up_show , up_sym = { } , :file while ( up_show [ up_sym ] . nil? ) || ( attempt == 3 ) do up_show , up_sym = upload_directory_show ( saving_dir : sw [ :saving_directory ] + "/#{fcs_exports[:dirname]}" ) attempt += 1 end upload_array = get_upload_array_from_show ( up_show : up_show , up_sym : up_sym ) else log_info 'UPLOADS Array debug' upload_array = [ Upload . find ( 26482 ) , Upload . find ( 26458 ) ] end measurement_data = { mitem : instrument . measurement_item , day : day , hour : hour , uploads : upload_array } return measurement_data end
Guides technician through software to export, save, and upload data to Aq
Guides technician through software to export save and upload data to Aq
# Export # UPLOAD
instrument
timepoint