def save_gate(gate_name): ## Saves visualisation of gate to cloud storage Ana.save_vis(gate_name + '.png') ## Saves info about gate to cloud storage Ana.save_info(gate_name + '.txt') Ana.save_info(gate_name + 'info.txt') ## Saves gate as fcs file Ana.save_fcs(gate_name)
def change_plot(commands): name = commands[1] plot_name = commands[4] ##Load raw fcs data from cloud storage Ana.load_fcs(name) ##Create visualisation of graph with different plot type if(commands[0] == 'dot_plot'): exitcode = Ana.dot_plot(name, plot_name, commands[2], commands[3]) elif(commands[0] == 'contour_plot'): exitcode = Ana.contour_plot(name, plot_name, commands[2], commands[3]) if(exitcode == 0): ## Saves visualisation to cloud storage Ana.save_vis(plot_name) ## Clean up os.remove(name) os.remove(plot_name) return True
def visualise(commands): # Get name. name = commands[1] ## Load raw fcs data from cloud storage. Ana.load_fcs(name) ## Create visualisation of raw fcs data. exitcode = Ana.visualise(name) if(exitcode == 0): ## Save visualisation to cloud storage. Ana.save_vis(name + '.png') ## Saves info about fcs file to cloud storage Ana.save_info(name + 'info.txt') Ana.save_info(name + '.txt') ## Clean up. os.remove(name) os.remove(name + '.png') os.remove(name + '.txt') os.remove(name + 'info.txt') return True
def axis_change(commands): name = commands[1] x_axis = commands[2] y_axis = commands[3] new_name = commands[4] ##Loads raw fcs data from cloud storage Ana.load_fcs(name) ##Creates a visualisation of the graph with different axis exitcode = Ana.change_axis(name, x_axis, y_axis, new_name) if(exitcode == 0): ##Saves visualisation to cloud storage Ana.save_vis(new_name + '.png') ##Saves info file to cloud storage Ana.save_info(new_name + 'info.txt') Ana.save_info(new_name + '.txt') ##Saves .fcs file Ana.save_fcs(new_name) ## Clean up os.remove(name) os.remove(new_name) os.remove(new_name + '.txt') os.remove(new_name + 'info.txt') os.remove(new_name + '.png') return True