def runOne(session_id, json_directory, data_directory, run_CatGT, catGT_input_json, catGT_output_json, modules, module_input_json, logFullPath): if run_CatGT: print(f'\n--- {session_id}: CatGT... ---') command = sys.executable + " -W ignore -m ecephys_spike_sorting.modules." + 'catGT_helper' + " --input_json " + catGT_input_json \ + " --output_json " + catGT_output_json print(command) subprocess.check_call(command.split(' ')) print(f'--- {session_id}: CatGT Done! --- \n') # copy module json file to data directory as record of the input parameters shutil.copy(module_input_json, os.path.join(data_directory, session_id + '-input.json')) for module in modules: print(f'\n--- {session_id}: {module}... ---') output_json = os.path.join(json_directory, session_id + '-' + module + '-output.json') command = sys.executable + " -W ignore -m ecephys_spike_sorting.modules." + module + " --input_json " + module_input_json \ + " --output_json " + output_json print(command) subprocess.check_call(command.split(' ')) print(f'--- {session_id}: {module} Done! --- \n') log_from_json.addEntry(modules, json_directory, session_id, logFullPath) # -*- coding: utf-8 -*-
def runOne(session_id, json_directory, data_directory, run_CatGT, catGT_input_json, catGT_output_json, modules, module_input_json, logFullPath): if run_CatGT: command = "python -W ignore -m ecephys_spike_sorting.modules." + 'catGT_helper' + " --input_json " + catGT_input_json \ + " --output_json " + catGT_output_json subprocess.check_call(command.split(' ')) # copy module json file to data directory as record of the input parameters shutil.copy(module_input_json, os.path.join(data_directory, session_id + '-input.json')) for module in modules: output_json = os.path.join(json_directory, session_id + '-' + module + '-output.json') command = "python -W ignore -m ecephys_spike_sorting.modules." + module + " --input_json " + module_input_json \ + " --output_json " + output_json subprocess.check_call(command.split(' ')) log_from_json.addEntry(modules, json_directory, session_id, logFullPath) # -*- coding: utf-8 -*-
catGT_gfix_edits=gfix_edits[i], extracted_data_directory=catGT_dest, event_ex_param_str=event_ex_param_str) # copy json file to data directory as record of the input parameters (and gfix edit rates) shutil.copy(input_json, os.path.join(data_directory, session_id + '-input.json')) for module in modules: output_json = os.path.join( json_directory, session_id + '-' + module + '-output.json') command = "python -W ignore -m ecephys_spike_sorting.modules." + module + " --input_json " + input_json \ + " --output_json " + output_json subprocess.check_call(command.split(' ')) log_from_json.addEntry(modules, json_directory, session_id, logFullPath) if runTPrime: # after loop over probes, run TPrime to create files of # event times -- edges detected in auxialliary files and spike times # from each probe -- all aligned to a reference stream. # create json files for calling TPrime session_id = spec[0] + '_TPrime' input_json = os.path.join(json_directory, session_id + '-input.json') output_json = os.path.join(json_directory, session_id + '-output.json') info = createInputJson(input_json, npx_directory=npx_directory, continuous_file=continuous_file, spikeGLX_data=True,