BinMSGUI - Sorting Axona Data with MountainSort Draft

Posted by Geoff, Published: 5 years, 3 months ago (Updated: 5 years, 3 months ago)

BinMSGUI1 is a Python Graphical User Interface (GUI) that I developed in order to test MountainSort's2,3 (MS) spike sorting algorithm. We use Axona's4 DacqUSB in order to record in-vivo electrophysiology data in Alzheimer's mice models. That being said, the DacqUSB allows you to record in two modes: Bin (continuous) and Tint (snippets). This package focuses on sorting the continuous Bin data, as MountainSort's curation step requires random sampling of the data to determine if each identified cell exceeds a provided noise overlap parameter. The data is ultimately converted to the Tint format, as we use the Tint software to manually sort and analyze the data. Note: MountainSort can sort snippets, but it's difficult to curate these results as the algorithm requires random sampling (of non spike data) to determine the noise contamination percentage of each cell. 

Requirements:

  1. Python: this code was written using Python 3.7, however the compatibility really only depends on PyQt5, which requires Python 2.6+. This was written in Python 3 so I suggest getting the latest version of Python5. It will make the installation process easier as PyQt5 used to be a pain to download in the older versions (3.4 for example). If you happen to have problems downloading PyQ5t, you will need to search for a wheel (.whl) file for PyQt5 for your version (of Python and OS).
  2. Operating System: BinMSGUI in its current state requires that you have Windows 10, as it will require us downloading the Windows Subsystem for Linux (WSL). If you are a Linux user, it should not be too difficult to add some code that will make BinMSGUI operable with your operating system. Right now I simply am running the terminal commands through WSL via Python. We could likely determine if the user is running on Linux and then just pipe the commands using the os module.
  3. Windows Subsystem for Linux (WSL): as mentioned in Step 2, we will be using the WSL, therefore you must have that installed. I describe how to install the WSL here6.
  4. Bin Formatted Data: this GUI is designed to convert .bin data to the .mda format that MountainSort requires, sort that data using the MountainSort algorithm, and then convert this sorted data to the Tint format. Therefore, the first step is that you must have your data in the .bin file format (recorded from Axona's dacqUSB).
  5. MountainSort Installed: As I mentioned in step 4, the data will be sorted using MountainSort, therefore you must have MountainSort installed. I have detailed steps on installing MountainSort for the WSL here7, however your best bet is to check the README3 file from the Flatiron Institute.

Python Dependencies

  • PyQt5
  • PyQt5-sip
  • NumPy
  • SciPy
  • matplotlib
  • Jupyter

Installation

  1. Install MountainSort: I have detailed steps on installing MountainSort for the WSL here7, however your best bet is to check the README3 file from the Flatiron Institute.
  2. Install ms4_geoff_pipeline: this is a custom processor that I created to improve the process of using MountainSort. I have detailed the installation for this pipeline here8.
  3. Install GitHub Repository if using Jupyter Notebook: this project existed initially in a Jupyter Notebook, and was converted to a Graphical User Interface (GUI). If you want to use the Jupyter Notebook, I suggest that you clone the GitHub Repository by using the following command:
    git clone https://github.com/HussainiLab/BinMSGUI.git​
  4. Install Jupyter: this is an obvious step, but if you are using the Jupyter Notebook, you must have Jupyter installed in your Python environment. You can install via pip by using the following command in the Command Prompt/Terminal:
    python -m pip install jupyter​
  5. Install BinMSGUI via pip: if you prefer to use the Graphical User Interface, then I suggest you simply download with pip by using the following command:
    python -m pip install BinMSGUI​
  6. Launch GUI: if you want to launch the GUI, execute the following command:
    python -m BinMSGUI​

References

  1. Barrett, Geoff, BinMSGUI, (2019), GitHub,https://github.com/HussainiLab/BinMSGUI.
  2. Chung JE, et al. A fully automated approach to spike sorting. 2017;:1381–1394. doi: 10.1016/j.neuron.2017.08.030.
  3. Magland, Jeremy, MountainSort, (2018), GitHub,https://github.com/flatironinstitute/mountainsort_examples/blob/master/README.md
  4. “Axona - Technology for Neuroscience.” Axona - Technology for Neuroscience, Axona LLC, www.axona.com/.
  5. Python Downloads: https://www.python.org/downloads/
  6. Installing Windows Subsystem for Linux (WSL): geba.technology/project/mountainsort-with-windows-installing-windows-subsystem-for-linux-wsl
  7. Installing MountainSort (on the WSL) geba.technology/project/mountainsort-with-windows-installation
  8. MountainSort Custom "ms4_geoff_pipeline" Processor geba.technology/project/mountainsort-with-windows-mountainsort-custom-ms4_geoff_pipeline-processor

Project Contents

BinMSGUI User Guide Draft

Now that you have installed BinMSGUI and the necessary dependencies, you can get to using the GUI / Jupyter Notebook. 

BinMSGUI - Jupyter Notebook User Guide

  1. Launch Jupyter Notebook: you will begin by launching Jupyter Notebook if you have not already done so. You can launch Jupyter Notebook from the command prompt/terminal with the use of the followi…

Read More →

Comments

Post Comment