@@ -90,7 +90,7 @@ def generate_CatGT_input_json(self):
90
90
print ('run_CatGT is set to False, skipping...' )
91
91
return
92
92
93
- session_str , gate_str , _ , probe_str = self .parse_input_filename ()
93
+ session_str , gate_str , trig_str , probe_str = self .parse_input_filename ()
94
94
95
95
first_trig , last_trig = SpikeGLX_utils .ParseTrigStr (
96
96
'start,end' , probe_str , gate_str , self ._npx_input_dir .as_posix ())
@@ -111,6 +111,18 @@ def generate_CatGT_input_json(self):
111
111
112
112
input_meta_fullpath , continuous_file = self ._get_raw_data_filepaths ()
113
113
114
+ # create symbolic link to the actual data files - as CatGT expects files to follow a certain naming convention
115
+ continuous_file_symlink = (continuous_file .parent / f'{ session_str } _g{ gate_str } '
116
+ / f'{ session_str } _g{ gate_str } _imec{ probe_str } '
117
+ / f'{ session_str } _g{ gate_str } _t{ trig_str } .imec{ probe_str } .ap.bin' )
118
+ continuous_file_symlink .parent .mkdir (parents = True , exist_ok = True )
119
+ continuous_file_symlink .symlink_to (continuous_file )
120
+ input_meta_fullpath_symlink = (input_meta_fullpath .parent / f'{ session_str } _g{ gate_str } '
121
+ / f'{ session_str } _g{ gate_str } _imec{ probe_str } '
122
+ / f'{ session_str } _g{ gate_str } _t{ trig_str } .imec{ probe_str } .ap.meta' )
123
+ input_meta_fullpath_symlink .parent .mkdir (parents = True , exist_ok = True )
124
+ input_meta_fullpath_symlink .symlink_to (input_meta_fullpath )
125
+
114
126
createInputJson (self ._catGT_input_json .as_posix (),
115
127
KS2ver = self ._KS2ver ,
116
128
npx_directory = self ._npx_input_dir .as_posix (),
@@ -121,7 +133,7 @@ def generate_CatGT_input_json(self):
121
133
probe_string = probe_str ,
122
134
continuous_file = continuous_file .as_posix (),
123
135
input_meta_path = input_meta_fullpath .as_posix (),
124
- extracted_data_directory = self ._ks_output_dir .parent . as_posix (),
136
+ extracted_data_directory = self ._ks_output_dir .as_posix (),
125
137
kilosort_output_directory = self ._ks_output_dir .as_posix (),
126
138
kilosort_repository = _get_kilosort_repository (self ._KS2ver ),
127
139
** {k : v for k , v in catgt_params .items () if k in self ._input_json_args }
0 commit comments