Skip to main content

Fast algorithm for deconvolution of neural calcium imaging traces

Project description

CI

OASIS: Fast online deconvolution of calcium imaging data

Tools for extracting the neural activity from fluorescence calcium imaging data  

The code can be readily run on neural temporal fluorescence calcium imaging data. Please have a look at the demo.

Requirements

The scripts were tested on Linux and MacOS (some users successfully used Windows too) with a typical numerical/scientific Python 2.7 or 3.5-3.13 installation that included the following

  • python >= 2.7.11
  • matplotlib >= 1.5.1
  • numpy >= 1.10.2
  • scipy >= 0.16.1
  • cython >= 0.23.4

Optionally, because not necessary for running our fast method on your own data, we further installed the following to perform the comparison with interior point methods

Installation

Package based

The easiest way to install OASIS is using either pip:

pip install oasis-deconv

or if you are using conda (or mamba):

conda install -c conda-forge oasis-deconv

However, you won't have the examples provided in the GitHub repo.

Compile from source

Alternatively you can clone the repo

git clone git@github.com:j-friedrich/OASIS.git
cd OASIS

and install the requirements either using pip:
pip install -r requirements.txt
or if you are using conda (or mamba):
conda install --file requirements.txt (or mamba install --file requirements.txt)

For faster execution some functions have been written in Cython and need to be compiled by running:
python setup.py build_ext --inplace
(Ignore the warnings that Cython is using a deprecated Numpy API. Following the cython online docs, for the time being, it is just a warning that you can ignore.)
(If the compilation fails on Windows, see Srikanth's gist.)

To clean up temporary files follow it by:
python setup.py clean --all

Examples

The scripts to produce the figures and table are in the subfolder 'examples' with names obvious from the PLoS Comput Biol paper. They can be run with ipython examples/fig[1-6].py.

The results of fig4 and table1 will be even better than in the paper, because the version in the master branch includes later improvements, in particularly up to an order of magnitude less computing time. The specific points in history marking the time of the publications have been tagged.

To demonstrate how to use the methods on your own data, we included a demo jupyter notebook in the subfolder 'examples' as well.

Other implementations

Related packages

In order to deal not just with temporal, but with raw spatio-temporal fluorescence data, we added OASIS also to CaImAn, the computational toolbox for large scale Calcium Imaging Analysis.

References

The code accompanies a short NIPS paper and an extended journal version with full details. If you use our code in your research, please cite one of them:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oasis_deconv-0.2.1.tar.gz (286.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

oasis_deconv-0.2.1-cp313-cp313-macosx_11_0_arm64.whl (242.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oasis_deconv-0.2.1-cp312-cp312-macosx_11_0_arm64.whl (243.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oasis_deconv-0.2.1-cp311-cp311-macosx_11_0_arm64.whl (248.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oasis_deconv-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (248.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

oasis_deconv-0.2.1-cp39-cp39-macosx_11_0_arm64.whl (249.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

oasis_deconv-0.2.1-cp38-cp38-macosx_11_0_arm64.whl (252.0 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file oasis_deconv-0.2.1.tar.gz.

File metadata

  • Download URL: oasis_deconv-0.2.1.tar.gz
  • Upload date:
  • Size: 286.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for oasis_deconv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6d9a9867f167d4ad49f3799474d6db7551eff6419928589d1d82eeded0e2b024
MD5 fa3c2021ffe2efc164b61feeec3562ba
BLAKE2b-256 fb34ce29bb9a1b330505be783d8496cba45ce115e0467d4b62e007a22644d0ee

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 157d469da8664b66685b07bf0729017845c9459a353866d20c870ddd8dbcf32d
MD5 1cd69da38d818b28622d4d6565e1fca9
BLAKE2b-256 07b05822b8544a159982307722a60f6a7d67b83dc475521b9c4c45cc947f400c

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9456318c41e93f1bf392d0c75e47134f659c9a2c123cab3b1ce0f6efe7b4bc9
MD5 b51b70661671e723777c410227d9611e
BLAKE2b-256 d8788c5df7080882dd192505f0bc7952072c531327b742d314fcf1e488b632c9

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4bc15b1f3512b48f91ff37bc542cb4b70aa1ef39d6c05c833e172d14a695833c
MD5 38ceff2535debc96aca846622f930359
BLAKE2b-256 280134011e73ba24391f1e44956844d28fec175bb7ab78faab9c2e7db65822ef

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 586886b41a9d0a7006e83dbc508a18837c00e47f0615958578eb0b4de55662b8
MD5 2c221556823ddc31aeb4ed30441c3005
BLAKE2b-256 b5126650b6cfa2c46d2e7be8bb36a5b40696c189bd67405bdc1925e2f016d59a

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27e92f35b79c675dac666b41e1a7c7e6b78e38018e216eb17e8de07ae7599abf
MD5 dee82d8f6d63288a7c221ef9b162fa41
BLAKE2b-256 f6f4bd5193a889c50a5f71aa413c133373a541179501f5d3b30d06297ded47a1

See more details on using hashes here.

File details

Details for the file oasis_deconv-0.2.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oasis_deconv-0.2.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3849c3ef9a2ad094956527f315bbb3acb8752a79f7153b93bde95e77018b096f
MD5 16fd8dda9c89367ef276557316370dab
BLAKE2b-256 f94a81a615ad162ecd8b7a42564807053f010ed0b54fcba99bf273cfa01f60f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page