Python API

This is the function reference of the ENIGMA TOOLBOX


enigmatoolbox.datasets

ENIGMA datasets

enigmatoolbox.datasets.load_example_data()

Loads the ENIGMA example dataset (from one site - MICA-MNI Montreal; author: @saratheriver)

enigmatoolbox.datasets.load_summary_stats([…])

Outputs summary statistics for a given disorder (author: @saratheriver)

Export functions

enigmatoolbox.datasets.nfaces(surface_name, …)

Returns number of faces/triangles for a surface (author: @saratheriver)

enigmatoolbox.datasets.getaffine(…)

Returns vox2ras transform for a surface (author: @saratheriver)

enigmatoolbox.datasets.write_cifti(data[, …])

Writes cifti file (authors: @NicoleEic, @saratheriver)

Connectivity matrices

enigmatoolbox.datasets.load_fc([parcellation])

Load functional connectivity data (author: @saratheriver)

enigmatoolbox.datasets.load_fc_as_one([…])

Load functional connectivity data (cortical + subcortical in one matrix; author: @saratheriver)

enigmatoolbox.datasets.load_sc([parcellation])

Load structural connectivity data (author: @saratheriver)

enigmatoolbox.datasets.load_sc_as_one([…])

Load structural connectivity data (cortical + subcortical in one matrix; author: @saratheriver)

Gene co-expression data

enigmatoolbox.datasets.fetch_ahba([csvfile])

Fetch Allen Human Brain Atlas microarray expression data from all donors and all genes (author: @saratheriver)

enigmatoolbox.datasets.risk_genes([disorder])

Outputs names of GWAS-derived risk genes for a given disorder (author: @saratheriver)

Surface templates

enigmatoolbox.datasets.load_fsa5([…])

Load fsaverage5 surfaces (author: @saratheriver)

enigmatoolbox.datasets.load_conte69([…])

Load conte69 surfaces (author: @OualidBenkarim)

enigmatoolbox.datasets.load_subcortical([…])

Load subcortical surfaces (author: @saratheriver)


enigmatoolbox.cross_disorder

Cross-disorder effect

enigmatoolbox.cross_disorder.cross_disorder_effect([…])

Cross-disorder effect (authors: @boyongpark, @saratheriver)


enigmatoolbox.mesh

Read/write functionality

enigmatoolbox.mesh.mesh_io.read_surface(ipth)

Read surface data (author: @OualidBenkarim)

enigmatoolbox.mesh.mesh_io.write_surface(…)

Write surface data (author: @OualidBenkarim)


enigmatoolbox.permutation_testing

Spin permutations

enigmatoolbox.permutation_testing.spin_test(…)

Spin permutation (author: @saratheriver)

enigmatoolbox.permutation_testing.centroid_extraction_sphere(…)

Extract centroids of a cortical parcellation on a surface sphere (author: @saratheriver)

enigmatoolbox.permutation_testing.rotate_parcellation(…)

Rotate parcellation (author: @saratheriver)

enigmatoolbox.permutation_testing.perm_sphere_p(x, …)

Generate a p-value for the spatial correlation between two parcellated cortical surface maps (author: @saratheriver)

Shuf permutations

enigmatoolbox.permutation_testing.shuf_test(…)

Shuf permuation (author: @saratheriver)


enigmatoolbox.plotting.surface_plotting

Surface plotting

enigmatoolbox.plotting.surface_plotting.plot_cortical([…])

Plot cortical surface with lateral and medial views (authors: @OualidBenkarim, @saratheriver)

enigmatoolbox.plotting.surface_plotting.plot_subcortical([…])

Plot subcortical surface with lateral and medial views (author: @saratheriver)

enigmatoolbox.plotting.surface_plotting.build_plotter(…)

Build plotter arranged according to the layout (author: @OualidBenkarim)

enigmatoolbox.plotting.surface_plotting.plot_surf(…)

Plot surfaces arranged according to the layout (author: @OualidBenkarim)


enigmatoolbox.histology

BigBrain stratification

von Economo-Koskinas stratification

enigmatoolbox.utils

Re-order subcortical data matrix

enigmatoolbox.utils.useful.reorder_sctx(data)

Re-order subcortical volume data alphabetically and by hemisphere (left then right; author: @saratheriver)

Z-score data matrix

enigmatoolbox.utils.useful.zscore_matrix(…)

Z-score data relative to a given group (author: @saratheriver)

Parcellation

enigmatoolbox.utils.parcellation.parcel_to_surface(…)

Map data in source to target according to their labels (authors: @OualidBenkarim, @saratheriver)

enigmatoolbox.utils.parcellation.surface_to_parcel(…)

Summarize data in values according to labels (author: @OualidBenkarim)

enigmatoolbox.utils.parcellation.subcorticalvertices([…])

Map one value per subcortical area to surface vertices (author: @saratheriver)