genepy3d.io package¶
Submodules¶
genepy3d.io.base module¶
genepy3d.io.catmaid module¶
- class genepy3d.io.catmaid.Catmaid(dfneu, dfcon=None)[source]¶
Bases:
objectSupport reading neuron data from catmaid.
- dfneu¶
neuron table.
- Type
pandas dataframe
- dfcon¶
connector table.
- Type
pandas dataframe
- classmethod from_csv(neuronfile, confile=None)[source]¶
Support reading neuron data from catmaid csv files.
- Parameters
neuronfile (str) – path to neuron csv file.
confile (str) – path to connector csv file.
- classmethod from_server(host, token, project_id, neuron_id=None)[source]¶
Support reading neuron data from catmaid server.
- Parameters
host (str) – catmaid host address.
token (str) – authentication token.
project_id (int) – project ID.
neuron_id (int|list of int) – list of neuron IDs.
- get_innervation_relation(nb_innervations=1)[source]¶
Return neurons filtered by innervation relation.
Innervation: a neuron receives signals from one (mono) or many (multi) other neurons via its presynaptic gates. We assume innervated neuron as postsynaptic neuron, the ones who make innervation are presynaptic neurons.
- Parameters
nb_innervations (int) – number innervated presynaptic neurons.
- Returns
dictionary whose key is postsynaptic neuron, value is innervating presynaptic neurons.
- get_neuron_id(neuron_name=None)[source]¶
Return neuron IDs from neuron names.
- Parameters
neuron_name (str | array of str) – list of neuron names.
- Returns
pandas Series whose index is name and value is ID.
- static get_neuron_id_from_server(host, token, project_id)[source]¶
Return list of neuron IDs from given project ID.
- Parameters
project_id (int) – project ID.
- Returns
array of int.
- get_neuron_name(neuron_id=None)[source]¶
Return neuron names from neuron IDs.
- Parameters
neuron_id (int | array of int) – list of neuron names.
- Returns
pandas Series whose index is ID and value is name.
- get_neurons(neuron_id=None, scales=(1.0, 1.0, 1.0))[source]¶
Return neuron data of a given list of neuron IDs.
- Parameters
neuron_id (int | array of int) – list of neuron IDs.
scales (tuple (float)) – define x, y, z scales
- Returns
list of neurons (tree.Tree)
- get_synaptic_relation(relation_id='presynaptic_to', nb_connectors=1)[source]¶
Return neurons and corresponding treenodes filtered by their synaptic relations.
A neuron can have multiple presynaptic gates (for receiving signals from others neurons), and only one postsynaptic gate (for sending signal).
- Parameters
relation_id (str) – presynaptic_to or postsynaptic_to.
nb_connectors (uint) – number of connectors.
- Returns
dictionary whose keys are neuron_id, values are treenode_ids.