Building Software Tools for Systems Neuroscience

INCF/OCNS Software WG

Adam Tyson

About us

Neuroinformatics Unit

  • Sainsbury Wellcome Centre & Gatsby Computational Neuroscience Unit, UCL (London)

Neuroinformatics Unit

  • Sainsbury Wellcome Centre & Gatsby Computational Neuroscience Unit, UCL (London)
  • (Systems) neuroscience & machine learning research software engineering group

What we do

  • Data analysis software (anatomy, electrophysiology, functional imaging, behaviour)
  • Data management (specifications, tools)
  • Collaborations (data science, software development, productionisation)

Current projects

  • Data standardisation and management
  • Developer tools
  • Modelling
  • Extracellular electrophysiology analysis
  • Video behavioural analysis
  • Multiphoton analysis
  • Computational neuroanatomy

Current projects

  • Data standardisation and management
  • Developer tools
  • Modelling
  • Extracellular electrophysiology analysis
  • Video behavioural analysis
  • Multiphoton analysis
  • Computational neuroanatomy

Data management

Data standards as a solution

Bridging the gap

A simpler standard

NeuroBlueprint

  • Inspired by BIDS
  • Lightweight data specification for (systems) neuroscience
  • Maximise benefits of standardisation
  • Minimise burden

Aiding adoption

datashuttle

Python API

from datashuttle import DataShuttle

project = DataShuttle("my_first_project")
project.make_config_file(
    local_path=r"C:\Users\Joe\data\local\my_first_project",
    central_path=r"C:\Users\Joe\data\central\my_first_project",
    connection_method="local_filesystem",
)
project.create_folders(
    top_level_folder="rawdata",
    sub_names="sub-001",
    ses_names="ses-001_@DATE@",
    datatype=["behav", "ephys"]
)

project.upload_entire_project()

Terminal user interface

Future

  • Standardise metadata
  • Export to NWB
  • Converge with BIDS 2.0
  • Eventually not be recquired!

Behavioural analysis

Quantifying behaviour: ethogram

Time after start (min) Foraging Eating Grooming
0:30 0 0 1
1:00 0 0 1
1:30 1 0 0
2:00 0 1 0

Quantifying behaviour: modern

Pose estimation

source: sleap.ai

Python API

from movement.io import load_poses, save_poses
from movement.filtering import filter_by_confidence, interpolate_over_time
from movement.filtering import savgol_filter

ds = load_poses.from_file("/path/to/file.analysis.h5", source_software="SLEAP", fps=30)
ds = filter_by_confidence(ds, threshold=0.6)
ds = interpolate_over_time(ds, method="linear", max_gap=1)
ds = savgol_filter(ds, window_length=0.2, polyorder=2)

save_poses.to_lp_file(ds, "/path/to/file.csv")

displacement = ds.move.compute_displacement()
velocity = ds.move.compute_velocity()
accel = ds.move.compute_acceleration()

napari plugin

Future

  • Support for more formats
  • NWB export
  • Support for all relevant kinematic variables
  • Arbitrary regions of interest analysis
  • Define and transform coordinate systems

Anatomy

BrainGlobe Initiative

Established 2020 with three aims:

  1. Develop general-purpose tools to help others build interoperable software
  2. Develop specialist software for specific analysis and visualisation needs
  3. Reduce barriers of entry, and facilitate the building of an ecosystem of computational neuroanatomy tools.

BrainGlobe Atlas API

brainglobe-atlasapi

Current atlases

BrainGlobe Atlas API

from brainglobe_atlasapi.bg_atlas import BrainGlobeAtlas
atlas = BrainGlobeAtlas("allen_mouse_25um")

reference_image = atlas.reference
print(reference_image.shape)
# (528, 320, 456)

annotation_image = atlas.annotation
print(annotation_image.shape)
# (528, 320, 456)

from pprint import pprint
VISp = atlas.structures["VISp"]
pprint(VISp)

# {'acronym': 'VISp',
#  'id': 385,
#  'mesh': None,
#  'mesh_filename': PosixPath('/home/user/.brainglobe/allen_mouse_25um_v0.3/meshes/385.obj'),
#  'name': 'Primary visual area',
#  'rgb_triplet': [8, 133, 140],
#  'structure_id_path': [997, 8, 567, 688, 695, 315, 669, 385]}

Version 1

Whole brain microscopy

Whole-brain registration

brainreg

3D cell detection

cellfinder

3D cell detection

cellfinder

3D cell detection

cellfinder

3D cell detection

cellfinder

Spatial analysis

brainglobe-segmentation

Visualisation

brainrender

Version 2

Expanding access

Adding new atlases

  • Allen mouse brain with barrel annotations
  • Blind mexican cavefish
  • Latest version of Waxholm rat
  • Axolotl
  • Prarier Vole
  • Princeton RAtlas
  • Cuttlefish
  • Developmental Mouse Brain atlas
  • NHP
  • Human

Building novel atlases

More raw data processing

Consistent napari environment

Support for more data types

Thanks

Support

Contributors

Stephen Lenzi, Rob Campbell, Joe Ziminski, Sofia Miñano, Niko Sirmpilatze, Nicholas Del Grosso, Laura Porta, Lee Cossell, Antonin Blot, David Pérez-Suárez, David Stansby, Will Graham, Patrick Roddy, Adrien Berchet, Mathieu Bourdenx, Ben Kantor, NovaFae, David Young, Sam Clothier, Gubra-ApS, Kailyn Fields, ramroomh, Samuel Diebolt, Chris Roat, Oren Amsalem, kclamar, Draga Doncila Pop, juanma9613, Jules Scholler, Iaroslavna Vasylieva, Nicolas Peschke, Justin Kiggins, Peter Sobolewski, Simão Bolota, chili-chiu, jaimergp, Sebastian Lammers, Matt Colligan, Paul Brodersen, Carter Peene, francesshei, Sean Martin, Adam Tyson, Federico Claudi, Luigi Petrucco, Alessandro Felder, Christian Niedworok, Charly Rousseau, Horst Obenhaus, Chryssanthi Tsitoura, Sepiedeh Keshavarzi, Mateo Vélez-Fort, Ben Dichter, 4iar, Marco Musy, Anna Medyukhina, stegiopast, EmanPaoli, lidakanari, Alexis Arnaudon, Yaroslav Halchenko, Ziyang Liu, Philip Shamash, koushik-ms, Harald Reingruber, Emily Jane Dennis, Peak, Maximilian Blacher, Hernando Martinez Vergara, Estelle, nicole-vissers, GD, Michael Kunst, Estelle Nassar, Sara Mederos, Igor Tatarnikov, Viktor Plattner, Carlo Castoldi, Jingjie Li, Guillaume Le Goc, Harry Carey, Matt Einhorn, Kimberly Meechan, Robert Kozol, Chang Huan Lo, Dhruv Sharma, Brandon Peri, Ivan Varela

Team

Laura Porta

Chang Huan lo

Joe Ziminski

Alessandro Felder

Niko Sirmpilatze

Igor Tatarnikov

Sofía Miñano