brainstat.context.genetics.surface_genetic_expression¶
- brainstat.context.genetics.surface_genetic_expression(pial, white, labels, volume_template, *, atlas_info=None, ibf_threshold=0.5, probe_selection='diff_stability', donor_probes='aggregate', lr_mirror=False, exact=True, tolerance=2, sample_norm='srs', gene_norm='srs', norm_matched=True, region_agg='donors', agg_metric='mean', corrected_mni=True, reannotated=True, return_counts=False, return_donors=False, donors='all', data_dir=None, verbose=1, n_proc=1)[source]¶
Computes genetic expression of surface parcels.
- Parameters
pial (str, BSPolyData, list) – Path of a pial surface file, BSPolyData of a pial surface or a list containing multiple of the aforementioned.
white (str, BSPolyData, list) – Path of a white matter surface file, BSPolyData of a pial surface or a list containing multiple of the aforementioned.
labels (str, numpy.ndarray, list) – Path to a label file for the surfaces, numpy array containing the labels, or a list containing multiple of the aforementioned.
volume_template (str, nibabel.nifti1.Nifti1Image) – Path to a nifti file to use as a template for the surface to volume procedure, or a loaded NIfTI image.
the (For details of the remaining parameters please consult) –
"atlas" (abagen.get_expression_data() documentation. All its parameters bar) –
parameters. (are valid input) –
- Returns
pandas.DataFrame – Dataframe containing the expression of each gene within each region.
Notes
An equal number of pial/white surfaces and labels must be provided. If parcellations overlap across surfaces, then the labels are kept for the first provided surface.
Examples
>>> from brainstat.context.genetics import surface_genetic_expression >>> from nilearn import datasets
>>> fsaverage = datasets.fetch_surf_fsaverage() >>> destrieux_atlas = datasets.fetch_atlas_surf_destrieux() >>> parcellation = destrieux_atlas['map_left'] >>> mni152 = datasets.load_mni152_template() >>> surface_genetic_expression(fsaverage['pial_left'], fsaverage['white_left'], ... parcellation, mni152)