celegans

Contents

Celegans

__init__ [#62]

Check the source code online
1
def __init__(self, data_folder=None, base_dir=None, **kwargs):
Copied!
  docstring:
1
This class handles loading and parsing neuroanatomical data for the C.
2
elegans connectome from
3
4
https://www.biorxiv.org/content/10.1101/2020.04.30.066209v1
5
6
:param base_dir: path to directory to use for saving data (default
7
value None)
8
9
:param kwargs: can be used to pass path to individual data folders.
10
See brainrender/Utils/paths_manager.py
11
12
:param data_folder: str, path to a folder with data for the connectome
13
# TODO replace with downloading data
Copied!

_make_root [#84]

Check the source code online
1
def _make_root(self, rootpath):
Copied!
  docstring:
1
Creates a root mesh by merging the mesh corresponding to each neuron,
2
3
then saves it as an obj file at rootpath
Copied!

get_neurons_by [#119]

Check the source code online
1
def get_neurons_by(self, getby='pair', lookup=None):
Copied!
  docstring:
1
Selects a subset of the neurons using some criteria and lookup key,
2
3
based on the neurons metadata
4
5
:param getby: str, name of the metadata key to use for selecting
6
neurons
7
8
:param lookup: str/int.. neurons whose attribute 'getby' matches the
9
lookup value will be selected
10
11
:returns: list of strings with neurons names
Copied!

get_neuron_color [#151]

Check the source code online
1
def get_neuron_color(self, neuron, colorby='type'):
Copied!
  docstring:
1
Get a neuron's RGB color. Colors can be assigned based on different
2
criteria
3
4
like the neuron's type or by individual neuron etc...
5
6
:param neuron: str, nueron name
7
8
:param colorby: str, metadata attribute to use for coloring
9
10
:returns: rgb values of color
Copied!

_get_data [#186]

Check the source code online
1
def _get_data(self):
Copied!
  docstring:
1
Loads data and metadata for the C. elegans connectome.
Copied!

_check_neuron_argument [#249]

Check the source code online
1
def _check_neuron_argument(self, neurons):
Copied!
  docstring:
1
Checks if a list of string includes neurons name, returns only
2
3
elements of the list that are correct names
4
5
:param neurons: list of strings with neurons names
Copied!

_parse_neuron_skeleton [#272]

Check the source code online
1
def _parse_neuron_skeleton(self, neuron):
Copied!
  docstring:
1
Parses a neuron's skeleton information from skeleton .json file
2
3
to create a vtk actor that represents the neuron
4
5
:param neuron: str, neuron name
Copied!

_get_structure_mesh [#308]

Check the source code online
1
def _get_structure_mesh(self, acronym, **kwargs):
Copied!
  docstring:
1
Get's the mesh for a brainregion, for this atlas it's just for
2
3
getting/making the root mesh
Copied!

get_neurons [#329]

Check the source code online
1
def get_neurons(self, neurons, alpha=1, as_skeleton=False,
2
colorby='type'):
Copied!
  docstring:
1
Renders neurons and adds returns to the scene.
2
3
:param neurons: list of names of neurons
4
5
:param alpha: float in range 0,1 - neurons transparency
6
7
:param as_skeleton: bool (Default value = False), if True neurons are
8
rendered as skeletons
9
10
otherwise as a full mesh showing the whole morphology
11
12
:param colorby: str, criteria to use to color the neurons. Accepts
13
values like type, individual etc.
Copied!

get_neurons_synapses [#371]

Check the source code online
1
def get_neurons_synapses(self, scene_store, neurons, alpha=1,
2
pre=False, post=False, colorby='synapse_type', draw_patches=False,
3
draw_arrows=True):
Copied!
  docstring:
1
THIS METHODS GETS CALLED BY SCENE, self referes to the instance of
2
Scene not to this class.
3
4
Renders neurons and adds them to the scene.
5
6
:param neurons: list of names of neurons
7
8
:param alpha: float in range 0,1 - neurons transparency
9
10
:param pre: bool, if True the presynaptic sites of each neuron are
11
rendered
12
13
:param post: bool, if True the postsynaptic sites on each neuron are
14
rendered
15
16
:param colorby: str, criteria to use to color the neurons.
17
18
Accepts values like synapse_type, type, individual etc.
19
20
:param draw_patches: bool, default True. If true dark patches are used
21
to show the location of post synapses
22
23
:param draw_arrows: bool, default True. If true arrows are used to
24
show the location of post synapses
Copied!

dist [#518]

Check the source code online
1
def dist(p1, p2):
Copied!
  docstring:
no docstring

get_point [#525]

Check the source code online
1
def get_point(p1, p2, d, u):
Copied!
  docstring:
no docstring
Last modified 1yr ago