{"id":20300182,"url":"https://github.com/sruffner/xsort","last_synced_at":"2026-06-08T19:04:23.379Z","repository":{"id":245193890,"uuid":"817523633","full_name":"sruffner/XSort","owner":"sruffner","description":"A Python3 tool for visualizing and curating neuronal spike train data extracted from multi-channel analog recordings.","archived":false,"fork":false,"pushed_at":"2024-07-09T19:25:16.000Z","size":448,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T06:26:41.333Z","etag":null,"topics":["datavisualization","neuroscience","python3"],"latest_commit_sha":null,"homepage":"https://github.com/sruffner/XSort/wiki","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sruffner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T22:52:42.000Z","updated_at":"2024-07-09T18:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"668cd677-bc10-484d-b3ed-e3916cbdb3e5","html_url":"https://github.com/sruffner/XSort","commit_stats":null,"previous_names":["sruffner/xsort"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sruffner/XSort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sruffner%2FXSort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sruffner%2FXSort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sruffner%2FXSort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sruffner%2FXSort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sruffner","download_url":"https://codeload.github.com/sruffner/XSort/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sruffner%2FXSort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34076025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datavisualization","neuroscience","python3"],"created_at":"2024-11-14T16:17:47.860Z","updated_at":"2026-06-08T19:04:23.364Z","avatar_url":"https://github.com/sruffner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XSort\n\nA Python/Qt application that visualizes and edits the results from spike sorting of neuronal activity recorded with \nextracellular multi-electrode probes during experiments conducted in the Stephen G. Lisberger lab at Duke University.\n\n## Background\nResearchers in the Lisberger and other neuroscience lab use multi-electrode recording systems like the [Omniplex \nNeural Recording Data Acquisition System](https://plexon.com) to record electrical activity in the brain during experiments. They \nanalyze the recorded analog channel data streams to detect and \"sort\" the electrical activity into distinct \"spike \ntrains\", each assigned to a different \"neural unit\".\n\nThe various spike-sorter algorithms employed in the lab often produce spurious results -- \"garbage\" units triggered by \nsystem noise, two spike trains that have a very similar spike waveform and really \"belong\" to the same neural unit,\nand so on. With **XSort** you can visually assess and edit the original spike-sorter output.\n\nTo use the application, select a _working directory_ containing the analog data recording (an Omniplex`.pl2` file, or a\nsupported flat binary file format) and the original spike sorter results (a Python pickle file, `.pkl`). After analying \nthe files and building an internal cache of channel data streams and unit metrics (in individual files stored in the \nworking directory), **XSort** offers a number of different data visualizations.\n\n1. A tabular listing of the neural units, including metrics -- total # of spikes observed, mean firing rate, best\nsignal-to-noise ratio (across all data channels), the primary data channel (on which best SNR was measured), and others.\n2. Channel traces for each of up to 16 analog data channels, highlighting the spikes of each of up to 3 units currently \nselected for display in the neural unit list, known as the **_display list_**.\n3. The per-data channel spike template waveforms (10ms, 1ms pre-spike time) for each unit in the display list.\n4. A firing rate-vs-time histogram, inter-spike interval histogram, and autocorrelogram for each unit in the display \nlist, along with the cross-correllogram of each unit in the display list vs another unit in the list.\n5. A 3D histogram (rendered as a heatmap) representing the unit's autocorrelogram as a function of instantaneous \nfiring rate.\n6. A principal component analysis (PCA) scatter plot projecting s a unit's spikes into a 2D space defined by the two \nhighest-variance (most information) principal components. When the analysis is performed on multiple units, it can help\nto detect distinct units that are really part of the same unit. When performed on a single neural unit, it can help \ndetect a unit that should be split into two or more distinct spike populations.\n\nYou can edit the list of neural units in a number of ways:\n1. Attach a short descriptive label (typically, the putative neuron type) to any unit.\n2. Delete a selected unit.\n3. Merge two selected units into one.\n4. Split the currently selected unit into two distinct units.\n\n**XSort** maintains a complete \"edit history\" in the current working directory, and you can \"undo\" any or all of the \nchanges in reverse order, or undo them all at once to recover the original state of the neural list. Once happy with \nany changes made, you can save the neural list for use in other applications or your own scripts.\n\n\n## Installation (for MacOS/Linux)\n- Ensure that Python 3.9+ is installed on your system. We currently build the package against\nversion 3.11.4. Contact the developer if you run into any issues running the program on 3.9.x or 3.10.x.\n- Download the wheel file `xsort-x.y.z-py3-none-any.whl`, where `x.y.x` is the release version number.\n- In a terminal console, navigate to the directory holding the wheel file you downloaded, and install \nthe package: `pip install xsort-x.y.z-py3-none-any.whl`.\n- To start the app: `python -m xsort.app`.\n- A command-line no-GUI version of **XSort** is now available that builds the internal cache for a specified working \ndirectory. For detailed usage information: `python -m xsort.app ?`.\n- You may run into the following error when starting XSort: `qt.qpa.plugin: Could not load the Qt platform \nplugin \"xcb\" in \"\" even though it was found. This application failed to start because no Qt platform plugin \ncould be initialized. Reinstalling the application may fix this problem. Available platform plugins are: \nminimalegl, minimal, wayland-egl, vkkhrdisplay, offscreen, eglfs, vnc, linuxfb, xcb, wayland.` If so, try\nreinstalling XCB platform plugin with `sudo apt-get install '*libxcb*'`\n- The **XSort** wheel file is configured to require Python 3.9 or later. You may want to avoid the \"latest and\ngreatest\" Python release as issues may arise. Eg, `pip` could not install Numpy \u003c= 1.25 when the installed\nPython version was 3.12. The Numpy developers released 1.26 to address the problem. A change in the wheel configuration \nas of XSort 0.1.4 should address the conflict and ensure that the right version of Numpy is installed if the Python \nversion is 3.12 or later.\n- **XSort** takes advantage of Python's multiprocessing library to speed up the background work it does to build a set \nof internal cache files (for optimal data retrieval) and to calculate neural unit statistics displayed in its different \nviews. It is highly recommended that you run the program on a multi-core system -- the more cores the better!\n\n## License\n**XSort** was created by [Scott Ruffner](mailto:sruffner@srscicomp.com). It is licensed under the terms of the MIT license.\n\n## Credits\nBased on a program developed by David J Herzfeld, who provided critical guidance and feedback during the\ndevelopment of **XSort**. Developed with funding provided by the Stephen G. Lisberger laboratory in the Department of\nNeurobiology at Duke University.\n\nIn addition to the Python standard library, the **XSort** user interface is built upon the Qt for Python framework, \n[PySide6](https://doc.qt.io/qtforpython-6/index.html), data analysis routines employ the [Numpy](https://numpy.org/) \nand [SciPy](https://scipy.org/) libraries, and graphical plots are drawn using [PyQtGraph](https://pyqtgraph.readthedocs.io/en/latest/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsruffner%2Fxsort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsruffner%2Fxsort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsruffner%2Fxsort/lists"}