Enigma可视化

这篇博客介绍了如何使用Enigma工具加载和处理数据,包括子皮质体积、脑皮质厚度和表面积等指标。通过reorder_sctx函数重新排序数据,并利用zscore_matrix对患者数据进行Z-score标准化,以便比较不同组间的差异,特别是关注左颞叶癫痫患者的平均Z-score值。
摘要由CSDN通过智能技术生成

Enigma

Surface data visualization

Load example data

Covariates | As per ENIGMA-Epilepsy protocol, covariate information includes SubjID (subjectID), Dx (diagnosis, 0=controls, 1=patients), SDx (sub-diagnosis, 0=controls, 1=non-lesional patients, 2=genetic generalized epilepsy (IGE/GGE) patients, 3=left TLE, 4=right TLE), Age (in years), Sex (1=males, 2=females), Handedness (1=right, 2=left), AO (age at onset in years, patients only), DURILL (duration of illness in years, patients only), and ICV (intracranial volume).

Subcortical volume | Subcortical grey matter volumes regroup data from 12 subcortical regions, bilateral hippocampus, and bilateral ventricles.

Cortical thickness | Cortical thickness was measured at each vertex as the Euclidean distance between white and pial surfaces, and subsequently averaged within each of the Desikan-Killiany parcels.

Cortical surface area | The cortical surface area of every Desikan-Killiany parcel is also provided as part of ENIGMA imaging protocols; this morphological measure is defined by the sum of the area of each of the triangles within the parcel.

Python | mega

>>> 
from enigmatoolbox.datasets import load_example_data

>>> # Load all example data from an individual site
>>> cov, metr1_SubVol, metr2_CortThick, metr3_CortSurf = load_example_data()

Re-order subcortical regions

from enigmatoolbox.utils.useful import reorder_sctx

>>> # Re-order the subcortical data alphabetically and by hemisphere
>>> metr1_SubVol_r = reorder_sctx(metr1_SubVol)

Z-score data

from enigmatoolbox.utils.useful import zscore_matrix

>>> # Z-score patients' data relative to controls (lower z-score = more atrophy)
>>> group = cov['Dx'].to_list()
>>> controlCode = 0
>>> SV_z = zscore_matrix(metr1_SubVol_r.iloc[:, 1:-1], group, controlCode)
>>> CT_z = zscore_matrix(metr2_CortThick.iloc[:, 1:-5], group, controlCode)
>>> SA_z = zscore_matrix(metr3_CortSurf.iloc[:, 1:-5], group, controlCode)

>>> # Mean z-score values across individuals with from a specific group (e.g., left TLE, that is SDx == 3)
>>> SV_z_mean = SV_z.iloc[cov[cov['SDx'] == 3].index, :].mean(axis=0)
>>> CT_z_mean = CT_z.iloc[cov[cov['SDx'] == 3].index, :].mean(axis=0)
>>> SA_z_mean = SA_z.iloc[cov[cov['SDx'] == 3].index, :].mean(axis=0)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值