File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -201,19 +201,21 @@ def _run_pykilosort(self, ap_file):
201201 shutil .rmtree (temp_dir , ignore_errors = True )
202202 return sorter_dir
203203
204- def _run (self , overwrite = False ):
204+ def _run (self , probes = None ):
205205 """
206206 Multiple steps. For each probe:
207207 - Runs ks2 (skips if it already ran)
208208 - synchronize the spike sorting
209209 - output the probe description files
210- :param overwrite:
210+ :param probes: (list of str) if provided, will only run spike sorting for specified probe names
211211 :return: list of files to be registered on database
212212 """
213213 efiles = spikeglx .glob_ephys_files (self .session_path )
214214 ap_files = [(ef .get ("ap" ), ef .get ("label" )) for ef in efiles if "ap" in ef .keys ()]
215215 out_files = []
216216 for ap_file , label in ap_files :
217+ if isinstance (probes , list ) and label not in probes :
218+ continue
217219 try :
218220 ks2_dir = self ._run_pykilosort (ap_file ) # runs ks2, skips if it already ran
219221 probe_out_path = self .session_path .joinpath ("alf" , label , self .SPIKE_SORTER_NAME )
You can’t perform that action at this time.
0 commit comments