Git Product home page Git Product logo

nerds's Introduction

NERDS

Neural Event Reconstruction and Detection via Sparsity

version 0.1 - this is first repository of NERDS (published on Nov 13, 2014)

Related Publication

Description

Matlab package implementing blind deconvolution method for neural spike recovery from calcium signal

Requirements

  • 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 install SPGL1 and include in MATLAB path.

Installation

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.

Usage

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, default numTrials = 10
    • opts.L - length of template that we want to estimate, default ask user
    • opts.thresh - thresholding parameter, default thresh = 0.1 i.e. we thershold spikes whose amplitude less than 10 % from range of recovered spikes
    • opts.wsize - window size where we apply summation of spikes (peak_sum) in order to remove small group of low magnitude splikes output from algorithm
    • opts.verbose - verbose parameter for SPGL1, default verbose = false

and output has 4 arguments

  • gen_atom_out is estimated template where each column contains estimated template of each iteration
  • spike_idx is cell that contain index that spikes occur
  • x_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:

Example Code

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 of baseline drift, reconstruct spikes and synthetic data

#### Plot estimated spikes and synthetic data

#### Plot result of NERDS applying on real data

Team members

Acknowledgement

  • 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.

License

  • The MIT License (MIT) Copyright (c) 2014 Eva Dyer, Christoph Studer and Titipat Achakulvisut

nerds's People

Contributors

dylanmuir avatar evadyer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.