def refresh_heatmap(self): analysis_id = self.request_dict['analysis_id'] instance = self.request_dict['instance'] options = self.request_dict['options'] rank = self.request_dict['rank'] p = Meta(analysis_id) p.dirs.change_current_sample_map_instance(p.files, instance) options.abundance_file = RelativePath(vars(p.files)[c.percent_abundance_file_prefix + rank + '_file_path']) options.output_file = RelativePath(vars(p.files)[c.abundance_heatmap_file_prefix + rank + '_file_path']) SerializeToFile(options, vars(p.files)[c.heatmap_options_file_prefix + rank + '_file_path']) try: framework.tools.heatmap.main(options, c.analyses_dir) except: self.write_socket({'response': 'error', 'content': helper_functions.formatExceptionInfo()}) return self.write_socket({'response': 'OK', 'options': options})