https://github.com/barbalab/spycon

https://github.com/barbalab/spycon

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.6%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: barbaLab
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 2.98 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of christiando/spycon
Created about 1 year ago · Last pushed about 1 year ago

https://github.com/barbaLab/spycon/blob/main/

# spycon: A toolbox for benchmarking neuronal connectivity inference ## Introduction Numerous methods have been proposed that attempt to infer neuronal connectivity from parallel recorded spike trains. Here we provide the `spycon` framework, that aims at making a comparable framework among these methods. We provide several connectivity inference algorithms, and a template, such that costum algorithms can be intergrated into `spycon`. `spycon` then provides a unified output of the methods, that methods can be benchmarked on different datasets. For details check out our [PLoS CB paper](https://doi.org/10.1371/journal.pcbi.1011964). [**Quickstart**](#quickstart) | [**Install guide**](#installation) | [**Citing**](#citation) | [**Documentation**](https://christiando.github.io/spycon/) ## Quickstart You can either install `spycon` locally. If you just want to try it out quickly, you can also start and interactive session on [renku](https://renkulab.io/projects/christian.donner/spycon) and directly start coding. Check the [`notebooks`](notebooks) folder for some examples. Here is a simple example, that shows how easy it is to do connectivity inference. ```python from spycon.coninf import Smoothed_CCG times, ids = ... # Load your data as simple 1D numpy arrays spycon_method = Smoothed_CCG() # Initialize your method with default parameters spycon_result = spycon_method.infer_connectivity(times, ids) # Run inference spycon_result.draw_graph() # Draw inferred graph ``` ## Installation Clone the repository into a directory and go into the folder. Just do the following ```bash pip install git+https://github.com/christiando/spycon ``` For code development do ```bash git clone https://github.com/christiando/spycon.git cd spycon/ pip install -r requirements.txt pip install -e . ``` ## Implemented algorithms All the algorithms that are discussed in our paper are implemented in this toolbox. | Method | Abbrevation | Remarks | Reference | |--------------------|-------------|--------------------------------------------------------------------|-----------| | [`CoincidenceIndex`](spycon/coninf/sci_ci.py) | CI | Assess significance of coincidence index via surrogate data | | | [`Smoothed_CCG`](spycon/coninf/sci_sccg.py) | sCCG | Assess significance of peaks of CCG by comparing to smoothed CCG | | | [`directed_STTC`](spycon/coninf/sci_dsttc.py) | dSTTC | Assess signficance of directed STTC via surrogate data | | | [`GLMCC`](spycon/coninf/sci_glmcc.py) | GLMCC | Assess significance of peaks of CCG via parametric GLM fit | | | [`TE_IDTXL`](spycon/coninf/sci_idtxl.py) | TE | Assess significance of transfer entropy via surrogate data | | | [`GLMPP`](spycon/coninf/sci_glmpp.py) | GLMPP | Assess significance of GLM coupling by posterior approximation | | | [`NNEnsmble`](spycon/coninf/sci_ensemble.py) | eANN | Predict (type of) connection based on the outcome of other methods | | __Disclaimer__: `NNEnsemble` is a supervised method. In our paper, we carefully designed training data, that is approximately close to the experimental conditions. If your data varies from this, performance is expected to degrade. Furthermore, each algorithm has different parameters, and depending on your dataset the default one might not be appropriate. Some benchmarking on some surrogate datasets, that resemble the regime of your experimental data will be helpful to assess this. ## Using you own data `spycon` aims at keeping the bar low for using the connectivity algorithms for your data. We voluntarily choose, that it is enough to provide the data in the form of two simple `numpy` arrays, one containing the spike times (in seconds), and one the unit IDs. Note, that this makes the code very simple to use, but gives the user more responsibility of checking, that the data is in appropriately scaled, ordered, etc, compared to more sophisticated data formats. ## Creating your own test `spycon` contains some functionalities to make benchmarking easier on labeled data. If you have spiking data & information about the underlying connectivity, you can create an [`ConnectivityTest`](spycon/spycon_tests.py). On these objects, all implemented connectivity inference methods can be run, and provide you with some performance metrics, for benchmarking and allowing you to decide for the appropriate algorithm. ## Contributing your own algorithm If you want to use other methods than the one implemented look at the [`sci_template.py`](spycon/coninf/sci_template.py) ## Citation If you use the code or data, please cite our paper ``` @article{ensemble24, doi = {10.1371/journal.pcbi.1011964}, author = {Donner, Christian AND Bartram, Julian AND Hornauer, Philipp AND Kim, Taehoon AND Roqueiro, Damian AND Hierlemann, Andreas AND Obozinski, Guillaume AND Schrter, Manuel}, journal = {PLOS Computational Biology}, publisher = {Public Library of Science}, title = {Ensemble learning and ground-truth validation of synaptic connectivity inferred from spike trains}, year = {2024}, month = {04}, volume = {20}, url = {https://doi.org/10.1371/journal.pcbi.1011964}, pages = {1-25}, number = {4}, } ```

Owner

  • Name: barbaLab
  • Login: barbaLab
  • Kind: organization

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1