Wiki source code of SGA3 D1.5 Showcase 1

Last modified by gorkazl on 2023/11/13 14:27

Hide last authors
fousekjan 1.1 1 (% class="jumbotron" %)
2 (((
3 (% class="container" %)
4 (((
gorkazl 9.2 5 = Final demonstrator software =
fousekjan 1.1 6
fousekjan 5.1 7 SGA3 D1.5 - Showcase 1: "Degeneracy in neuroscience - when is Big Data big enough"
fousekjan 1.1 8 )))
9 )))
10
11 (% class="row" %)
12 (((
13 (% class="col-xs-12 col-sm-8" %)
14 (((
gorkazl 9.8 15 The Showcase is implemented as a series of interactive Jupyter notebooks covering the individual logical steps and can be accessed in a dedicated public EBRAINS collab.
fousekjan 1.1 16
gorkazl 9.8 17 An EBRAINS collab (as this one dedicated to the SGA3 D1.5 Deliverable) is a virtual environment providing access to a few interlinked services: Wiki, Drive, Bucket and Lab. The //Wiki// is this web interface that allows to visually navigate through the components of a collab and allows for basic documentation to be presented in the form of webpages. The //Drive// provides storage for small files. It is the local filesystem of a collab in which the documentation, the notebooks and all the supporting code are placed. The //Bucket// is a storage service for larger files. In the present collab, the Bucket holds the pre-computed results from the extensive parameter sweeps and model optimizations to allow skipping the computationally demanding steps. The //Lab// service is an instance of JupyterLab—an interactive computing environment—where the notebooks can be run and worked with. The Lab displays the code and the notebooks that are stored in the Drive.
fousekjan 1.1 18
gorkazl 9.7 19 The Jupyter notebooks in this collab will load all required Python modules including //Siibra// and //The Virtual Brain//, and the interfaces for launching the computationally demanding parts in the HPC infrastructure.
fousekjan 1.1 20
fousekjan 6.1 21 (% class="box infomessage" %)
22 (((
23 (% class="box" %)
24 (((
gorkazl 9.10 25 Running the notebooks //**requires an EBRANS account**// with permissions to access the Lab and programmatic access to the Knowledge Graph API. In addition, to interact with the HPC infrastructure, the user needs access to an active allocation on the corresponding FENIX site. Lastly, the virtual ageing brain notebooks write data to the Bucket storage.
gorkazl 9.8 26
fousekjan 17.1 27 Please, to be able to interact with the material fully, //**make first a private working duplicate**// of this Collab using the notebook [[copy_showcase1_collab.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/copy_showcase1_collab.ipynb]]. If you encounter any issues running the notebooks, contact [[The Virtual Brain Facility Hub>>mailto:jan.fousek@univ-amu.fr]].
fousekjan 6.1 28 )))
29 )))
30
31 (% class="wikigeneratedid" %)
gorkazl 9.11 32 The Showcase 1 aimed at investigations related to variability in neuroscience from two perspectives: (a) the interpersonal variability studied by the virtual ageing study, and (b) the variability across different cortical regions within an individual brain.
fousekjan 5.1 33
gorkazl 13.1 34 == a. Interpersonal variability – virtual ageing ==
gorkazl 9.11 35
36 (% class="wikigeneratedid" %)
37 See the details of the first study in the following publication:
38
fousekjan 15.2 39 Lavanga, M., Stumme, J., Yalcinkaya, B. H., Fousek, J., Jockwitz, C., Sheheitli, H., Bittner, N., Hashemi, M., Petkoski, S., Caspers, S., & Jirsa, V. (2023)[[. The virtual aging brain: Causal inference supports interhemispheric dedifferentiation in healthy aging.>>https://doi.org/10.1016/j.neuroimage.2023.120403]] //NeuroImage//, //283//, 120403.
fousekjan 6.1 40
gorkazl 12.1 41 === Simulation of resting-state activity ===
fousekjan 6.1 42
43 The fist notebook in the inter-individual variability workflow explores the resting-state simulation for a subject of the 1000BRAINS dataset. Functional data are simulated by means of a brain network model implemented in TVB, which is an ensemble of neural mass models linked via the weights of the structural connectivity (SC) matrix. Following topics are covered:
44
45 1. The neural-mass model by Montbrió, Pazó and Roxin.
46 1. Construction of the TVB model for a particular subject.
47 1. Dynamics of the model, and execution of a parameter study.
48 1. Summary of the simulation results for the whole cohort.
49
50 Link to the notebook:
51
fousekjan 16.1 52 * [[virtual_ageing/notebooks/1_BNM_for_resting_state.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/virtual_ageing/notebooks/1_BNM_for_resting_state.ipynb]]
fousekjan 6.1 53
fousekjan 15.1 54 [[image:https://wiki.ebrains.eu/bin/download/Collabs/sga3-d1-2-showcase-1/WebHome/image-20220103100841-2.png?rev=1.1||alt="image-20220103100841-2.png"]]
55
gorkazl 12.1 56 === Virtual ageing trajectories ===
fousekjan 6.1 57
58 The second steps shows the investigation of virtual ageing trajectory for each subject. In this context, we are going to show:
59
60 1. What we mean by virtual ageing and what is the empirical basis to investigate this approach.
61 1. How we can virtually age a subject using whole-brain modelling.
62 1. How the increase structure-function relationship relates to virtual ageing.
63
64 Link to the notebook:
65
fousekjan 16.1 66 * [[virtual_ageing/notebooks/2_virtual_ageing_trajectories.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/virtual_ageing/notebooks/2_virtual_ageing_trajectories.ipynb]]
fousekjan 6.1 67
fousekjan 15.1 68 [[image:https://wiki.ebrains.eu/bin/download/Collabs/sga3-d1-2-showcase-1/WebHome/image-20220103101022-3.png?rev=1.1||alt="image-20220103101022-3.png"]]
fousekjan 6.1 69
gorkazl 12.1 70 === Inference with SBI ===
fousekjan 6.1 71
72 The last step of the inter-individual variability workflow employs Simulation Based Inference for estimation of the full posterior values of the parameters. Here, a deep neural estimator is trained to provide a relationship between the parameters of a model (black box simulator) and selected descriptive statistics of the observed data.
73
fousekjan 15.1 74 [[image:https://wiki.ebrains.eu/bin/download/Collabs/sga3-d1-2-showcase-1/WebHome/image-20220103104332-4.png?width=418&height=418&rev=1.1||alt="image-20220103104332-4.png"]]
fousekjan 6.1 75
76 Link to the notebook:
77
fousekjan 16.1 78 * [[virtual_ageing/notebooks/3_inference_with_SBI.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/virtual_ageing/notebooks/3_inference_with_SBI.ipynb]]
fousekjan 6.1 79
gorkazl 18.1 80 == ==
81
gorkazl 13.1 82 == b. Regional variability – Receptor density maps ==
fousekjan 6.1 83
gorkazl 10.1 84 Aims at demonstrating the construction of whole-brain network models of the brain's activity, accounting for differences in receptor densities across cortical regions.
gorkazl 9.11 85
gorkazl 12.1 86 === Loading the data from EBRAINS ===
gorkazl 9.11 87
gorkazl 9.13 88 The first step of this workflow consists in loading the data from the Knowledge Graph via the //siibra interface//, including the regional bias on the model. In this case we require:
fousekjan 6.1 89
90 1. Structural connectivity matrices,
gorkazl 9.13 91 1. GABAa and AMPA receptor densities for each brain region, and
gorkazl 10.1 92 1. empirical resting-state fMRI data for fitting and validation of the simulations.
fousekjan 6.1 93
gorkazl 13.2 94 The three datasets are characterised in the same parcellation. Link to the notebook:
fousekjan 6.1 95
gorkazl 19.1 96 * [[regional_variability/1_load_fMRI_data.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/regional_variability/1_load_fMRI_data.ipynb]]
gorkazl 21.1 97 * [[regional_variability/2_retrieve_receptor_maps.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/regional_variability/2_retrieve_receptor_maps.ipynb]]
fousekjan 6.1 98
fousekjan 15.1 99 [[image:https://wiki.ebrains.eu/bin/download/Collabs/sga3-d1-2-showcase-1/WebHome/download%20-%202022-02-10T130815.902.png?rev=1.1||alt="region-wise gene expression heterogeneity"]]
fousekjan 6.1 100
gorkazl 13.2 101 === Fitting model parameters with regional bias ===
fousekjan 6.1 102
gorkazl 22.1 103 A series of simulations of the whole-brain network model are launched in the EBRAINS HPC facilities in order to identify the optimal model parameters leading to simulated resting-state brain activity that best resembles the empirically observed activity. In this branch of the showcase, brain regions are simulated using the mean-field AdEx population model; specifically modified to account for the regional densities of GABAa and AMPA neuroreceptors. We provide two versions of the calculations, developed during the course of SGA3 of the HBP, in order to accelerate vast parametric sweeps over standard TVB simulation. The first employs the "RateML" to run TVB simulation on GPUs and the second is based on a novel TVB backend running on C++.
fousekjan 6.1 104
gorkazl 22.1 105 Link to the notebooks:
fousekjan 6.1 106
gorkazl 23.1 107 * [[regional_variability/notebooks/3a_vast_paramsweep_GPU.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/regional_variability/3a_vast_paramsweep_GPU.ipynb]]
108 * [[regional_variability/notebooks/3b_vast_paramsweep_TVBCpp.ipynb>>https://lab.ch.ebrains.eu/hub/user-redirect/lab/tree/shared/SGA3%20D1.5%20Showcase%201/regional_variability/3b_vast_paramsweep_TVBCpp.ipynb]]
fousekjan 6.1 109
fousekjan 15.1 110 [[image:https://wiki.ebrains.eu/bin/download/Collabs/sga3-d1-2-showcase-1/WebHome/download%20-%202022-02-10T131102.033.png?rev=1.1||alt="regional bias vs goodness of fit"]]
fousekjan 1.1 111 )))
112
113
114 (% class="col-xs-12 col-sm-4" %)
115 (((
116 {{box title="**Contents**"}}
fousekjan 6.1 117 {{toc start="2"/}}
fousekjan 1.1 118 {{/box}}
119
120
121 )))
122 )))