From 90ef0830e783201a34f6d8987df5a2e00efe5de7 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 15 May 2024 11:52:09 -0600 Subject: [PATCH 01/15] template fetching methods --- src/spikeinterface/generation/__init__.py | 5 +- .../generation/template_database.py | 132 +++++++++++++++++- .../generation/tests/test_template_fetch.py | 46 +++++- 3 files changed, 176 insertions(+), 7 deletions(-) diff --git a/src/spikeinterface/generation/__init__.py b/src/spikeinterface/generation/__init__.py index d521f9dd9b..eae6320e8d 100644 --- a/src/spikeinterface/generation/__init__.py +++ b/src/spikeinterface/generation/__init__.py @@ -13,5 +13,8 @@ ) from .template_database import ( - fetch_templates_from_database, + fetch_template_object_from_database, + fetch_templates_database_info, + list_available_datasets_in_template_database, + query_templates_from_database, ) diff --git a/src/spikeinterface/generation/template_database.py b/src/spikeinterface/generation/template_database.py index a9b5ef0301..be5e229a25 100644 --- a/src/spikeinterface/generation/template_database.py +++ b/src/spikeinterface/generation/template_database.py @@ -1,12 +1,140 @@ -from spikeinterface.core.template import Templates import zarr +import functools +import numpy as np + +from spikeinterface.core.template import Templates + +@functools.cache +def fetch_template_object_from_database(dataset="test_templates.zarr") -> Templates: + """ + Fetch a template dataset from the spikeinterface template database. + A dataset is a collection of templates with associated metadata for one specific recording. -def fetch_templates_from_database(dataset="test_templates.zarr") -> Templates: + Parameters + ---------- + dataset : str, default: "test_templates" + The name of the dataset to fetch. + The dataset must be available in the spikeinterface template database. + Returns + ------- + Templates + _description_ + """ s3_path = f"s3://spikeinterface-template-database/{dataset}/" zarr_group = zarr.open_consolidated(s3_path, storage_options={"anon": True}) templates_object = Templates.from_zarr_group(zarr_group) return templates_object + + +@functools.cache +def fetch_templates_database_info() -> "pandas.DataFrame": + """ + Fetch the information about the templates in the spikeinterface template database. + + Returns + ------- + pd.DataFrame + Dataframe containing the template information. + """ + import pandas as pd + + s3_path = "s3://spikeinterface-template-database/templates.csv" + df = pd.read_csv(s3_path, storage_options={"anon": True}) + + return df + + +def list_available_datasets_in_template_database() -> list: + """ + List all available datasets in the spikeinterface template database. + + Returns + ------- + list + List of available datasets. + """ + df = fetch_templates_database_info() + datasets = np.unique(df["dataset"]).tolist() + + return datasets + + +def query_templates_from_database( + template_df_or_indices: "pandas.DataFrame | list[int] | np.ndarray", verbose: bool = False +) -> Templates: + """ + Retrieve templates from the spikeinterface template database. + + Parameters + ---------- + template_df_or_indices : pd.DataFrame or array-like + Dataframe containing the template information, obtained by slicing/querying the output of fetch_templates_info. + + Returns + ------- + Templates + The templates object. + """ + import pandas as pd + + templates_array = [] + if isinstance(template_df_or_indices, pd.DataFrame): + template_info = template_df_or_indices + else: + template_info = fetch_templates_database_info().iloc[template_df_or_indices] + requested_datasets = np.unique(template_info["dataset"]).tolist() + if verbose: + print(f"Fetching templates from {len(requested_datasets)} datasets") + + nbefore = None + sampling_frequency = None + channel_locations = None + probe = None + channel_ids = None + + for dataset in requested_datasets: + templates = fetch_template_object_from_database(dataset) + + # check consisency across datasets + if nbefore is None: + nbefore = templates.nbefore + if channel_locations is None: + channel_locations = templates.get_channel_locations() + if sampling_frequency is None: + sampling_frequency = templates.sampling_frequency + if probe is None: + probe = templates.probe + if channel_ids is None: + channel_ids = templates.channel_ids + current_nbefore = templates.nbefore + current_channel_locations = templates.get_channel_locations() + current_sampling_frequency = templates.sampling_frequency + + assert ( + current_nbefore == nbefore + ), f"Number of samples before the peak is not consistent across datasets: {current_nbefore} != {nbefore}" + assert ( + current_sampling_frequency == sampling_frequency + ), f"Sampling frequency is not consistent across datasets: {current_sampling_frequency} != {sampling_frequency}" + assert np.array_equal( + current_channel_locations - current_channel_locations[0], + channel_locations - channel_locations[0], + ), "Channel locations are not consistent across datasets" + + template_indices = template_info[template_info["dataset"] == dataset]["template_index"] + templates_array.append(templates.templates_array[template_indices, :, :]) + + templates_array = np.concatenate(templates_array, axis=0) + templates = Templates( + templates_array, + sampling_frequency=sampling_frequency, + channel_ids=channel_ids, + nbefore=nbefore, + probe=probe, + ) + + return templates diff --git a/src/spikeinterface/generation/tests/test_template_fetch.py b/src/spikeinterface/generation/tests/test_template_fetch.py index a7cc31af44..c0c717f2f2 100644 --- a/src/spikeinterface/generation/tests/test_template_fetch.py +++ b/src/spikeinterface/generation/tests/test_template_fetch.py @@ -1,13 +1,51 @@ -import pytest -from spikeinterface.generation import fetch_templates_from_database +import numpy as np + from spikeinterface.core.template import Templates +from spikeinterface.generation import ( + fetch_template_object_from_database, + fetch_templates_database_info, + list_available_datasets_in_template_database, + query_templates_from_database, +) + -def test_basic_call(): +def test_fetch_datasets(): - templates = fetch_templates_from_database() + available_datasets = list_available_datasets_in_template_database() + assert len(available_datasets) > 0 + templates = fetch_template_object_from_database("test_templates.zarr") assert isinstance(templates, Templates) assert templates.num_units == 100 assert templates.num_channels == 384 + + +def test_fetch_templates_database_info(): + import pandas as pd + + templates_info = fetch_templates_database_info() + + assert isinstance(templates_info, pd.DataFrame) + + assert "dataset" in templates_info.columns + + +def test_query_templates_from_database(): + templates_info = fetch_templates_database_info() + + templates_info = templates_info.iloc[::15] + num_selected = len(templates_info) + + templates = query_templates_from_database(templates_info) + + assert isinstance(templates, Templates) + + assert templates.num_units == num_selected + + +if __name__ == "__main__": + test_fetch_datasets() + test_fetch_templates_database_info() + test_query_templates_from_database() From 7afb47757aff28b11a174980b143a671d80cfd2f Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 21 May 2024 08:06:38 -0600 Subject: [PATCH 02/15] sam request for naming --- .../generation/tests/test_template_fetch.py | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/spikeinterface/generation/tests/test_template_fetch.py diff --git a/src/spikeinterface/generation/tests/test_template_fetch.py b/src/spikeinterface/generation/tests/test_template_fetch.py deleted file mode 100644 index c0c717f2f2..0000000000 --- a/src/spikeinterface/generation/tests/test_template_fetch.py +++ /dev/null @@ -1,51 +0,0 @@ -import numpy as np - -from spikeinterface.core.template import Templates - -from spikeinterface.generation import ( - fetch_template_object_from_database, - fetch_templates_database_info, - list_available_datasets_in_template_database, - query_templates_from_database, -) - - -def test_fetch_datasets(): - - available_datasets = list_available_datasets_in_template_database() - assert len(available_datasets) > 0 - - templates = fetch_template_object_from_database("test_templates.zarr") - assert isinstance(templates, Templates) - - assert templates.num_units == 100 - assert templates.num_channels == 384 - - -def test_fetch_templates_database_info(): - import pandas as pd - - templates_info = fetch_templates_database_info() - - assert isinstance(templates_info, pd.DataFrame) - - assert "dataset" in templates_info.columns - - -def test_query_templates_from_database(): - templates_info = fetch_templates_database_info() - - templates_info = templates_info.iloc[::15] - num_selected = len(templates_info) - - templates = query_templates_from_database(templates_info) - - assert isinstance(templates, Templates) - - assert templates.num_units == num_selected - - -if __name__ == "__main__": - test_fetch_datasets() - test_fetch_templates_database_info() - test_query_templates_from_database() From fd987e4de098d4a8396c0d7648cc62558bc4ae47 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 21 May 2024 08:07:02 -0600 Subject: [PATCH 03/15] sam suggestion for naming --- .../tests/test_template_database.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/spikeinterface/generation/tests/test_template_database.py diff --git a/src/spikeinterface/generation/tests/test_template_database.py b/src/spikeinterface/generation/tests/test_template_database.py new file mode 100644 index 0000000000..c0c717f2f2 --- /dev/null +++ b/src/spikeinterface/generation/tests/test_template_database.py @@ -0,0 +1,51 @@ +import numpy as np + +from spikeinterface.core.template import Templates + +from spikeinterface.generation import ( + fetch_template_object_from_database, + fetch_templates_database_info, + list_available_datasets_in_template_database, + query_templates_from_database, +) + + +def test_fetch_datasets(): + + available_datasets = list_available_datasets_in_template_database() + assert len(available_datasets) > 0 + + templates = fetch_template_object_from_database("test_templates.zarr") + assert isinstance(templates, Templates) + + assert templates.num_units == 100 + assert templates.num_channels == 384 + + +def test_fetch_templates_database_info(): + import pandas as pd + + templates_info = fetch_templates_database_info() + + assert isinstance(templates_info, pd.DataFrame) + + assert "dataset" in templates_info.columns + + +def test_query_templates_from_database(): + templates_info = fetch_templates_database_info() + + templates_info = templates_info.iloc[::15] + num_selected = len(templates_info) + + templates = query_templates_from_database(templates_info) + + assert isinstance(templates, Templates) + + assert templates.num_units == num_selected + + +if __name__ == "__main__": + test_fetch_datasets() + test_fetch_templates_database_info() + test_query_templates_from_database() From 2f2266aa88127f8a4bc5ff28034f5178f4a377c7 Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Wed, 29 May 2024 17:49:22 +0200 Subject: [PATCH 04/15] master references list --- doc/References.rst | 132 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 doc/References.rst diff --git a/doc/References.rst b/doc/References.rst new file mode 100644 index 0000000000..08e4a4e2c6 --- /dev/null +++ b/doc/References.rst @@ -0,0 +1,132 @@ +How to Cite +========== + +If you use Spikeinterface, please star us on Github! +Please cite Spikeinterface in your papers with the following reference: + + +Spikeinterface stands on the shoulders of giants! +Each method in Spikeinterface draws on (or directly runs) methods made by dozens of individuals. +Please try to reference the individual works that are important for your analysis pipeline. + +Sorters Module +-------------- +If you use one of the following spike sorting algorithms (i.e. you use the :code:`run_sorter()` method, +please include the appropriate citation for the :code:`sorter_name` parameter you use: +*Note: unless otherwise stated, the reference given is to be used for all versions of the sorter* + +- :code:`combinato` [Niediek]_ +- :code:`hdsort` [Diggelmann]_ +- :code:`herdingspikes` [Muthmann]_ [Hilgen]_ +- :code:`kilosort` [Pachitariu]_ +- :code:`mountainsort` [Chung]_ +- :code:`spykingcircus` [Yger]_ +- :code:`wavclus` [Chaure]_ +- :code:`yass` [Lee]_ + +Qualitymetrics Module +--------------------- +If you use the :code:`qualitymetrics` module, i.e. you use the :code:`analyzer.compute()` +or :code:`compute_quality_metrics()` methods, please include the citations for the :code:`metric_names` that were particularly +important for your research: + +- :code:`amplitude_cutoff` :code:`isi_violation` [Hill]_ +- :code:`amplitude_median` [IBL]_ +- :code:`drift` [Siegle]_ +- :code:`rp_violation` [Llobet]_ +- :code:`sd_ratio` [Pouzat]_ +- :code:`sliding_rp_violation` [IBL]_ +- :code:`snr` [Lemon]_ [Jackson]_ +- :code:`synchrony` [Gruen]_ + +If you use the :code:`qualitymetrics.pca_metrics` module, i.e. you use the +:code:`calculate_pc_metrics()` method, please include the citations for the :code:`metric_names` that were particularly +important for your research: + +- :code:`d_prime` [Hill]_ +- :code:`isolation_distance` :code:`l_ratio` [Schmitzer-Torbert]_ +- :code:`nearest_neighbor` :code:`nn_isolation` :code:`nn_noise_overlap` [Chung]_ [Siegle]_ +- :code:`silhouette` [Hill]_ + + + + +Nearest Neighbor Metrics (nn_hit_rate, nn_miss_rate, nn_isolation, nn_noise_overlap) +Silhouette score (silhouette, silhouette_full) + + +list of metric_names for quality_metrics: +"num_spikes": compute_num_spikes, + "firing_rate": compute_firing_rates, + "presence_ratio": compute_presence_ratios, + "snr": compute_snrs, + "isi_violation": compute_isi_violations, + "rp_violation": compute_refrac_period_violations, + "sliding_rp_violation": compute_sliding_rp_violations, + "amplitude_cutoff": compute_amplitude_cutoffs, + "amplitude_median": compute_amplitude_medians, + "amplitude_cv": compute_amplitude_cv_metrics, + "synchrony": compute_synchrony_metrics, + "firing_range": compute_firing_ranges, + "drift": compute_drift_metrics, + "sd_ratio": compute_sd_ratio, + +list of metric_names for pc_metrics: + "isolation_distance", + "l_ratio", + "d_prime", + "nearest_neighbor", + "nn_isolation", + "nn_noise_overlap", + "silhouette", + + + + +References +---------- +.. [Niediek] Niediek J, Boström J, Elger CE, Mormann F. Reliable Analysis of Single-Unit Recordings from the Human Brain under Noisy Conditions: Tracking Neurons over Hours. PLoS One. 2016 Dec 8;11(12):e0166598. doi: 10.1371/journal.pone.0166598. PMID: 27930664; PMCID: PMC5145161. + +.. [Diggelmann] Diggelmann R, Fiscella M, Hierlemann A, Franke F. Automatic spike sorting for high-density microelectrode arrays. J Neurophysiol. 2018 Dec 1;120(6):3155-3171. doi: 10.1152/jn.00803.2017. Epub 2018 Sep 12. PMID: 30207864; PMCID: PMC6314465. + +.. [Muthmann] Muthmann JO, Amin H, Sernagor E, Maccione A, Panas D, Berdondini L, Bhalla US, Hennig MH. Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays. Front Neuroinform. 2015 Dec 18;9:28. doi: 10.3389/fninf.2015.00028. PMID: 26733859; PMCID: PMC4683190. + +.. [Hilgen] Hilgen G, Sorbaro M, Pirmoradian S, Muthmann JO, Kepiro IE, Ullo S, Ramirez CJ, Puente Encinas A, Maccione A, Berdondini L, Murino V, Sona D, Cella Zanacchi F, Sernagor E, Hennig MH. Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. Cell Rep. 2017 Mar 7;18(10):2521-2532. doi: 10.1016/j.celrep.2017.02.038. PMID: 28273464. + +.. [Pachitariu] Pachitariu M, Sridhar S, Pennington J, Stringer C. Spike sorting with Kilosort4. Nat Methods. 2024 May;21(5):914-921. doi: 10.1038/s41592-024-02232-7. Epub 2024 Apr 8. PMID: 38589517; PMCID: PMC11093732. + +.. [Chung] Chung JE, Magland JF, Barnett AH, Tolosa VM, Tooker AC, Lee KY, Shah KG, Felix SH, Frank LM, Greengard LF. A Fully Automated Approach to Spike Sorting. Neuron. 2017 Sep 13;95(6):1381-1394.e6. doi: 10.1016/j.neuron.2017.08.030. PMID: 28910621; PMCID: PMC5743236. + +.. [Yger] Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C, Stimberg M, Jetter F, Zeck G, Picaud S, Duebel J, Marre O. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife. 2018 Mar 20;7:e34518. doi: 10.7554/eLife.34518. PMID: 29557782; PMCID: PMC5897014. + +.. [Chaure] Chaure FJ, Rey HG, Quian Quiroga R. A novel and fully automatic spike-sorting implementation with variable number of features. J Neurophysiol. 2018 Oct 1;120(4):1859-1871. doi: 10.1152/jn.00339.2018. Epub 2018 Jul 11. PMID: 29995603; PMCID: PMC6230803. + +.. [Lee] Lee JH, Carlson D, Shokri H, Yao W, Goetz G, Hagen E, Batty E, Chichilnisky EJ, Einevoll G, Paninski L. YASS: Yet another spike sorter. bioRxiv 151928; doi: https://doi.org/10.1101/151928 . Epub 2017 + +.. [Buzsáki] Buzsáki, György, and Kenji Mizuseki. “The Log-Dynamic Brain: How Skewed Distributions Affect Network Operations.” Nature reviews. Neuroscience 15.4 (2014): 264–278. Web. + +.. [Chung] Chung, Jason E et al. “A Fully Automated Approach to Spike Sorting.” Neuron (Cambridge, Mass.) 95.6 (2017): 1381–1394.e6. Web. + +.. [Harris] Kenneth D Harris, Hajime Hirase, Xavier Leinekugel, Darrell A Henze, and Gy ̈orgy Buzs ́aki. Temporal interaction between single spikes and complex spike bursts in hippocampal pyramidal cells. Neuron (Cambridge, Mass.), 32(1):141–149, 2001. + +.. [Hill] Hill, Daniel N., Samar B. Mehta, and David Kleinfeld. “Quality Metrics to Accompany Spike Sorting of Extracellular Signals.” The Journal of neuroscience 31.24 (2011): 8699–8705. Web. + +.. [Hruschka] Hruschka, E.R., de Castro, L.N., Campello R.J.G.B. "Evolutionary algorithms for clustering gene-expression data." Fourth IEEE International Conference on Data Mining (ICDM'04) 2004, pp 403-406. + +.. [Gruen] Sonja Grün, Moshe Abeles, and Markus Diesmann. Impact of higher-order correlations on coincidence distributions of massively parallel data. In International School on Neural Networks, Initiated by IIASS and EMFCSC, volume 5286, 96–114. Springer, 2007. + +.. [IBL] International Brain Laboratory. “Spike sorting pipeline for the International Brain Laboratory”. 4 May 2022. + +.. [Jackson] Jadin Jackson, Neil Schmitzer-Torbert, K.D. Harris, and A.D. Redish. Quantitative assessment of extracellular multichannel recording quality using measures of cluster separation. Soc Neurosci Abstr, 518, 01 2005. + +.. [Lemon] R. Lemon. Methods for neuronal recording in conscious animals. IBRO Handbook Series, 4:56–60, 1984. + +.. [Llobet] Llobet Victor, Wyngaard Aurélien and Barbour Boris. “Automatic post-processing and merging of multiple spike-sorting analyses with Lussac“. BioRxiv (2022). + +.. [Pouzat] Pouzat Christophe, Mazor Ofer and Laurent Gilles. “Using noise signature to optimize spike-sorting and to assess neuronal classification quality“. Journal of Neuroscience Methods (2002). + +.. [Rousseeuw] Peter J Rousseeuw. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20(C):53–65, 1987. + +.. [Schmitzer-Torbert] Schmitzer-Torbert, Neil, and A. David Redish. “Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task.” Journal of neurophysiology 91.5 (2004): 2259–2272. Web. + +.. [Siegle] Siegle, Joshua H. et al. “Survey of Spiking in the Mouse Visual System Reveals Functional Hierarchy.” Nature (London) 592.7852 (2021): 86–. Web. From 6d09f2f3eb54c75022519ded34804d77aedafec2 Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 13:10:28 +0200 Subject: [PATCH 05/15] references list with full citations --- doc/References.rst | 120 +++++++++++++++++++++++++++------------------ 1 file changed, 71 insertions(+), 49 deletions(-) diff --git a/doc/References.rst b/doc/References.rst index 08e4a4e2c6..feb8e4d94a 100644 --- a/doc/References.rst +++ b/doc/References.rst @@ -1,13 +1,34 @@ How to Cite ========== -If you use Spikeinterface, please star us on Github! -Please cite Spikeinterface in your papers with the following reference: +If you like Spikeinterface, please star us on Github! +Please cite Spikeinterface in your papers with our eLife paper: [Buccino]_ Spikeinterface stands on the shoulders of giants! -Each method in Spikeinterface draws on (or directly runs) methods made by dozens of individuals. +Each method in Spikeinterface draws on (or directly runs) independently-created methods. Please try to reference the individual works that are important for your analysis pipeline. +If you notice a missing reference, please let us know by submitting an issue on Github. + +Preprocessing Module +-------------------- +If you use one of the following prepocessing methods, please cite the appropriate source: + +- :code:`phase_shift` :code:`highpass_spatial_filter` [IBL]_ +- :code:`detect_bad_channels(method='coherence+psd')` [IBL]_ +- :code:`common_reference` [Rolston]_ + +Motion Correction +^^^^^^^^^^^^^^^^^ +If you use the :code:`correct_motion` method in the preprocessing module, please cite [Garcia]_ +as well as the references that correspond to the :code:`preset` you used: + +- :code:`nonrigid_accurate` [Windolf]_ [Varol]_ +- :code:`nonrigid_fast_and_accurate` [Windolf]_ [Varol]_ [Pachitariu]_ +- :code:`rigid_fast` *no additional citation needed* +- :code:`kilosort_like` [Pachitariu]_ + + Sorters Module -------------- @@ -31,11 +52,10 @@ or :code:`compute_quality_metrics()` methods, please include the citations for t important for your research: - :code:`amplitude_cutoff` :code:`isi_violation` [Hill]_ -- :code:`amplitude_median` [IBL]_ +- :code:`amplitude_median` :code:`sliding_rp_violation` [IBL]_ - :code:`drift` [Siegle]_ - :code:`rp_violation` [Llobet]_ - :code:`sd_ratio` [Pouzat]_ -- :code:`sliding_rp_violation` [IBL]_ - :code:`snr` [Lemon]_ [Jackson]_ - :code:`synchrony` [Gruen]_ @@ -45,88 +65,90 @@ important for your research: - :code:`d_prime` [Hill]_ - :code:`isolation_distance` :code:`l_ratio` [Schmitzer-Torbert]_ -- :code:`nearest_neighbor` :code:`nn_isolation` :code:`nn_noise_overlap` [Chung]_ [Siegle]_ -- :code:`silhouette` [Hill]_ - +- :code:`nearest_neighbor` :code:`nn_isolation` :code:`nn_noise_overlap` [Chung]_ [Siegle]_ +- :code:`silhouette` [Rousseeuw]_ [Hruschka]_ +Curation Module +--------------- +If you use the :code:`get_potential_auto_merge` method from the curation module, please cite [Llobet]_ -Nearest Neighbor Metrics (nn_hit_rate, nn_miss_rate, nn_isolation, nn_noise_overlap) -Silhouette score (silhouette, silhouette_full) -list of metric_names for quality_metrics: -"num_spikes": compute_num_spikes, - "firing_rate": compute_firing_rates, - "presence_ratio": compute_presence_ratios, - "snr": compute_snrs, - "isi_violation": compute_isi_violations, - "rp_violation": compute_refrac_period_violations, - "sliding_rp_violation": compute_sliding_rp_violations, - "amplitude_cutoff": compute_amplitude_cutoffs, - "amplitude_median": compute_amplitude_medians, - "amplitude_cv": compute_amplitude_cv_metrics, - "synchrony": compute_synchrony_metrics, - "firing_range": compute_firing_ranges, - "drift": compute_drift_metrics, - "sd_ratio": compute_sd_ratio, -list of metric_names for pc_metrics: - "isolation_distance", - "l_ratio", - "d_prime", - "nearest_neighbor", - "nn_isolation", - "nn_noise_overlap", - "silhouette", References ---------- -.. [Niediek] Niediek J, Boström J, Elger CE, Mormann F. Reliable Analysis of Single-Unit Recordings from the Human Brain under Noisy Conditions: Tracking Neurons over Hours. PLoS One. 2016 Dec 8;11(12):e0166598. doi: 10.1371/journal.pone.0166598. PMID: 27930664; PMCID: PMC5145161. - -.. [Diggelmann] Diggelmann R, Fiscella M, Hierlemann A, Franke F. Automatic spike sorting for high-density microelectrode arrays. J Neurophysiol. 2018 Dec 1;120(6):3155-3171. doi: 10.1152/jn.00803.2017. Epub 2018 Sep 12. PMID: 30207864; PMCID: PMC6314465. -.. [Muthmann] Muthmann JO, Amin H, Sernagor E, Maccione A, Panas D, Berdondini L, Bhalla US, Hennig MH. Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays. Front Neuroinform. 2015 Dec 18;9:28. doi: 10.3389/fninf.2015.00028. PMID: 26733859; PMCID: PMC4683190. +.. [Buccino] Buccino AP, Hurwitz CL, Garcia S, Magland J, Siegle JH, Hurwitz R, Hennig MH. SpikeInterface, a unified framework for spike sorting. Elife. 2020 Nov 10;9:e61834. doi: 10.7554/eLife.61834. PMID: 33170122; PMCID: PMC7704107. -.. [Hilgen] Hilgen G, Sorbaro M, Pirmoradian S, Muthmann JO, Kepiro IE, Ullo S, Ramirez CJ, Puente Encinas A, Maccione A, Berdondini L, Murino V, Sona D, Cella Zanacchi F, Sernagor E, Hennig MH. Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. Cell Rep. 2017 Mar 7;18(10):2521-2532. doi: 10.1016/j.celrep.2017.02.038. PMID: 28273464. +.. [Buzsáki] Buzsáki, György, and Kenji Mizuseki. “The Log-Dynamic Brain: How Skewed Distributions Affect Network Operations.” Nature reviews. Neuroscience 15.4 (2014): 264–278. Web. -.. [Pachitariu] Pachitariu M, Sridhar S, Pennington J, Stringer C. Spike sorting with Kilosort4. Nat Methods. 2024 May;21(5):914-921. doi: 10.1038/s41592-024-02232-7. Epub 2024 Apr 8. PMID: 38589517; PMCID: PMC11093732. +.. [Chaure] Chaure FJ, Rey HG, Quian Quiroga R. A novel and fully automatic spike-sorting implementation with variable number of features. J Neurophysiol. 2018 Oct 1;120(4):1859-1871. doi: 10.1152/jn.00339.2018. Epub 2018 Jul 11. PMID: 29995603; PMCID: PMC6230803. .. [Chung] Chung JE, Magland JF, Barnett AH, Tolosa VM, Tooker AC, Lee KY, Shah KG, Felix SH, Frank LM, Greengard LF. A Fully Automated Approach to Spike Sorting. Neuron. 2017 Sep 13;95(6):1381-1394.e6. doi: 10.1016/j.neuron.2017.08.030. PMID: 28910621; PMCID: PMC5743236. -.. [Yger] Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C, Stimberg M, Jetter F, Zeck G, Picaud S, Duebel J, Marre O. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife. 2018 Mar 20;7:e34518. doi: 10.7554/eLife.34518. PMID: 29557782; PMCID: PMC5897014. - -.. [Chaure] Chaure FJ, Rey HG, Quian Quiroga R. A novel and fully automatic spike-sorting implementation with variable number of features. J Neurophysiol. 2018 Oct 1;120(4):1859-1871. doi: 10.1152/jn.00339.2018. Epub 2018 Jul 11. PMID: 29995603; PMCID: PMC6230803. - -.. [Lee] Lee JH, Carlson D, Shokri H, Yao W, Goetz G, Hagen E, Batty E, Chichilnisky EJ, Einevoll G, Paninski L. YASS: Yet another spike sorter. bioRxiv 151928; doi: https://doi.org/10.1101/151928 . Epub 2017 +.. [Diggelmann] Diggelmann R, Fiscella M, Hierlemann A, Franke F. Automatic spike sorting for high-density microelectrode arrays. J Neurophysiol. 2018 Dec 1;120(6):3155-3171. doi: 10.1152/jn.00803.2017. Epub 2018 Sep 12. PMID: 30207864; PMCID: PMC6314465. -.. [Buzsáki] Buzsáki, György, and Kenji Mizuseki. “The Log-Dynamic Brain: How Skewed Distributions Affect Network Operations.” Nature reviews. Neuroscience 15.4 (2014): 264–278. Web. +.. [Garcia] Garcia S, Windolf C, Boussard J, Dichter B, Buccino AP, Yger P. A Modular Implementation to Handle and Benchmark Drift Correction for High-Density Extracellular Recordings. eNeuro. 2024 Feb 26;11(2):ENEURO.0229-23.2023. doi: 10.1523/ENEURO.0229-23.2023. PMID: 38238082; PMCID: PMC10897502. -.. [Chung] Chung, Jason E et al. “A Fully Automated Approach to Spike Sorting.” Neuron (Cambridge, Mass.) 95.6 (2017): 1381–1394.e6. Web. +.. [Gruen] Sonja Grün, Moshe Abeles, and Markus Diesmann. Impact of higher-order correlations on coincidence distributions of massively parallel data. In International School on Neural Networks, Initiated by IIASS and EMFCSC, volume 5286, 96–114. Springer, 2007. .. [Harris] Kenneth D Harris, Hajime Hirase, Xavier Leinekugel, Darrell A Henze, and Gy ̈orgy Buzs ́aki. Temporal interaction between single spikes and complex spike bursts in hippocampal pyramidal cells. Neuron (Cambridge, Mass.), 32(1):141–149, 2001. +.. [Hilgen] Hilgen G, Sorbaro M, Pirmoradian S, Muthmann JO, Kepiro IE, Ullo S, Ramirez CJ, Puente Encinas A, Maccione A, Berdondini L, Murino V, Sona D, Cella Zanacchi F, Sernagor E, Hennig MH. Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. Cell Rep. 2017 Mar 7;18(10):2521-2532. doi: 10.1016/j.celrep.2017.02.038. PMID: 28273464. + .. [Hill] Hill, Daniel N., Samar B. Mehta, and David Kleinfeld. “Quality Metrics to Accompany Spike Sorting of Extracellular Signals.” The Journal of neuroscience 31.24 (2011): 8699–8705. Web. .. [Hruschka] Hruschka, E.R., de Castro, L.N., Campello R.J.G.B. "Evolutionary algorithms for clustering gene-expression data." Fourth IEEE International Conference on Data Mining (ICDM'04) 2004, pp 403-406. -.. [Gruen] Sonja Grün, Moshe Abeles, and Markus Diesmann. Impact of higher-order correlations on coincidence distributions of massively parallel data. In International School on Neural Networks, Initiated by IIASS and EMFCSC, volume 5286, 96–114. Springer, 2007. - .. [IBL] International Brain Laboratory. “Spike sorting pipeline for the International Brain Laboratory”. 4 May 2022. .. [Jackson] Jadin Jackson, Neil Schmitzer-Torbert, K.D. Harris, and A.D. Redish. Quantitative assessment of extracellular multichannel recording quality using measures of cluster separation. Soc Neurosci Abstr, 518, 01 2005. +.. [Lee] Lee JH, Carlson D, Shokri H, Yao W, Goetz G, Hagen E, Batty E, Chichilnisky EJ, Einevoll G, Paninski L. YASS: Yet another spike sorter. bioRxiv 151928; doi: https://doi.org/10.1101/151928 . Epub 2017 + .. [Lemon] R. Lemon. Methods for neuronal recording in conscious animals. IBRO Handbook Series, 4:56–60, 1984. .. [Llobet] Llobet Victor, Wyngaard Aurélien and Barbour Boris. “Automatic post-processing and merging of multiple spike-sorting analyses with Lussac“. BioRxiv (2022). +.. [Muthmann] Muthmann JO, Amin H, Sernagor E, Maccione A, Panas D, Berdondini L, Bhalla US, Hennig MH. Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays. Front Neuroinform. 2015 Dec 18;9:28. doi: 10.3389/fninf.2015.00028. PMID: 26733859; PMCID: PMC4683190. + +.. [Niediek] Niediek J, Boström J, Elger CE, Mormann F. Reliable Analysis of Single-Unit Recordings from the Human Brain under Noisy Conditions: Tracking Neurons over Hours. PLoS One. 2016 Dec 8;11(12):e0166598. doi: 10.1371/journal.pone.0166598. PMID: 27930664; PMCID: PMC5145161. + +.. [Pachitariu] Pachitariu M, Sridhar S, Pennington J, Stringer C. Spike sorting with Kilosort4. Nat Methods. 2024 May;21(5):914-921. doi: 10.1038/s41592-024-02232-7. Epub 2024 Apr 8. PMID: 38589517; PMCID: PMC11093732. + .. [Pouzat] Pouzat Christophe, Mazor Ofer and Laurent Gilles. “Using noise signature to optimize spike-sorting and to assess neuronal classification quality“. Journal of Neuroscience Methods (2002). +.. [Rolston] Rolston JD, Gross RE, Potter SM. Common median referencing for improved action potential detection with multielectrode arrays. Annu Int Conf IEEE Eng Med Biol Soc. 2009;2009:1604-7. doi: 10.1109/IEMBS.2009.5333230. PMID: 19964004. + .. [Rousseeuw] Peter J Rousseeuw. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20(C):53–65, 1987. -.. [Schmitzer-Torbert] Schmitzer-Torbert, Neil, and A. David Redish. “Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task.” Journal of neurophysiology 91.5 (2004): 2259–2272. Web. +.. [Schmitzer-Torbert] Schmitzer-Torbert, Neil, and A. David Redish. “Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task.” Journal of neurophysiology 91.5 (2004): 2259–2272. Web. .. [Siegle] Siegle, Joshua H. et al. “Survey of Spiking in the Mouse Visual System Reveals Functional Hierarchy.” Nature (London) 592.7852 (2021): 86–. Web. + +.. [Varol] E. Varol et al., "Decentralized Motion Inference and Registration of Neuropixel Data," ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada, 2021, pp. 1085-1089, doi: 10.1109/ICASSP39728.2021.9414145. + +.. [Windolf] Windolf C, Paulk AC, Kfir Y, Trautmann E, Meszéna D, Muñoz W, Caprara I, Jamali M, Boussard J, Williams ZM, Cash SS, Paninski L, Varol E. ROBUST ONLINE MULTIBAND DRIFT ESTIMATION IN ELECTROPHYSIOLOGY DATA. Proc IEEE Int Conf Acoust Speech Signal Process. 2023 Jun;2023:10.1109/icassp49357.2023.10095487. doi: 10.1109/icassp49357.2023.10095487. Epub 2023 May 5. PMID: 37388234; PMCID: PMC10308877. + +.. [Yger] Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C, Stimberg M, Jetter F, Zeck G, Picaud S, Duebel J, Marre O. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife. 2018 Mar 20;7:e34518. doi: 10.7554/eLife.34518. PMID: 29557782; PMCID: PMC5897014. + + + + + + + + + + + + + + + + From 2a323155332959e88e85babc9ca7e8bf3d0da50d Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 14:57:48 +0200 Subject: [PATCH 06/15] references list with links --- doc/References.rst | 69 ++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/doc/References.rst b/doc/References.rst index feb8e4d94a..014d427af2 100644 --- a/doc/References.rst +++ b/doc/References.rst @@ -1,7 +1,8 @@ How to Cite ========== -If you like Spikeinterface, please star us on Github! +If you like Spikeinterface, please star us on `Github `_! +*giving us a star gives a measure of the level of use and interest, which goes a long way to getting funding* Please cite Spikeinterface in your papers with our eLife paper: [Buccino]_ @@ -28,8 +29,6 @@ as well as the references that correspond to the :code:`preset` you used: - :code:`rigid_fast` *no additional citation needed* - :code:`kilosort_like` [Pachitariu]_ - - Sorters Module -------------- If you use one of the following spike sorting algorithms (i.e. you use the :code:`run_sorter()` method, @@ -57,7 +56,7 @@ important for your research: - :code:`rp_violation` [Llobet]_ - :code:`sd_ratio` [Pouzat]_ - :code:`snr` [Lemon]_ [Jackson]_ -- :code:`synchrony` [Gruen]_ +- :code:`synchrony` [Grun]_ If you use the :code:`qualitymetrics.pca_metrics` module, i.e. you use the :code:`calculate_pc_metrics()` method, please include the citations for the :code:`metric_names` that were particularly @@ -72,70 +71,62 @@ Curation Module --------------- If you use the :code:`get_potential_auto_merge` method from the curation module, please cite [Llobet]_ - - - - - - - - References ---------- -.. [Buccino] Buccino AP, Hurwitz CL, Garcia S, Magland J, Siegle JH, Hurwitz R, Hennig MH. SpikeInterface, a unified framework for spike sorting. Elife. 2020 Nov 10;9:e61834. doi: 10.7554/eLife.61834. PMID: 33170122; PMCID: PMC7704107. +.. [Buccino] `SpikeInterface, a unified framework for spike sorting. 2020. `_ -.. [Buzsáki] Buzsáki, György, and Kenji Mizuseki. “The Log-Dynamic Brain: How Skewed Distributions Affect Network Operations.” Nature reviews. Neuroscience 15.4 (2014): 264–278. Web. +.. [Buzsaki] `The Log-Dynamic Brain: How Skewed Distributions Affect Network Operations. 2014. `_ -.. [Chaure] Chaure FJ, Rey HG, Quian Quiroga R. A novel and fully automatic spike-sorting implementation with variable number of features. J Neurophysiol. 2018 Oct 1;120(4):1859-1871. doi: 10.1152/jn.00339.2018. Epub 2018 Jul 11. PMID: 29995603; PMCID: PMC6230803. +.. [Chaure] `A novel and fully automatic spike-sorting implementation with variable number of features. 2018. `_ -.. [Chung] Chung JE, Magland JF, Barnett AH, Tolosa VM, Tooker AC, Lee KY, Shah KG, Felix SH, Frank LM, Greengard LF. A Fully Automated Approach to Spike Sorting. Neuron. 2017 Sep 13;95(6):1381-1394.e6. doi: 10.1016/j.neuron.2017.08.030. PMID: 28910621; PMCID: PMC5743236. +.. [Chung] `A Fully Automated Approach to Spike Sorting. 2017. `_ -.. [Diggelmann] Diggelmann R, Fiscella M, Hierlemann A, Franke F. Automatic spike sorting for high-density microelectrode arrays. J Neurophysiol. 2018 Dec 1;120(6):3155-3171. doi: 10.1152/jn.00803.2017. Epub 2018 Sep 12. PMID: 30207864; PMCID: PMC6314465. +.. [Diggelmann] `Automatic spike sorting for high-density microelectrode arrays. 2018. `_ -.. [Garcia] Garcia S, Windolf C, Boussard J, Dichter B, Buccino AP, Yger P. A Modular Implementation to Handle and Benchmark Drift Correction for High-Density Extracellular Recordings. eNeuro. 2024 Feb 26;11(2):ENEURO.0229-23.2023. doi: 10.1523/ENEURO.0229-23.2023. PMID: 38238082; PMCID: PMC10897502. +.. [Garcia] `A Modular Implementation to Handle and Benchmark Drift Correction for High-Density Extracellular Recordings. 2024. `_ -.. [Gruen] Sonja Grün, Moshe Abeles, and Markus Diesmann. Impact of higher-order correlations on coincidence distributions of massively parallel data. In International School on Neural Networks, Initiated by IIASS and EMFCSC, volume 5286, 96–114. Springer, 2007. +.. [Grun] `Impact of higher-order correlations on coincidence distributions of massively parallel data. 2007. `_ -.. [Harris] Kenneth D Harris, Hajime Hirase, Xavier Leinekugel, Darrell A Henze, and Gy ̈orgy Buzs ́aki. Temporal interaction between single spikes and complex spike bursts in hippocampal pyramidal cells. Neuron (Cambridge, Mass.), 32(1):141–149, 2001. +.. [Harris] `Temporal interaction between single spikes and complex spike bursts in hippocampal pyramidal cells. 2001. `_ -.. [Hilgen] Hilgen G, Sorbaro M, Pirmoradian S, Muthmann JO, Kepiro IE, Ullo S, Ramirez CJ, Puente Encinas A, Maccione A, Berdondini L, Murino V, Sona D, Cella Zanacchi F, Sernagor E, Hennig MH. Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. Cell Rep. 2017 Mar 7;18(10):2521-2532. doi: 10.1016/j.celrep.2017.02.038. PMID: 28273464. +.. [Hilgen] `Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. 2017. `_ -.. [Hill] Hill, Daniel N., Samar B. Mehta, and David Kleinfeld. “Quality Metrics to Accompany Spike Sorting of Extracellular Signals.” The Journal of neuroscience 31.24 (2011): 8699–8705. Web. +.. [Hill] `Quality Metrics to Accompany Spike Sorting of Extracellular Signals. 2011. `_ -.. [Hruschka] Hruschka, E.R., de Castro, L.N., Campello R.J.G.B. "Evolutionary algorithms for clustering gene-expression data." Fourth IEEE International Conference on Data Mining (ICDM'04) 2004, pp 403-406. +.. [Hruschka] `Evolutionary algorithms for clustering gene-expression data. 2004. `_ -.. [IBL] International Brain Laboratory. “Spike sorting pipeline for the International Brain Laboratory”. 4 May 2022. +.. [IBL] `Spike sorting pipeline for the International Brain Laboratory. 2022. `_ -.. [Jackson] Jadin Jackson, Neil Schmitzer-Torbert, K.D. Harris, and A.D. Redish. Quantitative assessment of extracellular multichannel recording quality using measures of cluster separation. Soc Neurosci Abstr, 518, 01 2005. +.. [Jackson] Quantitative assessment of extracellular multichannel recording quality using measures of cluster separation. Society of Neuroscience Abstract. 2005. -.. [Lee] Lee JH, Carlson D, Shokri H, Yao W, Goetz G, Hagen E, Batty E, Chichilnisky EJ, Einevoll G, Paninski L. YASS: Yet another spike sorter. bioRxiv 151928; doi: https://doi.org/10.1101/151928 . Epub 2017 +.. [Lee] `YASS: Yet another spike sorter. 2017. `_ -.. [Lemon] R. Lemon. Methods for neuronal recording in conscious animals. IBRO Handbook Series, 4:56–60, 1984. +.. [Lemon] Methods for neuronal recording in conscious animals. IBRO Handbook Series. 1984. -.. [Llobet] Llobet Victor, Wyngaard Aurélien and Barbour Boris. “Automatic post-processing and merging of multiple spike-sorting analyses with Lussac“. BioRxiv (2022). +.. [Llobet] `Automatic post-processing and merging of multiple spike-sorting analyses with Lussac. 2022. `_ -.. [Muthmann] Muthmann JO, Amin H, Sernagor E, Maccione A, Panas D, Berdondini L, Bhalla US, Hennig MH. Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays. Front Neuroinform. 2015 Dec 18;9:28. doi: 10.3389/fninf.2015.00028. PMID: 26733859; PMCID: PMC4683190. +.. [Muthmann] `Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays. 2015. `_ -.. [Niediek] Niediek J, Boström J, Elger CE, Mormann F. Reliable Analysis of Single-Unit Recordings from the Human Brain under Noisy Conditions: Tracking Neurons over Hours. PLoS One. 2016 Dec 8;11(12):e0166598. doi: 10.1371/journal.pone.0166598. PMID: 27930664; PMCID: PMC5145161. +.. [Niediek] `Reliable Analysis of Single-Unit Recordings from the Human Brain under Noisy Conditions: Tracking Neurons over Hours. 2016. `_ -.. [Pachitariu] Pachitariu M, Sridhar S, Pennington J, Stringer C. Spike sorting with Kilosort4. Nat Methods. 2024 May;21(5):914-921. doi: 10.1038/s41592-024-02232-7. Epub 2024 Apr 8. PMID: 38589517; PMCID: PMC11093732. +.. [Pachitariu] `Spike sorting with Kilosort4. 2024. `_ -.. [Pouzat] Pouzat Christophe, Mazor Ofer and Laurent Gilles. “Using noise signature to optimize spike-sorting and to assess neuronal classification quality“. Journal of Neuroscience Methods (2002). +.. [Pouzat] `Using noise signature to optimize spike-sorting and to assess neuronal classification quality. 2002. `_ -.. [Rolston] Rolston JD, Gross RE, Potter SM. Common median referencing for improved action potential detection with multielectrode arrays. Annu Int Conf IEEE Eng Med Biol Soc. 2009;2009:1604-7. doi: 10.1109/IEMBS.2009.5333230. PMID: 19964004. +.. [Rolston] `Common median referencing for improved action potential detection with multielectrode arrays. 2009. `_ -.. [Rousseeuw] Peter J Rousseeuw. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20(C):53–65, 1987. +.. [Rousseeuw] `Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. 1987. `_ -.. [Schmitzer-Torbert] Schmitzer-Torbert, Neil, and A. David Redish. “Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task.” Journal of neurophysiology 91.5 (2004): 2259–2272. Web. +.. [Schmitzer-Torbert] `Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task. 2004. `_ -.. [Siegle] Siegle, Joshua H. et al. “Survey of Spiking in the Mouse Visual System Reveals Functional Hierarchy.” Nature (London) 592.7852 (2021): 86–. Web. +.. [Siegle] `Survey of Spiking in the Mouse Visual System Reveals Functional Hierarchy. 2021. `_ -.. [Varol] E. Varol et al., "Decentralized Motion Inference and Registration of Neuropixel Data," ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada, 2021, pp. 1085-1089, doi: 10.1109/ICASSP39728.2021.9414145. +.. [Varol] `Decentralized Motion Inference and Registration of Neuropixel Data. 2021. `_ -.. [Windolf] Windolf C, Paulk AC, Kfir Y, Trautmann E, Meszéna D, Muñoz W, Caprara I, Jamali M, Boussard J, Williams ZM, Cash SS, Paninski L, Varol E. ROBUST ONLINE MULTIBAND DRIFT ESTIMATION IN ELECTROPHYSIOLOGY DATA. Proc IEEE Int Conf Acoust Speech Signal Process. 2023 Jun;2023:10.1109/icassp49357.2023.10095487. doi: 10.1109/icassp49357.2023.10095487. Epub 2023 May 5. PMID: 37388234; PMCID: PMC10308877. +.. [Windolf] `Robust Online Multiband Drift Estimation in Electrophysiology Data. 2022. `_ -.. [Yger] Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C, Stimberg M, Jetter F, Zeck G, Picaud S, Duebel J, Marre O. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife. 2018 Mar 20;7:e34518. doi: 10.7554/eLife.34518. PMID: 29557782; PMCID: PMC5897014. +.. [Yger] `A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. 2018. `_ From 924aa4a0705f3c6cedc01e59fa7ad2954e898de5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 12:59:29 +0000 Subject: [PATCH 07/15] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/References.rst | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/doc/References.rst b/doc/References.rst index 014d427af2..691ce9f12f 100644 --- a/doc/References.rst +++ b/doc/References.rst @@ -127,19 +127,3 @@ References .. [Windolf] `Robust Online Multiband Drift Estimation in Electrophysiology Data. 2022. `_ .. [Yger] `A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. 2018. `_ - - - - - - - - - - - - - - - - From 71a4d0ce21edfb7641c026b4e78b6b3da49991a8 Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 15:24:09 +0200 Subject: [PATCH 08/15] Stylistic fixes from Zach Co-authored-by: Zach McKenzie <92116279+zm711@users.noreply.github.com> --- doc/References.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/References.rst b/doc/References.rst index 691ce9f12f..e31444e026 100644 --- a/doc/References.rst +++ b/doc/References.rst @@ -1,21 +1,21 @@ How to Cite ========== -If you like Spikeinterface, please star us on `Github `_! +If you like SpikeInterface, please star us on `Github `_! *giving us a star gives a measure of the level of use and interest, which goes a long way to getting funding* -Please cite Spikeinterface in your papers with our eLife paper: [Buccino]_ +Please cite SpikeInterface in your papers with our eLife paper: [Buccino]_ -Spikeinterface stands on the shoulders of giants! -Each method in Spikeinterface draws on (or directly runs) independently-created methods. +SpikeInterface stands on the shoulders of giants! +Each method in SpikeInterface draws on (or directly runs) independently-created methods. Please try to reference the individual works that are important for your analysis pipeline. If you notice a missing reference, please let us know by submitting an issue on Github. Preprocessing Module -------------------- -If you use one of the following prepocessing methods, please cite the appropriate source: +If you use one of the following preprocessing methods, please cite the appropriate source: -- :code:`phase_shift` :code:`highpass_spatial_filter` [IBL]_ +- :code:`phase_shift` or :code:`highpass_spatial_filter` [IBL]_ - :code:`detect_bad_channels(method='coherence+psd')` [IBL]_ - :code:`common_reference` [Rolston]_ @@ -50,8 +50,8 @@ If you use the :code:`qualitymetrics` module, i.e. you use the :code:`analyzer.c or :code:`compute_quality_metrics()` methods, please include the citations for the :code:`metric_names` that were particularly important for your research: -- :code:`amplitude_cutoff` :code:`isi_violation` [Hill]_ -- :code:`amplitude_median` :code:`sliding_rp_violation` [IBL]_ +- :code:`amplitude_cutoff` or :code:`isi_violation` [Hill]_ +- :code:`amplitude_median` or :code:`sliding_rp_violation` [IBL]_ - :code:`drift` [Siegle]_ - :code:`rp_violation` [Llobet]_ - :code:`sd_ratio` [Pouzat]_ @@ -59,12 +59,12 @@ important for your research: - :code:`synchrony` [Grun]_ If you use the :code:`qualitymetrics.pca_metrics` module, i.e. you use the -:code:`calculate_pc_metrics()` method, please include the citations for the :code:`metric_names` that were particularly +:code:`compute_pc_metrics()` method, please include the citations for the :code:`metric_names` that were particularly important for your research: - :code:`d_prime` [Hill]_ -- :code:`isolation_distance` :code:`l_ratio` [Schmitzer-Torbert]_ -- :code:`nearest_neighbor` :code:`nn_isolation` :code:`nn_noise_overlap` [Chung]_ [Siegle]_ +- :code:`isolation_distance` or :code:`l_ratio` [Schmitzer-Torbert]_ +- :code:`nearest_neighbor` or :code:`nn_isolation` or :code:`nn_noise_overlap` [Chung]_ [Siegle]_ - :code:`silhouette` [Rousseeuw]_ [Hruschka]_ Curation Module From 80213468ab5506120a34adfdfc759e68f1c4680e Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 15:34:03 +0200 Subject: [PATCH 09/15] stylistic changes, integration of references page into index --- doc/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/index.rst b/doc/index.rst index 080a6ba8ac..96dea055cb 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -58,6 +58,7 @@ SpikeInterface is made of several modules to deal with different aspects of the development/development whatisnew authors + references Other resources From 9d596e69cd86992924c9bad6ba7e126a0391a587 Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 15:36:00 +0200 Subject: [PATCH 10/15] stylistic changes --- doc/References.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/References.rst b/doc/References.rst index e31444e026..4d243bc3f3 100644 --- a/doc/References.rst +++ b/doc/References.rst @@ -1,5 +1,5 @@ How to Cite -========== +=========== If you like SpikeInterface, please star us on `Github `_! *giving us a star gives a measure of the level of use and interest, which goes a long way to getting funding* From a589e1042a714bfd3981461a832fa85f21760927 Mon Sep 17 00:00:00 2001 From: Ashkees <57949038+Ashkees@users.noreply.github.com> Date: Thu, 30 May 2024 17:14:29 +0200 Subject: [PATCH 11/15] Rename References.rst to references.rst --- doc/{References.rst => references.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{References.rst => references.rst} (100%) diff --git a/doc/References.rst b/doc/references.rst similarity index 100% rename from doc/References.rst rename to doc/references.rst From 61b8a2d3d4fd96eb111db31ab17a2769ed60947e Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Sat, 1 Jun 2024 13:14:19 +0200 Subject: [PATCH 12/15] Update doc/references.rst Co-authored-by: Heberto Mayorquin --- doc/references.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/references.rst b/doc/references.rst index 4d243bc3f3..ace51db951 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -9,7 +9,7 @@ Please cite SpikeInterface in your papers with our eLife paper: [Buccino]_ SpikeInterface stands on the shoulders of giants! Each method in SpikeInterface draws on (or directly runs) independently-created methods. Please try to reference the individual works that are important for your analysis pipeline. -If you notice a missing reference, please let us know by submitting an issue on Github. +If you notice a missing reference, please let us know by `submitting an issue `_ on Github. Preprocessing Module -------------------- From edc04b0c846ce22dc3c1df8cec7e82b78cf74a24 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Sat, 1 Jun 2024 05:40:58 -0600 Subject: [PATCH 13/15] remove upper bound in scipy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d040a4a36b..a3551d0451 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ full = [ "h5py", "pandas", "xarray", - "scipy<1.13", + "scipy", "scikit-learn", "networkx", "distinctipy", From dc6601821491432e4917543eb2b6e68a263f6587 Mon Sep 17 00:00:00 2001 From: chrishalcrow <57948917+chrishalcrow@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:48:53 +0100 Subject: [PATCH 14/15] Add a jQuery extension to enable search --- doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/conf.py b/doc/conf.py index 1a5dfb3ec7..4373ec3c36 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -67,6 +67,7 @@ 'numpydoc', 'sphinx.ext.autosectionlabel', 'sphinx_design', + 'sphinxcontrib.jquery', "sphinx.ext.intersphinx", "sphinx.ext.extlinks", "IPython.sphinxext.ipython_directive", From 5833495c7b117361205fdfec9523af805fc977df Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 3 Jun 2024 17:36:46 +0200 Subject: [PATCH 15/15] Remove indices option and fix test name --- src/spikeinterface/generation/template_database.py | 14 ++++---------- .../generation/tests/test_template_database.py | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/spikeinterface/generation/template_database.py b/src/spikeinterface/generation/template_database.py index be5e229a25..e1cba07c8e 100644 --- a/src/spikeinterface/generation/template_database.py +++ b/src/spikeinterface/generation/template_database.py @@ -63,15 +63,13 @@ def list_available_datasets_in_template_database() -> list: return datasets -def query_templates_from_database( - template_df_or_indices: "pandas.DataFrame | list[int] | np.ndarray", verbose: bool = False -) -> Templates: +def query_templates_from_database(template_df: "pandas.DataFrame", verbose: bool = False) -> Templates: """ Retrieve templates from the spikeinterface template database. Parameters ---------- - template_df_or_indices : pd.DataFrame or array-like + template_df : pd.DataFrame Dataframe containing the template information, obtained by slicing/querying the output of fetch_templates_info. Returns @@ -82,11 +80,7 @@ def query_templates_from_database( import pandas as pd templates_array = [] - if isinstance(template_df_or_indices, pd.DataFrame): - template_info = template_df_or_indices - else: - template_info = fetch_templates_database_info().iloc[template_df_or_indices] - requested_datasets = np.unique(template_info["dataset"]).tolist() + requested_datasets = np.unique(template_df["dataset"]).tolist() if verbose: print(f"Fetching templates from {len(requested_datasets)} datasets") @@ -125,7 +119,7 @@ def query_templates_from_database( channel_locations - channel_locations[0], ), "Channel locations are not consistent across datasets" - template_indices = template_info[template_info["dataset"] == dataset]["template_index"] + template_indices = template_df[template_df["dataset"] == dataset]["template_index"] templates_array.append(templates.templates_array[template_indices, :, :]) templates_array = np.concatenate(templates_array, axis=0) diff --git a/src/spikeinterface/generation/tests/test_template_database.py b/src/spikeinterface/generation/tests/test_template_database.py index c0c717f2f2..757018de89 100644 --- a/src/spikeinterface/generation/tests/test_template_database.py +++ b/src/spikeinterface/generation/tests/test_template_database.py @@ -10,7 +10,7 @@ ) -def test_fetch_datasets(): +def test_fetch_template_object_from_database(): available_datasets = list_available_datasets_in_template_database() assert len(available_datasets) > 0 @@ -46,6 +46,6 @@ def test_query_templates_from_database(): if __name__ == "__main__": - test_fetch_datasets() + test_fetch_template_object_from_database() test_fetch_templates_database_info() test_query_templates_from_database()