Data Processing for Building Digital Brain Twins with The Virtual Brain

Leon Martin

Berlin Institute of Health at Charité University Medicine Berlin

2024-05-16

Main Challenges

Goal of neuroimaging: Elucidate brain function in relation to its multiple layers of organization that operate at different spatial and temporal scales

Warning

  1. Challenging integration across spatiotemporal scales (Akil, Martone, and Van Essen 2011)
  2. Limited reproducibility of imaging studies (Botvinik-Nezer et al. 2020)
  3. Reproducible brain imaging studies require huge sample sizes (Marek et al. 2022)

↳ Brain network models help understanding multi-scale brain dynamics by integrating individual structural and functional data with neural population models (Schirner et al. 2018).

 

Current Modeling Studies

Dynamical Brain Model of Decision Making Processes (Schirner, Deco, and Ritter 2023)

Network Structure Shapes Cortical Travelling Waves (Koller, Schirner, and Ritter 2024)

Longitudinal Alzheimer’s Proteinopathologic Disease Progression Model (Cabrera-Álvarez et al. 2024)

The Virtual Epileptic Patient - probabilistic brain modeling in drug-resistant epilepsy (Wang et al. 2022)

Building Blocks of a Brain Network Model

MR-Physics Overview

Larmor Equation: \[ \omega = \gamma B_0 \]

  • \(\omega\): Larmor precession frequency
  • \(\gamma\): gyromagnetic ratio (\(\gamma_p ≈ 42.577 \text{ MHz/T}\) For protons of a hydrogen nucleus)
  • \(B_0\): External magnetic field strength

Analytical Variability in fMRI Data Interpretation

  • 70 independent teams analized the same fMRI dataset.
  • Every team chose a unique workflow to analyze the data.
  • Choice of analysis pipeline had substantial effects on scientific results conclusions

Network concepts and terminology

Simulating Whole-Brain Dynamics

  • Multimodal data integration
  • Models simulating local neural activity are coupled based on a whole-brain network
  • Empirical data features can be used for parameter optimization and model fitting

Building Blocks of a Brain Network Model

Empirical data features

MRI

Figure 1: Average parcellated structural and functional connectomes (84 Areas)

  • Structural connectivity (SC): Anatomical connections
  • Functional connectivity (FC): Statistical dependencies

Empirical data features

EEG

  • Empirical: Data is projected to source space to fit model
  • Simulated: Forward-modelling via leadfield matrix

\[ \mathbf{V} = \mathbf{L} \cdot \mathbf{J} \]

MRI Processing Pipeline

Minimal Preprocessing with HCP Pipelines

A surface-based approach

Local and Global Connectivity

Scaleable workflows with Snakemake

  • Workflow management system for creating reproducible and scalable data analysis pipelines.
  • Python-based
  • Interoperable with hcp cluster or cloud computing and local execution.
  • Flexible and efficient job scheduling
  • Supports containerized workflows

Rule-based modular workflows

Note

Rule: Set of instructions that specifies input and output files along with a shell command for transformation.

  • Benchmarking for resource management
  • Option for caching between workflows
  • Reusable standardized wrappers for common tasks

classDiagram
    class Rule {
    }

    class Input {
        +List files
    }

    class Output {
        +List files
    }

    class Params {
        +Dict key_values
    }

    class Threads {
        +Int count
    }

    class Container {
        +String name
    }

    class Shell {
        +String command
    }

    class Log {
        +String file
    }

    Rule --> Input
    Rule --> Output
    Rule --> Params
    Rule --> Threads
    Rule --> Container
    Rule --> Shell
    Rule --> Log

rule create_sc:
    input:
        parc=rules.mmp_vol_to_mrtrix.output.parc,
        tracks=rules.run_tractography.output.tracks,
        sift_weights=rules.run_sift.output.sift_weights,
    output:
        weights=join(MRTrix_out,
                    "sub-{subid}_parc-mmp1_sc_weights.csv"),
        lengths=join(MRTrix_out,
                    "sub-{subid}_parc-mmp1_sc_lengths.csv"),
        assignments=join(MRTrix_out,
                        "assignments.txt"),
    threads: config["nthreads"]
    container:
        config["containers"]["mrtrix"]
    shell:
        """
        tck2connectome {input.tracks} {input.parc} {output.weights} \
            -tck_weights_in {input.sift_weights} \
            -out_assignments {output.assignments} \
            -symmetric -zero_diagonal -nthreads {threads}

        tck2connectome {input.tracks} {input.parc} {output.lengths} \
            -tck_weights_in {input.sift_weights} \
            -symmetric -zero_diagonal -scale_length -stat_edge mean \
            -nthreads {threads}
        echo $(date) > {output.done}
        """

Writing Workflows

graph TD;
    A[Target Output] --> R2[rule 2];
    R2 --> O1[Output 1]
    O1 --> R1[rule 1]
    R1 --> I1[data/Input 1];
    R1 --> I2[data/Input 2];

Top down applicatio of rules within a Snakefile:

  • Application of a rule to generate a set of output fiels is called job
  • For each input file of a job, Snakemake recursively determines rules that can be applied to generate it.
  • Directed acyclic graph (DAG) of jobs
    • nodes: rules
    • edges: dependencies

Example Workflow

HCP’s Diffusion Pipeline

Brain Imaging Data Structure

Tip

  • BIDS stands for Brain Imaging Data Structure.
  • It is a standard for organizing and describing neuroimaging and electrophysiological data.
  • The goal is to enhance reproducibility, transparency, and data sharing in the neuroscience community.

 

 

Key Features

  • Organized Directory Structure: Standardizes how data files and metadata are stored.
  • Standard Naming Conventions: Ensures consistency across datasets.
  • Comprehensive Metadata: Includes detailed descriptions of the data and acquisition methods.

Resources: BIDS Specification, BIDS Starter Kit

BIDS Extension Computational Modeling (BEP034)

  • Network Graphs
  • Systems of Mathematical Equations
  • Computer Code
  • File formats: tsv, JSON, and XML

from tvb.simulator.models import Epileptor

mathematical objects

  • equations
  • parameters
  • code

spatial objects

  • coordinates
  • maps
  • sensor locations

temporal objects

  • time series
  • stimulus patterns

BIDS Folder Structure of a TVB Project

📁 Project/

📁 sub-1/

    📁 net/

        📄 sub-1_nt-distances_desc-SC_net.json

        📈 sub-1_nt-distances_desc-SC_net.tsv

        📄 sub-1_nt-weights_desc-SC_net.json

        📈 sub-1_nt-weights_desc-SC_net.tsv

    📁 eq/

        📄 sub-1_desc-JansenRit_lems.json

        📈 sub-1_desc-JansenRit_lems.xml

    📁 ts/

        📄 sub-1_desc-simVOIy1_ts.json

        📈 sub-1_desc-simVOIy1_ts.tsv

        📄 sub-1_desc-simVOIy2_ts.json

        📈 sub-1_desc-simVOIy2_ts.tsv

Thank you!

References

Akil, Huda, Maryann E. Martone, and David C. Van Essen. 2011. “Challenges and Opportunities in Mining Neuroscience Data.” Science 331 (6018): 708–12. https://doi.org/10.1126/science.1199305.
Botvinik-Nezer, Rotem, Felix Holzmeister, Colin F. Camerer, Anna Dreber, Juergen Huber, Magnus Johannesson, Michael Kirchler, et al. 2020. “Variability in the Analysis of a Single Neuroimaging Dataset by Many Teams.” Nature 582 (7810): 84–88. https://doi.org/10.1038/s41586-020-2314-9.
Cabrera-Álvarez, Jesús, Leon Stefanovski, Leon Martin, Gianluca Susi, Fernando Maestú, and Petra Ritter. 2024. “A Multiscale Closed-Loop Neurotoxicity Model of Alzheimer’s Disease Progression Explains Functional Connectivity Alterations.” Eneuro 11 (4): ENEURO.0345–23.2023. https://doi.org/10.1523/eneuro.0345-23.2023.
Deco, Gustavo, Josephine Cruzat, Joana Cabral, Gitte M. Knudsen, Robin L. Carhart-Harris, Peter C. Whybrow, Nikos K. Logothetis, and Morten L. Kringelbach. 2018. “Whole-Brain Multimodal Neuroimaging Model Using Serotonin Receptor Maps Explains Non-Linear Functional Effects of LSD.” Current Biology 28 (19): 3065–3074.e6. https://doi.org/10.1016/j.cub.2018.07.083.
Desikan, Rahul S., Florent Ségonne, Bruce Fischl, Brian T. Quinn, Bradford C. Dickerson, Deborah Blacker, Randy L. Buckner, et al. 2006. “An Automated Labeling System for Subdividing the Human Cerebral Cortex on MRI Scans into Gyral Based Regions of Interest.” NeuroImage 31 (3): 968–80. https://doi.org/10.1016/j.neuroimage.2006.01.021.
Fischl, Bruce, David H. Salat, Evelina Busa, Marilyn Albert, Megan Dieterich, Christian Haselgrove, Andre van der Kouwe, et al. 2002. “Whole Brain Segmentation.” Neuron 33 (3): 341–55. https://doi.org/10.1016/s0896-6273(02)00569-x.
Glasser, Matthew F., Timothy S. Coalson, Emma C. Robinson, Carl D. Hacker, John Harwell, Essa Yacoub, Kamil Ugurbil, et al. 2016. “A Multi-Modal Parcellation of Human Cerebral Cortex.” Nature 536 (7615): 171–78. https://doi.org/10.1038/nature18933.
Glasser, Matthew F., Stamatios N. Sotiropoulos, J. Anthony Wilson, Timothy S. Coalson, Bruce Fischl, Jesper L. Andersson, Junqian Xu, et al. 2013. “The Minimal Preprocessing Pipelines for the Human Connectome Project.” NeuroImage 80 (October): 105–24. https://doi.org/10.1016/j.neuroimage.2013.04.127.
Koller, Dominik P., Michael Schirner, and Petra Ritter. 2024. “Human Connectome Topology Directs Cortical Traveling Waves and Shapes Frequency Gradients.” Nature Communications 15 (1). https://doi.org/10.1038/s41467-024-47860-x.
Lindquist, Martin. 2020. “Neuroimaging Results Altered by Varying Analysis Pipelines.” Nature 582 (7810): 36–37. https://doi.org/10.1038/d41586-020-01282-z.
Marek, Scott, Brenden Tervo-Clemmens, Finnegan J. Calabro, David F. Montez, Benjamin P. Kay, Alexander S. Hatoum, Meghan Rose Donohue, et al. 2022. “Reproducible Brain-Wide Association Studies Require Thousands of Individuals.” Nature 603 (7902): 654–60. https://doi.org/10.1038/s41586-022-04492-9.
Martin, L., K. Bülau, C. Hüttl, R. A. Schmitt, D. Perdikis, L. Domide, H. Taher, L. Stefanovski, and P. Ritter. 2024. “Semantic Annotation of Computational Neuroscience Knowledge: The Virtual Brain Ontology for Reproducible Whole-Brain Models.”
Sanz-Leon, Paula, Stuart A. Knock, Andreas Spiegler, and Viktor K. Jirsa. 2015. “Mathematical Framework for Large-Scale Brain Network Modeling in the Virtual Brain.” NeuroImage 111 (May): 385–430. https://doi.org/10.1016/j.neuroimage.2015.01.002.
Schild, H. H. 1992. MRI Made Easy (... Well Almost). Berlex Laboratories. https://books.google.de/books?id=mG5rAAAAMAAJ.
Schirner, Michael, Gustavo Deco, and Petra Ritter. 2023. “Learning How Network Structure Shapes Decision-Making for Bio-Inspired Computing.” Nature Communications 14 (1). https://doi.org/10.1038/s41467-023-38626-y.
Schirner, Michael, Anthony Randal McIntosh, Viktor Jirsa, Gustavo Deco, and Petra Ritter. 2018. “Inferring Multi-Scale Neural Mechanisms with Brain Network Modelling.” eLife 7 (January): e28927. https://doi.org/10.7554/elife.28927.
Schirner, Michael, Simon Rothmeier, Viktor K. Jirsa, Anthony Randal McIntosh, and Petra Ritter. 2015. “An Automated Pipeline for Constructing Personalized Virtual Brains from Multimodal Neuroimaging Data.” NeuroImage 117 (August): 343–57. https://doi.org/10.1016/j.neuroimage.2015.03.055.
Sporns, Olaf. 2013. “Making Sense of Brain Network Data.” Nature Methods 10 (6): 491–93. https://doi.org/10.1038/nmeth.2485.
———. 2014. “Contributions and Challenges for Network Models in Cognitive Neuroscience.” Nature Neuroscience 17 (5): 652–60. https://doi.org/10.1038/nn.3690.
Wang, Huifang E, Marmaduke Woodman, Paul Triebkorn, Jean-Didier Lemarechal, Jayant Jha, Borana Dollomaja, Anirudh Nihalani Vattikonda, et al. 2022. “Virtual Epileptic Patient (VEP): Data-Driven Probabilistic Personalized Brain Modeling in Drug-Resistant Epilepsy.” medRxiv, January, 2022–01. https://doi.org/10.1101/2022.01.19.22269404.
Zorzos, Ioannis, Ioannis Kakkos, Errikos M. Ventouras, and George K. Matsopoulos. 2021. “Advances in Electrical Source Imaging: A Review of the Current Approaches, Applications and Challenges.” Signals 2 (3): 378–91. https://doi.org/10.3390/signals2030024.