Skip to content

JRC-COMBINE/SSFAAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spike-by-Spike Frequency Analysis of Amperometry Traces (SSFAAT)

SSFAAT is a software package implemented in Python for frequency analysis of amperometric traces generated through for example, Vesicle Impact Electrochemical Cytometry (VIEC) or Single-cell amperometry (SCA) experiments. Amperometry methods are frequently used for studying exocytosis processses. Analyzing the statistics of amperometric spikes may help discovering new exocytosis mechanisms with respect to different cell types, different stimulations and different micro-electrodes that is used during an amperometry experiment. Fourier Transform is a well-established method that is commonly used to find frequency components of signal buried in noise. SSFFAAT provides statistical validation in frequency domain for spike charactersitics observations made in the time-domain.

Why should I use SSFAAT?

The state-of-the-art analysis tool in the Amperometry community varies from group to group, thereby making it difficult to compare observations from different sources. Moreover, most of these tools analyze the amperometric signals in the time-domain only. However, the exocytosis process, and the so-generated amperometric traces are dynamic in nature. Such signals with time-variant properties may occur at different frequencies and it may be difficult to catch subtle differences in their patterns by only using time-domain observations. SSFAAT provides a novel solution by analyzing the signal in the frequency domain using the time-invariant and frequency-selective FFT.

Furthermore, traditional analysis softwares require manual interventions and tuning. For instance, the user needs to manually mark the baseline interval, set the threshold, select a filtering cut-off frequency, and most importantly, each spike train needs to be handled seperately. In contrast, SSFAAT is fully automated package where the user can extract spike features of all time series from a directory by a single function call. SSFAAT provides an efficient, flexible and provides systematic and consistent solution to the amperometric community.

How do I use SSFAAT?

Arguments
num_categories Number of categories/labels to analyze.
category_list Each entry corresponds to one class name. The list should have the same size as num_categories.
raw_path_list Each entry specifies the storing path to the raw data of the corresponding class
target_path_list Each entry points to the storing location of the output excel file
f_samp Sampling frequency of raw data
thrs Threshold for peak detection (distance from baseline measure in mA), default is set to 80
smooth_coefficient The smoothing coefficient for Butterworth filter, default is set to 0.004
filter_order The order of Butterworth filter, default is set to 5
MAX_HALF_WIDTH The estimated maximum spike half width length, default is set to int(0.2*f_samp)
exclusion_list A list that contains name of anomalous files
output_path Output path where figures generated upon analysis are stored

A visual inspection of the raw data before using SSFAAT would be very useful. Some amperometric traces might contain artifacts, for example:

  • Signal jumps at the beginning of recording (maybe due to poor alighment of measuring instruments)
  • Spike clustering where some time intervals densely filled with hundreds or thousands of spikes.

Our recommendation of the anomalies:

  • Chunk out the beginning part of the signal if they are anomalous
  • Remove the files with type-2 artifacts (or) mark the interval of such cluster regions in the program, in order to ignore all the clustered peaks.

To run the scripts:

  1. Remove anomalies: You can call `visualization.py` to visually inspect the spike trains.
  2. Call `automator.py`: This automatically extracts spikes and their corresponding characteristics for all categories. This script returns excel spreadsheets that collect the spike features, one spread sheet per category.
  3. Call `main.py`: This script evaluate the mean frequency of each individual spike. Two plots would be generated as outputs: 1. plot of mean frequency distributions for each category; 2. bar plot visualizing the mean of median of mean frequencies with error bars.

Examples

The configurations for analyzing "Hofmeister Series Dataset" presented in our paper can be found in the following table:

Arguments
num_categories 5
category_list ['Cl-','Br-','NO3-','ClO4-','SCN-']
raw_path_list ['./data/raw/2020_04_15_ions_datasets/Cl-/', './data/raw/2020_04_15_ions_datasets/Br-/','./data/raw/2020_04_15_ions_datasets/NO3-/', './data/raw/2020_04_15_ions_datasets/ClO4-/', './data/raw/2020_04_15_ions_datasets/SCN-/']
target_path_list ['./data/interim/Cl-.xlsx', './data/interim/Br-.xlsx','./data/interim/NO3-.xlsx', './data/interim/ClO4-.xlsx', './data/interim/SCN-.xlsx']
f_samp 10000
thrs 80
smooth_coefficient 0.004
filter_order 5
MAX_HALF_WIDTH 2000
exclusion_list ['2019_08_06_0158.txt','2019_06_19_0002.txt','2019_06_19_0033.txt','2019_06_19_0039.txt','2019_06_19_0036.txt','2019_06_19_0041.txt','2019_06_19_0040.txt','2019_08_06_0124.txt','2019_06_19_0073.txt', '2019_07_23_0120.txt', '2019_06_19_0079.txt', '2019_06_19_0095.txt']
output_path ./output/

OS Compatibility

The SSFAAT package is OS-independent. A fully functioning Python environment is sufficient to use this package. In case you run into incompatibility issues, please check the dependency list below.

Dependencies

Installation Instructions

  1. Clone the repository to your local machine or the cluster using git clone
  2. Install dependency packages as necessary

License

This is an open source software and is licensed under LGPL.

Getting help

For queries regarding the software write to: [email protected]/ [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages