def handle(self, *args, **options): pipeline = marker_pipeline('260714_s13_7OFMC9VV_', '-zcomp-zedge-7OFMC9VV', 's13_ch-zcomp-primary-7OFMC9VV', 's13_ch-zedge') out_path = '/Volumes/transport/data/puzzle/260714/pipelines/test.cppipe' # pipeline = region_pipeline('s14_ch-zbf-regionprimary-8C3WCS1E', 's14_ch-zbf') with open(out_path, 'w+') as f: f.write(pipeline)
def save_marker_pipeline(self, series_name=None, primary_channel_name=None, secondary_channel_name=None): # 1. make unique key unique = random_string() unique_key = '{}{}-{}'.format(primary_channel_name, secondary_channel_name, unique) # 2. format and save file pipeline_text = marker_pipeline('{}_s{}_{}_'.format(self.name, series_name, unique), unique_key, primary_channel_name, secondary_channel_name) with open(os.path.join(self.pipeline_path, 'markers.cppipe'), 'w+') as open_pipeline_file: open_pipeline_file.write(pipeline_text) return unique, unique_key
def save_marker_pipeline(self, series_name=None, primary_channel_name=None, secondary_channel_name=None, threshold_correction_factor=1.2, background=True, unique='', unique_key=''): # format and save file pipeline_text = marker_pipeline('{}_s{}_{}_'.format(self.name, series_name, unique), unique_key, 's{}_ch{}'.format(series_name, primary_channel_name), 's{}_ch{}'.format(series_name, secondary_channel_name), threshold_correction_factor=threshold_correction_factor, background=background) with open(os.path.join(self.pipeline_path, 'markers.cppipe'), 'w+') as open_pipeline_file: open_pipeline_file.write(pipeline_text)