aba

Contents

ABA

1
This class augments the functionality of
2
BrainGlobeAtlas with methods specific to the Allen
3
Mouse Brain atlas and necessary to populate scenes in
4
brainrender. These include stuff like fetching streamlines
5
and neuronal morphology data.
Copied!

__init__ [#46]

Check the source code online
1
def __init__(self):
Copied!
  docstring:
no docstring

get_neurons [#76]

Check the source code online
1
def get_neurons(self, neurons, color=None, display_axon=True,
2
display_dendrites=True, alpha=1, neurite_radius=None,
3
soma_radius=None, use_cache=True):
Copied!
  docstring:
1
Gets rendered morphological data of neurons reconstructions downloaded
2
from the
3
4
Mouse Light project at Janelia (or other sources).
5
6
Accepts neurons argument as:
7
8
- file(s) with morphological data
9
10
- vedo mesh actor(s) of entire neurons reconstructions
11
12
- dictionary or list of dictionary with actors for different neuron
13
parts
14
15
:param neurons: str, list, dict. File(s) with neurons data or list of
16
rendered neurons.
17
18
:param display_axon, display_dendrites: if set to False the
19
corresponding neurite is not rendered
20
21
:param color: default None. Can be:
22
23
- None: each neuron is given a random color
24
25
- color: rbg, hex etc. If a single color is passed all neurons will
26
have that color
27
28
- cmap: str with name of a colormap: neurons are colored based on
29
their sequential order and cmap
30
31
- dict: a dictionary specifying a color for soma, dendrites and axon
32
actors, will be the same for all neurons
33
34
- list: a list of length = number of neurons with either a single
35
color for each neuron
36
37
or a dictionary of colors for each neuron
38
39
:param alpha: float in range 0,1. Neurons transparency
40
41
:param neurite_radius: float > 0 , radius of tube actor representing
42
neurites
43
44
:param use_cache: bool, if True a cache is used to avoid having to
45
crate a neuron's mesh anew, otherwise a new mesh is created
Copied!

get_tractography [#204]

Check the source code online
1
def get_tractography(self, tractography, color=None,
2
color_by='manual', others_alpha=1, verbose=True, VIP_regions=[],
3
VIP_color=None, others_color='white', include_all_inj_regions=False,
4
display_injection_volume=True):
Copied!
  docstring:
1
Renders tractography data and adds it to the scene. A subset of
2
tractography data can receive special treatment using the with VIP
3
regions argument:
4
5
if the injection site for the tractography data is in a VIP regions,
6
this is colored differently.
7
8
:param tractography: list of dictionaries with tractography data
9
10
:param color: color of rendered tractography data
11
12
:param color_by: str, specifies which criteria to use to color the
13
tractography (Default value = "manual")
14
15
options:
16
17
- manual, define color of each tract
18
19
- target_region, color by the injected region
20
21
:param others_alpha: float (Default value = 1)
22
23
:param verbose: bool (Default value = True)
24
25
:param VIP_regions: list of brain regions with VIP treatement (Default
26
value = [])
27
28
:param VIP_color: str, color to use for VIP data (Default value =
29
None)
30
31
:param others_color: str, color for not VIP data (Default value =
32
"white")
33
34
:param include_all_inj_regions: bool (Default value = False)
35
36
:param display_injection_volume: float, if True a spehere is added to
37
display the injection coordinates and volume (Default value = True)
Copied!

get_streamlines [#334]

Check the source code online
1
def get_streamlines(self, sl_file, color=None, *args, **kwargs):
Copied!
  docstring:
1
Render streamline data downloaded from
2
https://neuroinformatics.nl/HBP/allen-connectivity-viewer/streamline-
3
downloader.html
4
5
:param sl_file: path to JSON file with streamliens data [or list of
6
files]
7
8
:param color: either a single color or a list of colors to color each
9
streamline individually
10
11
:param *args:
12
13
:param **kwargs:
Copied!

get_projection_tracts_to_target [#387]

Check the source code online
1
def get_projection_tracts_to_target(self, p0=None, **kwargs):
Copied!
  docstring:
1
Gets tractography data for all experiments whose projections reach the
2
brain region or location of iterest.
3
4
:param p0: list of 3 floats with XYZ coordinates of point to be used
5
as seed (Default value = None)
6
7
:param **kwargs:
Copied!

download_streamlines_for_region [#415]

Check the source code online
1
def download_streamlines_for_region(self, region, *args, **kwargs):
Copied!
  docstring:
1
Using the Allen Mouse Connectivity data and corresponding API, this
2
function finds expeirments whose injections
3
4
were targeted to the region of interest and downloads the
5
corresponding streamlines data. By default, experiements
6
7
are selected for only WT mice and onl when the region was the primary
8
injection target. Look at "ABA.experiments_source_search"
9
10
to see how to change this behaviour.
11
12
:param region: str with region to use for research
13
14
:param *args: arguments for ABA.experiments_source_search
15
16
:param **kwargs: arguments for ABA.experiments_source_search
Copied!

download_streamlines_to_region [#440]

Check the source code online
1
def download_streamlines_to_region(self, p0, *args, mouse_line='wt',
2
**kwargs):
Copied!
  docstring:
1
Using the Allen Mouse Connectivity data and corresponding API, this
2
function finds injection experiments
3
4
which resulted in fluorescence being found in the target point, then
5
downloads the streamlines data.
6
7
:param p0: list of floats with XYZ coordinates
8
9
:param mouse_line: str with name of the mouse line to use(Default
10
value = "wt")
11
12
:param *args:
13
14
:param **kwargs:
Copied!
Last modified 1yr ago