Neural Event Reconstruction and Detection via Sparsity
version 0.1
- this is first repository of NERDS (published on Nov 13, 2014)
- [Dyer, E.L.; Studer, C.; Robinson, J.T.; Baraniuk, R.G., "A robust and efficient method to recover neural events from noisy and corrupted data," Neural Engineering (NER), 6th International IEEE/EMBS Conference, pp.593-596, 2013] (http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6696004)
Matlab package implementing blind deconvolution method for neural spike recovery from calcium signal
- Matlab version >= 2007
- SPGL1 (Solver for large-scale sparse reconstruction) see also at git link (note that we did not include
SPGL1
in NERDS project) so make sure that you installSPGL1
and include in MATLAB path.
In order to download NERDS folder, either download zip file
from git repository directly or use git
to clone
repository to particular directory that we want
git clone https://github.com/KordingLab/nerds
Also install SPGL1
, run spgsetup.m
, and then add to MATLAB path. After that, hover to the folder and run setup_nerds.m
code in order to include path.
You can run NERDS algorithm by using the function compute_nerds
in main folder
[gen_atom_out, spike_idx, x_hat_out, e_hat_out] = compute_nerds(y, opts)
where input has 2 arguments
y
is 1-D fluorescent/ calcium signal (either row or column format)opts
is matlab structure contains parameters described in MATLAB code (if not specify, it will assign default parameters)opts.numTrials
- number of iteration, defaultnumTrials = 10
opts.L
- length of template that we want to estimate, defaultask user
opts.thresh
- thresholding parameter, defaultthresh = 0.1
i.e. we thershold spikes whose amplitude less than 10 % from range of recovered spikesopts.wsize
- window size where we apply summation of spikes (peak_sum
) in order to remove small group of low magnitude splikes output from algorithmopts.verbose
- verbose parameter for SPGL1, defaultverbose = false
and output has 4 arguments
gen_atom_out
is estimated template where each column contains estimated template of each iterationspike_idx
is cell that contain index that spikes occurx_hat_out
is matrix where each column contains estimated spikes train produced in each iteration (we'll fix amplitude problem soon)e_hat_out
is matrix contains DCT coefficient which can transform back to base-line drift in calcium signal
opts.L
is estimated length of template (called gen_atom
) where you can estimate the length by the following figure:
See example_synth.m
file for an example from the paper where we show that solving Non-Negative Basis Pursuit hold a promising result of estimating . And example_nerds.m
that we apply NERDS algorithm
to real data.
For synthetic example, you can follow the code which will produce result graphs as follow. Note that post-processing, we use some thresholding after compute spikes train and summing close peak together:
#### Plot estimated spikes and synthetic data #### Plot result of NERDS applying on real data- The calcium and electrophysiology data included in
example_real_data.mat
was collected in Jason MacLean's Lab at the University of Chicago. Check out the following two papers: Runfeldt et. al. and Sadovsky AJ et. al. for more details regarding the experimental methods utilized to acquire these simultaneous recordings.
- The MIT License (MIT) Copyright (c) 2014 Eva Dyer, Christoph Studer and Titipat Achakulvisut