Skip to content

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()
id scientific_name common_name uuid date_created date_modified persistent_records description
0 24 Aedes aegypti Yellow fever mosquito 628dbce3-20f4-4af8-8c78-f9d3bc0c6654 2019-03-04T23:28:27.697821+01:00 2022-05-19T18:01:37.298876+02:00 [20.500.12158/SIN-0000024.2, 20.500.12158/SIN-... Aedes aegypti, the yellow fever mosquito, is t...
1 2 Agrotis infusa Bogong moth a6d4eadd-2e82-4393-96ab-fdfedaf42536 2016-07-10T10:37:09.361502+02:00 2022-05-19T18:02:16.115941+02:00 [20.500.12158/SIN-0000002.1, 20.500.12158/SIN-... "The nocturnal Bogong moth (Agrotis infusa) is...
2 21 Agrotis segetum Turnip moth ae12170d-d655-4794-9f38-54ca4f1b3c50 2017-04-26T12:55:52.000344+02:00 2022-05-19T18:02:49.110675+02:00 [20.500.12158/SIN-0000021.1, 20.500.12158/SIN-... The turnip moth, Agrotis segetum Denis and Sch...
3 7 Apis mellifera Honeybee 8881609d-1929-410a-be38-ca47da5718d5 2016-07-10T10:37:09.372889+02:00 2023-02-08T21:04:16.732190+01:00 [20.500.12158/SIN-0000007.1, 20.500.12158/SIN-... The western honey bee or European honey bee (A...
4 10 Bombus terrestris Bumble Bee 718388b3-8fbe-4b49-82c5-44493347bb30 2016-07-10T10:37:09.383142+02:00 2022-05-19T18:18:26.774832+02:00 [20.500.12158/SIN-0000010.1, 20.500.12158/SIN-... Bombus terrestris, the buff-tailed bumblebee o...

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)