https://github.com/brody-lab/pulseinputddm.jl

A Julia library for fitting DDMs to pulse-based evidence accumulations task data

https://github.com/brody-lab/pulseinputddm.jl

Science Score: 59.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: science.org
  • Committers with academic emails
    4 of 7 committers (57.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

drift-diffusion-model julialang neuroscience-methods
Last synced: 6 months ago · JSON representation

Repository

A Julia library for fitting DDMs to pulse-based evidence accumulations task data

Basic Info
Statistics
  • Stars: 5
  • Watchers: 6
  • Forks: 3
  • Open Issues: 5
  • Releases: 10
Topics
drift-diffusion-model julialang neuroscience-methods
Created over 6 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

PulseInputDDM.jl — a Julia package for inferring the parameters of drift diffusion models

A Julia package for inferring the parameters of generalized drift diffusion to bound models (DDMs) from neural activity, behavioral data, or both. The codebase was designed with the expectation that data was collected from subjects performing pulse-based evidence accumulation task, as in Brunton et al 2013, but can be adapted for other evidence accumulation tasks.

The package contains a variety of auxillary functions for loading/saving model fits, sampling from fit models (e.g., producing latents, neural activity, or choices from a model with specific parameter settings), and for fitting data to similar/related models.

Written for Julia 1.5.0 and above.

Help

Start a discussion!.

Recommended installation

You need to add the PulseInputDDM package from github by entering the Julia package manager, by typing ]. Then use add to add the package, as follows

julia (@v1.10) pkg > add PulseInputDDM

Another way to add the package in normal Julia mode (i.e., without typing ]) is

julia julia > using Pkg julia > Pkg.add("PulseInputDDM")

Updating the package

When major modifications are made to the code base, you will need to update the package. You can do this in Julia's package manager (]) by typing update.

Getting help

Most functions in this package contain docstrings. To get more details about how any function in this package works, in Julia you can type ? and then the name of the function. Documentation will display in the REPL or notebook.

Fitting the model to choice data only

Because many neuroscientists use matlab, we use the MAT.jl package for IO. Data can be loaded using two conventions. One of these conventions is easier when data is saved within matlab as a .MAT file, and is described below.

The package expects your data to live in a single .mat file which should contain a struct called rawdata. Each element of rawdata should have data for one behavioral trial and rawdata should contain the following fields with the specified structure:

  • rawdata.leftbups: row-vector containing the relative timing, in seconds, of left clicks on an individual trial. 0 seconds is the start of the click stimulus.
  • rawdata.rightbups: row-vector containing the relative timing in seconds (origin at 0 sec) of right clicks on an individual trial. 0 seconds is the start of the click stimulus.
  • rawdata.T: the duration of the trial, in seconds. The beginning of a trial is defined as the start of the click stimulus. The end of a trial is defined based on the behavioral event “cpoke_end”. This was the Hanks convention.
  • rawdata.pokedR: Bool representing the animal choice (1 = right).

The example file located at example_matfile.mat adheres to this convention and can be loaded using the load_choice_data method.

Fitting the model

Once your data is correctly formatted and you have the package added in Julia, you are ready to fit the model. An example tutorial is located in the examples directory. The tutorial illustrates how to use many of the most important methods, such as loading data, saving model fits, and optimizing the model parameters. of each below.

Fitting the model to neural activity

Data format conventions for neural data

See the setting on fitting modesl to choices only for the expected format for .MAT files if one were fitting the choice model. In addition to those fields, for a neural model rawdata should also contain an extra field:

rawdata.spike_times: cell array containing the spike times of each neuron on an individual trial. The cell array will be length of the number of neurons recorded on that trial. Each entry of the cell array is a column vector containing the relative timing of spikes, in seconds. Zero seconds is the start of the click stimulus. Spikes before and after the click inputs should also be included.

The convention for fitting a model with neural model is that each session should have its own .MAT file. (This constrasts with the convention for the choice model, where a single .MAT file can contain data from different session). It's just easier this way, especially if different sessions have different number of cells.

Loading and saving data

Contribution Guidelines

Constructive contributions are welcome.

  • Questions, feedback, bug reports, and proposed features should be submitted as a GitHub issue.
  • Alternatively, contact the repository owner, Brian, via email (depasquale@princeton.edu).
  • For development contributions, please first open an issue describing the proposed development. The resulting discussion may help prevent duplication of efforts. If moving forward with the development, open a pull request with the updated code or new features. Please reference the corresponding issue in the pull request.

Owner

  • Name: Brody-Lab
  • Login: Brody-Lab
  • Kind: organization

GitHub Events

Total
  • Issues event: 1
  • Push event: 1
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 1
  • Push event: 1
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 720
  • Total Committers: 7
  • Avg Commits per committer: 102.857
  • Development Distribution Score (DDS): 0.239
Past Year
  • Commits: 59
  • Committers: 2
  • Avg Commits per committer: 29.5
  • Development Distribution Score (DDS): 0.017
Top Committers
Name Email Commits
Brian DePasquale d****e@p****u 548
Brian DePasquale b****e@i****m 137
Brian DePasquale b****d@s****U 26
thomaszhihaoluo t****o@g****m 4
emilyjanedennis e****s@g****m 3
briandepasquale b****q@s****u 1
Brian D. DePasquale b****d@d****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 3
  • Total pull requests: 42
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 months
  • Total issue authors: 2
  • Total pull request authors: 6
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.14
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 minutes
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • briandepasquale (2)
  • dikshagup (1)
Pull Request Authors
  • briandepasquale (47)
  • dikshagup (2)
  • boydmeredith (2)
  • thomaszhihaoluo (2)
  • emilyjanedennis (1)
  • timkimd (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
juliahub.com: PulseInputDDM

A Julia library for fitting DDMs to pulse-based evidence accumulations task data

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 3.2%
Forks count: 10.6%
Dependent packages count: 16.3%
Average: 16.8%
Stargazers count: 37.0%
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia v1 composite