.. _insectbraindb_tut: Insect Brain DB *************** The insect brain database (`link `_) 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. .. code:: ipython3 # 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: .. code:: ipython3 species = ibdb.get_available_species() species.head() .. raw:: html
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-04T22:28:27.697821Z 2022-05-19T16:01:37.298876Z [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-10T08:37:09.361502Z 2022-05-19T16:02:16.115941Z [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-26T10:55:52.000344Z 2022-05-19T16:02:49.110675Z [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-10T08:37:09.372889Z 2022-05-19T16:10:37.640885Z [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-10T08:37:09.383142Z 2022-05-19T16:18:26.774832Z [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): .. code:: ipython3 spec_info = ibdb.get_species_info('Schistocerca gregaria') spec_info .. parsed-literal:: 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: .. code:: ipython3 # `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] .. parsed-literal:: INFO : 1 reconstruction(s) from 1 brain(s) found (navis) .. parsed-literal:: [, ] .. code:: ipython3 # Plot neuropils fig = navis.plot3d(locust_brain, width=1200, volume_legend=True) .. raw:: html :file: figures/locust_brain.html | | | | Fetch neurons ------------- First we need to know what neurons are available. Just like on the website you can set all kinds of different search parameters. Here we will stick with our Locust: .. code:: ipython3 locust_neurons = ibdb.search_neurons(species='Desert Locust') locust_neurons.head() .. raw:: html
id name full_name short_name persistent_records uploaded_by nin date_uploaded reconstruction_creator group_head ... public hemisphere archived archived_notes species template_type superseding_record super_type neuron_family neuron_class
0 426 CL1a-L1 sg-CL1a-L1(L) CL1a-L1 [20.500.12158/NIN-0000426.1] {'id': 41, 'first_name': 'Frederick', 'last_na... NIN-0000426 2021-07-01T00:00:00Z Uwe Homberg ... True LEFT False None 9 1 None 31.0 8.0 1.0
1 429 CL1a-L3 sg-CL1a-L3(L) CL1a-L3 [20.500.12158/NIN-0000429.1] {'id': 41, 'first_name': 'Frederick', 'last_na... NIN-0000429 2021-07-01T00:00:00Z Uwe Homberg ... True LEFT False None 9 1 None 31.0 8.0 1.0
2 440 CL1a-L4 sg-CL1a-L4(L) CL1a-L4 [20.500.12158/NIN-0000440.1] {'id': 41, 'first_name': 'Frederick', 'last_na... NIN-0000440 2021-07-01T00:00:00Z Uwe Homberg ... True LEFT False None 9 1 None 31.0 8.0 1.0
3 425 CL1a-L5 sg-CL1a-L5(L) CL1a-L5 [20.500.12158/NIN-0000425.1] {'id': 41, 'first_name': 'Frederick', 'last_na... NIN-0000425 2021-07-01T00:00:00Z Uwe Homberg ... True LEFT False None 9 1 None 31.0 8.0 1.0
4 423 CL1a-R2 sg-CL1a-R2(R) CL1a [20.500.12158/NIN-0000423.1] {'id': 71, 'first_name': 'Ronja', 'last_name':... NIN-0000423 2021-06-19T00:00:00Z Stefanie Jahn Uwe Homberg ... True RIGHT False None 9 1 None 6.0 8.0 1.0

5 rows × 21 columns

Let's fetch skeletons ("reconstructions") for some of the above neurons. Note that not all neurons have skeletons (see the "reconstruction_creator" column)! .. code:: ipython3 # You can use IDs or names, or a combination thereof to fetch skeletons skeleton = ibdb.get_skeletons('CL1a-R2') skeleton .. raw:: html <class 'navis.core.neuronlist.NeuronList'> containing 1 neurons (4.2MiB)
type name id n_nodes n_connectors n_branches n_leafs cable_length soma units
0 navis.TreeNeuron CL1190516SkeletonTreeRight.swc 423 78559 None 330 340 9918.345885 None 1 micrometer
.. code:: ipython3 # Plot the neuron - note that most neurons appear to have radii information fig = skeleton.plot3d(radius=True) .. raw:: html :file: figures/locust_neuron.html | | | | Check out the :ref:`API reference` for further details.