Skip to content

The development branch for HSL automation and analysis

Notifications You must be signed in to change notification settings

MaxJackson/HSL_Dev

Repository files navigation

HSL_DEV

Overview

This repo contains python scripts for analyzing MEA electrophysiology data.

Please generate issues in github (here) or email max ([email protected]) to report errors, difficulties, comments, and requests.

Installation

Download and install Anaconda for Python 2.7, found here: https://www.continuum.io/downloads

Download this repository and unzip it in your directory of choice.

Double-click on setup.bat to run the setup batch file.

Usage

To use these scripts, double click on their associated batch file. Alternatively, open a command line in the script's directory and enter python script_name.py. For example, to use CV_dev.py, enter python CV_dev.py.

Note that these analysis scripts currently analyze text files generated by MC_DataTool - before analyzing a file, be sure to generate its text file via mcd_datatool_gen.bat.

Errors, when they occur, will be logged in files named after the current date and time in the error_logs folder.

Data Conversion

Double-click on the 'mcd_datatool_gen.bat' batch file. alt tag

Select a folder for conversion. All subfolders will be converted as well.
alt tag

This generates a script for MC_DataTool. Double click on the newly-generated .bat file, named after the folder you selected. alt tag

MC_DataTool is now running. Check the terminal for progress. alt tag

The converted files are generated in the MC_DataTool_Output folder and are ready for use. alt tag

QT Intervals

To run the QT interval script, double-click the 'QT_Dev.bat' batch file. alt tag

This will open up a dialog to select a file. The converted files available will be in the MC_DataTool_Output folder.
alt tag

Select an input file.
alt tag

The script will then analyze all spikes across the channels and display the average spikes for review. alt tag

Enter the electrodes you would like to analyze for their QT interval. Press enter to proceed. alt tag

The first row plots the average spikes for the selected channel. The second row plots all spikes for the channel. On the first row, click and drag to select the QT interval. The third row will update to display your selection. alt tag

Press enter to confirm your selection. The average QT interval is displayed in the terminal. If you entered multiple channels, the script will continue to the next channel. alt tag

Conduction Velocity

To run the conduction velocity script, double-click the 'CV_dev.bat' batch file. alt tag

This will open up a dialog to select a file. The converted files available will be in the MC_DataTool_Output folder.
alt tag

Select an input file.
alt tag

The script will then analyze all spikes across the channels and display the average spikes for review. alt tag

In the command line, enter the two channels you want to analyze for conduction velocity and press enter. alt tag

The script will plot the two channels on top of each other in the first row and the stimulation channel(if it exists) in the second row. Click and drag to select a region in which to calculate conduction velocity. The region for the two channels will update in the bottom two rows based on your selection. alt tag

Press enter to confirm your selection and to calculate conduction velocity. The average conduction velocity between the two channels in the region you selected is displayed in the terminal. alt tag

Principle Component Analysis Graphs

To run the PCA script, double-click on 'spike_pca_dev' batch file. alt tag

This will open up a dialog to select a file. The converted files available will be in the MC_DataTool_Output folder.
alt tag

Select an input file.
alt tag

The PCA images are generated and placed in a PCA_Images folder
alt tag

About

The development branch for HSL automation and analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages