Functional connectivity atlas for the C. elegans brain
Author: Francesco Randi [email protected]
-
Install from GitHub
python -m pip install git+https://github.com/leiferlab/worm-functional-connectivity
-
The main class in the python module is
FunctionalAtlas
.-
Use the
FunctionalAtlas.from_file()
method to load a pickled instance from file. -
There are docstrings and comments for documentation.
-
The class has two main methods:
-
get_standard_stimulus()
to generate one of the standard stimuli from the parameters chosen by the user. -
get_responses()
that returns the responses that need to be plotted. The methodget_responses()
expects a stimulus (e.g. generated byget_standard_stimulus()
) and either a list of neuron IDs whose response the user wants to plot, or a threshold to ask for all the responses above that threshold. See the docstring for any temporary behavior for this mock atlas.
-
-
export_atlas_scalar
- Export a scalar version of a functional connectivity matrix stored inatlas/
.
usage: export_atlas_scalar [-h] [--mode MODE]
[--amplitude-threshold THRESHOLD]
[--matrix-output FILE] [--pairwise-output FILE]
[-p] [-v] [--version] [--atlas ATLAS]
Given an atlas (in ../atlas), return a scalar version of the functional
connectivity matrix (amplitude, timescales, or other)
optional arguments:
-h, --help show this help message and exit
--mode MODE Type of scalar quantity to extract from functional
connectivity. Can be amplitude or timescales. (default:
amplitude)
--amplitude-threshold THRESHOLD
Amplitude values below the threshold will be set to zero.
(default: 0.0)
--matrix-output FILE Save the matrix to a tab delimited file (default: NONE)
--pairwise-output FILE
Save the matrix with one line per neuron pair in a tab
delimited file (default: None)
-p, --show-plot Plot output (default: False)
-v, --verbose increase output verbosity (default: False)
--version show program's version number and exit
--atlas ATLAS Which atlas to export (must be in ../atlas).
Choices are: wild-type, unc-31, or mock (default:
wild-type)
As an alternative to the commandline, params can be placed in a file, one per
line, and specified on the commandline like 'export_atlas_scalar @params.conf'.
-
scripts/generate_mock_atlas.py
- Example showing how to generate a mock functional connectivity atlas. -
scripts/use_mock_atlas.py
- Example of how to generate a stimulus usingFunctionalAtlas.get_standard_stimulus()
and then provide that stimulus toFunctionAtlas.get_responses()
to get the neuronal responses to that stiumuls.