zoom.prepare.process_SBP
- zoom.prepare.process_SBP(SBP: PathLike | tuple | nibabel.gifti.gifti.GiftiImage, parcellation: PathLike | tuple | nibabel.gifti.gifti.GiftiImage, atlas: str, density: str, hemi: str, n_perm: int, seed: int) Tuple[pandas.DataFrame, pandas.DataFrame][source]
Assign SBP image to parcellation image and perform spatial permutation test.
- Parameters:
SBP (nibabel.Nifti1Image, tuple or dict) –
Brain atlas specification. Can be: - A parcellation image in MNI space. - A tuple of GIFTI images in fsaverage5 space. - a dictionary where keys are donor IDs and values are parcellation
images (or surfaces) in the native space of each donor.
parcellation (path_like str, tuple, nib.gifti.gifti.GiftiImage) –
Recognized parcellation image - If hemi in [‘L’,’lh’,’left’]:
path_like str: Filepaths to .gii or .annot
nib.gifti.gifti.GiftiImage
- Otherwise, use both hemisphere:
- tuple: must be organized as L/R pair
(str, str): Filepaths to .gii or .annot
(nib.gifti.gifti.GiftiImage, nib.gifti.gifti.GiftiImage)
atlas ({'fsaverage', 'fSLR', 'civet'} optional,) – Name of surface atlas on which parcellation is defined.
density (str, optional) – Density of surface mesh on which parcellation is defined. Must becompatible with specified atlas.
hemi ({'L','lh','left','both'} optional,) – Hemisphere used to perform downstream analyses.
n_perm (int) – Number of permuation test to perform.
seed (int) – Random seed of spatial permutation test.
- Returns:
df_SBP_parc (pd.DataFrame) – SBP values in parcellation labels.
df_surr_parc (pd.DataFrame) – Permutated SBP values in parcellation labels.
References
- [1] Markello, R. D. et al. Neuromaps: structural and functional interpretation
of brain maps. Nat. Methods 19, 1472-1479 (2022)..
- [2] Alexander-Bloch, A. F. et al. On testing for spatial correspondence between
maps of human brain structure and function. Neuroimage 178, 540-551 (2018).