Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

project status version build status docs status license python versions downloads

SynaptiConn

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:

  • numpy

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

Metadata

Release files for synapticonn 0.0.1rc4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synapticonn 0.0.1rc4
File Size Uploaded
synapticonn-0.0.1rc4.tar.gz 42.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for synapticonn 0.0.1rc4
File Interpreter ABI Platform
synapticonn-0.0.1rc4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 95.8 kB

Release files / synapticonn-0.0.1rc4.tar.gz

Download URL synapticonn-0.0.1rc4.tar.gz
Size 42.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d9a8d1ceed28e9ef6c818d16ad1e7f2b982b4ae8f8b4a08c0a6621541dbdfc3e
BLAKE2b-256 checksum
How to use checksums
3342221845a89dce2dd72044d9d960bd7d10fd43ae1f75cb9ff6171e73f04ba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Release files / synapticonn-0.0.1rc4-py2.py3-none-any.whl

Download URL synapticonn-0.0.1rc4-py2.py3-none-any.whl
Size 53.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
eb56d5dee4eb5d4762819e3f1d1ac4fbacd0c62e72aea198a65460a9755f118b
BLAKE2b-256 checksum
How to use checksums
61c5780a6c65ea0834e6f1606ba4a4d44a0318ec2154d928e4313463ec93c979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page