Note
Click here to download the full example code
Insect Brain DB#
In this example we will show you how to fetch data from the Insect Brain DB.
The insect brain database (https://insectbraindb.org) is an online repository for neuron morphologies, brain regions and experimental data across various insect species. At the time of writing Insect Brain DB features close to 400 neuronal cell types from well over 30 insect species. Check out Heinze et al. (2021) for details!
While the website features a comprehensive search and some nifty analyses, it can be useful to download these data to run your own analyses or compare to other data sets. For that purpose, NAVis provides an interface to Insect Brain DB that wraps parts of their API:
Import navis
import navis
# Import the actual Insect Brain DB interface
import navis.interfaces.insectbrain_db as ibdb
Fetching meta data#
First, fetch a list of available species:
species = ibdb.get_available_species()
species.head()
Fetch info for a given species (you can use the scientific or common name, or an ID):
spec_info = ibdb.get_species_info('Schistocerca gregaria')
spec_info
Out:
id 9
uuid 795f4fd5-cad7-4de0-853f-89406a64aa98
images [{'id': 925, 'tag': 'SPECIES_IMAGE', 'hash': N...
prefix sg
public True
approved True
curators [{'uuid': 'c51a2d7e-6314-487a-9b8b-384db7ff79e...
host_lab Uwe Homberg, Marburg University
created_by {'uuid': '89c53715-561d-4942-81ab-aa4a02237fdd...
searchable True
structures [{'id': 1, 'name': 'Antennal Lobe', 'type': 's...
common_name Desert Locust
description The desert locust (Schistocerca gregaria) is a...
experiments []
date_created 2016-07-10T08:37:09.454013Z
date_modified 2021-07-20T06:55:06.812019Z
confocal_stacks []
reconstructions [{'id': 66, 'sex': 'UNKNOWN', 'uuid': '8b10333...
scientific_name Schistocerca gregaria
neuron_publications [{'id': 340, 'doi': 'https://doi.org/10.1002/c...
species_publications [{'id': 327, 'doi': '10.3389/fnbeh.2015.00346'...
semi_schematic_default None
dtype: object
Fetching meshes#
Fetch neuropil meshes for the Locust brain:
# `combine=True` would produce a single combined mesh but here we want a list of individual neuropils
locust_brain = ibdb.get_brain_meshes('Desert Locust', combine=False)
locust_brain[:2]
Out:
[<navis.Volume(name=Nodulus (left), units=1 dimensionless, color=(0.8392156862745098, 1.0, 0.8, 0.5), vertices.shape=(302, 3), faces.shape=(600, 3))>, <navis.Volume(name=Lateral Horn (left), units=1 dimensionless, color=(0.25882352941176473, 0.8901960784313725, 0.6901960784313725, 0.5), vertices.shape=(1002, 3), faces.shape=(2000, 3))>]
Plot neuropils
navis.plot3d(locust_brain, volume_legend=True)