diff --git a/doc/modules/sorters.rst b/doc/modules/sorters.rst index 4045dd4674..4293e61eab 100644 --- a/doc/modules/sorters.rst +++ b/doc/modules/sorters.rst @@ -472,24 +472,29 @@ Here is the list of external sorters accessible using the run_sorter wrapper: * **Kilosort2.5** :code:`run_sorter(sorter_name='kilosort2_5')` * **Kilosort3** :code:`run_sorter(sorter_name='kilosort3')` * **PyKilosort** :code:`run_sorter(sorter_name='pykilosort')` -* **Klusta** :code:`run_sorter(sorter_name='klusta')` * **Mountainsort4** :code:`run_sorter(sorter_name='mountainsort4')` * **Mountainsort5** :code:`run_sorter(sorter_name='mountainsort5')` -* **RT-Sort** :code:`run_sorter(sorter_name='rt-sort')` +* **RTSort** :code:`run_sorter(sorter_name='rtsort')` * **SpyKING Circus** :code:`run_sorter(sorter_name='spykingcircus')` * **Tridesclous** :code:`run_sorter(sorter_name='tridesclous')` * **Wave clus** :code:`run_sorter(sorter_name='waveclus')` * **Combinato** :code:`run_sorter(sorter_name='combinato')` * **HDSort** :code:`run_sorter(sorter_name='hdsort')` -* **YASS** :code:`run_sorter(sorter_name='yass')` - -Here a list of internal sorter based on `spikeinterface.sortingcomponents`; they are totally +Here is a list of internal sorter based on `spikeinterface.sortingcomponents`; they are totally experimental for now: * **Spyking Circus2** :code:`run_sorter(sorter_name='spykingcircus2')` * **Tridesclous2** :code:`run_sorter(sorter_name='tridesclous2')` + +Here is the list of legacy sorters that are no longer supported, but can still be run +with an older version of SpikeInterface: + +* **Klusta** :code:`run_sorter(sorter_name='klusta')` +* **YASS** :code:`run_sorter(sorter_name='yass')` + + In 2024, we expect to add many more sorters to this list. diff --git a/doc/references.rst b/doc/references.rst index 10048a9d91..0a324d1b7b 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -43,7 +43,7 @@ please include the appropriate citation for the :code:`sorter_name` parameter yo - :code:`herdingspikes` [Muthmann]_ [Hilgen]_ - :code:`kilosort` [Pachitariu]_ - :code:`mountainsort` [Chung]_ -- :code:`rt-sort` [van_der_Molen]_ +- :code:`rtsort` [van_der_Molen]_ - :code:`spykingcircus` [Yger]_ - :code:`wavclus` [Chaure]_ - :code:`yass` [Lee]_ diff --git a/src/spikeinterface/sorters/container_tools.py b/src/spikeinterface/sorters/container_tools.py index 958d467fbf..a548ee5b18 100644 --- a/src/spikeinterface/sorters/container_tools.py +++ b/src/spikeinterface/sorters/container_tools.py @@ -263,7 +263,6 @@ def install_package_in_container( if extra is not None: cmd += f"{extra}" res_output = container_client.run_command(cmd) - else: raise ValueError(f"install_package_incontainer, wrong installation_mode={installation_mode}") diff --git a/src/spikeinterface/sorters/external/rt_sort.py b/src/spikeinterface/sorters/external/rt_sort.py index 23e1ca5ffb..b8c00c00c0 100644 --- a/src/spikeinterface/sorters/external/rt_sort.py +++ b/src/spikeinterface/sorters/external/rt_sort.py @@ -10,7 +10,7 @@ class RTSortSorter(BaseSorter): """RTSort sorter object""" - sorter_name = "rt-sort" + sorter_name = "rtsort" _default_params = { "detection_model": "neuropixels", diff --git a/src/spikeinterface/sorters/runsorter.py b/src/spikeinterface/sorters/runsorter.py index 2799222e28..dea5073b08 100644 --- a/src/spikeinterface/sorters/runsorter.py +++ b/src/spikeinterface/sorters/runsorter.py @@ -18,8 +18,8 @@ from spikeinterface.core import BaseRecording, NumpySorting, load from spikeinterface.core.core_tools import check_json, is_editable_mode -from .sorterlist import sorter_dict -from .utils import ( +from spikeinterface.sorters.sorterlist import sorter_dict, archived_sorters +from spikeinterface.sorters.utils import ( SpikeSortingError, has_nvidia, has_docker, @@ -28,7 +28,7 @@ has_spython, has_docker_nvidia_installed, ) -from .container_tools import ( +from spikeinterface.sorters.container_tools import ( find_recording_folders, path_to_unix, windows_extractor_dict_to_unix, @@ -43,14 +43,14 @@ combinato="combinato", herdingspikes="herdingspikes", kilosort4="kilosort4", - klusta="klusta", mountainsort4="mountainsort4", mountainsort5="mountainsort5", pykilosort="pykilosort", + rtsort="rtsort", spykingcircus="spyking-circus", spykingcircus2="spyking-circus2", tridesclous="tridesclous", - yass="yass", + tridesclous2="tridesclous2", # Matlab compiled sorters: hdsort="hdsort-compiled", ironclust="ironclust-compiled", @@ -60,6 +60,9 @@ kilosort3="kilosort3-compiled", waveclus="waveclus-compiled", waveclus_snippets="waveclus-compiled", + # archived + # klusta="klusta", + # yass="yass", ) SORTER_DOCKER_MAP = {k: f"{REGISTRY}/{v}-base" for k, v in SORTER_DOCKER_MAP.items()} @@ -127,6 +130,11 @@ def run_sorter( -------- >>> sorting = run_sorter("tridesclous", recording) """ + if sorter_name in archived_sorters(): + raise ValueError( + f"The sorter {sorter_name} is archived and no longer supported. " + "Please use a different sorter or an older version of SpikeInterface." + ) common_kwargs = dict( sorter_name=sorter_name, @@ -547,7 +555,7 @@ def run_sorter_container( res_output += str(container_client.run_command(cmd)) need_si_install = "ModuleNotFoundError" in res_output - if need_si_install: + if need_si_install or installation_mode == "dev": # update pip in container cmd = f"pip install --user --upgrade pip" res_output = container_client.run_command(cmd) diff --git a/src/spikeinterface/sorters/sorterlist.py b/src/spikeinterface/sorters/sorterlist.py index a00f5e831b..ed8ba7b6bc 100644 --- a/src/spikeinterface/sorters/sorterlist.py +++ b/src/spikeinterface/sorters/sorterlist.py @@ -37,7 +37,6 @@ Kilosort3Sorter, Kilosort4Sorter, PyKilosortSorter, - KlustaSorter, Mountainsort4Sorter, Mountainsort5Sorter, RTSortSorter, @@ -52,6 +51,8 @@ SimpleSorter, ] +# archived +archived_sorter_list = [KlustaSorter, YassSorter] try: # if the spikeinterface_kilosort_components source are installed on the machine @@ -71,6 +72,12 @@ def available_sorters(): return sorted(list(sorter_dict.keys())) +def archived_sorters(): + """Lists archived sorters.""" + + return sorted([s.sorter_name for s in archived_sorter_list]) + + def installed_sorters(): """Lists installed sorters."""