Inferring monosynaptic connections in neural circuits.
Project description
Overview
SynaptiConn is a python package for inferring monosynaptic connections from single-unit spike-train data.
The package provides a set of tools for analyzing spike-train data, including spike-train cross-correlation analysis, and for inferring monosynaptic connections using a model-based approach. The package is designed to be user-friendly and flexible, and can be used to analyze spike-train data from a variety of experimental paradigms.
Monosynaptic connections, both excitatory and inhibitory connections, are determined with a model-based approach that fits a set of connection features to the observed spike-train cross-correlation. The package can determine the most likely set of connections that underlie the observed cross-correlation. The package also provides a set of tools for visualizing the data and model fits, and for exporting the connection features.
In future versions, the package will include additional tools for analyzing spike-train data, and for inferring connections from other types of data, using a variety of models.
Please Star the project to support us and Watch to always stay up-to-date!
Installation
To install the stable version of SynaptiConn, you can use pip:
SynaptiConn (stable version)
pip install synapticonn
The development version of SynaptiConn can be installed by cloning the repository and installing using pip:
Development version
To get the current development version, first clone this repository:
git clone https://github.com/mzabolocki/SynaptiConn
To install this cloned copy, move into the directory you just cloned, and run:
$ pip install .
Editable Version
To install an editable version, download the development version as above, and run:
$ pip install -e .
Documentation
The ‘synapticonn’ package includes a full set of code documentation.
To see the documentation for the candidate release, see here.
Dependencies
synapticonn is written in Python, and requires Python >= 3.8 to run.
It requires the following dependencies:
scipy >= 0.19
matplotlib is needed to visualize data and model fits
pandas is needed for exporting connection features to dataframes
joblib is needed for parallel processing
openpyxl is needed for exporting connection features to excel files
We recommend using the Anaconda distribution to manage these requirements.
Quick start
The module is object orientated, and the main class is SynaptiConn, which is used to analyze spike-train data and infer monosynaptic connections.
An example how to use the package is shown below:
# import the model object
from synapticonn import SynaptiConn
# initialize the model object
snc = SynaptiConn(spike_times,
method="cross-correlation",
time_unit="ms",
srate=30_000,
recording_length_t=600*1000,
bin_size_t=1,
max_lag_t=10)
# set the spike unit ids to be used for the analysis
spike_pairs = [(0, 6), (0, 7), (0, 8), (0, 9)]
# fit the model and report the monosynaptic connection results
snc.report(spike_pairs)
Define the settings
The SynaptiConn object is initialized with the following settings:
- spike_timesdict
A dictionary of spike times for each neuron, where the keys are the neuron IDs, and the values are arrays of spike times.
- methodstr
The method to use for inferring connections. Currently, only ‘cross-correlation’ is supported. This will be expanded in future versions.
- time_unitstr
The time unit of the spike times. Currently, only ‘ms’ is supported. This will be expanded in future versions.
- sratefloat
The sampling rate of the spike times, in Hz.
- recording_length_tfloat
The length of the recording, in the same time unit as the spike times.
- bin_size_tfloat
The size of the bins to use for the cross-correlation analysis, in the same time unit as the spike times.
- max_lag_tfloat
The maximum lag to use for the cross-correlation analysis, in the same time unit as the spike times.
Note that a full set of examples and tutorials are provided in the documentation. These provide a more detailed overview of how to use the package, and how to interpret the results.
Documentation will be maintained and updated regularly, and we welcome feedback and suggestions for improvements.
Spike-train data
SynaptiConn is designed to work with spike-train data, which can be provided in the form of a dict of spike times for each neuron. These are to be organised as a dictionary, where the keys are the neuron IDs, and the values are arrays of spike times.
It is recommended to use the SpikeInterface package to process, load and organize spike-train data. All spike-units should be subject to appropriate spike-sorting procedures before being analyzed with SynaptiConn. This includes removing noise and artifacts, and ensuring that the spike times are accurate. For further information, please see the quality control metric outline from Allen Brain documentation.
If unsure of the data quality, SynaptiConn has simple quality control checks built in, which can be used to filter out poor quality data.
In future versions, we plan to include additional spike-time data types, such as NWB files, and other file formats. Further, we plan to include additional spike-time data loaders, to make it easier to load and organize spike-time data, along with additional quality control checks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapticonn-0.0.1rc4.tar.gz.
File metadata
- Download URL: synapticonn-0.0.1rc4.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9a8d1ceed28e9ef6c818d16ad1e7f2b982b4ae8f8b4a08c0a6621541dbdfc3e
|
|
| MD5 |
e6277f6f85f67027c052ad89a7512f7c
|
|
| BLAKE2b-256 |
3342221845a89dce2dd72044d9d960bd7d10fd43ae1f75cb9ff6171e73f04ba7
|
File details
Details for the file synapticonn-0.0.1rc4-py2.py3-none-any.whl.
File metadata
- Download URL: synapticonn-0.0.1rc4-py2.py3-none-any.whl
- Upload date:
- Size: 53.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb56d5dee4eb5d4762819e3f1d1ac4fbacd0c62e72aea198a65460a9755f118b
|
|
| MD5 |
d4979f90022a1b1698878d59d1ea5d99
|
|
| BLAKE2b-256 |
61c5780a6c65ea0834e6f1606ba4a4d44a0318ec2154d928e4313463ec93c979
|