brainstat.context.genetics.surface_genetic_expression

brainstat.context.genetics.surface_genetic_expression(labels, surfaces=None, space=None, *, atlas_info=None, ibf_threshold=0.5, probe_selection='diff_stability', donor_probes='aggregate', lr_mirror=None, missing=None, tolerance=2, sample_norm='srs', gene_norm='srs', norm_matched=True, norm_structures=False, region_agg='donors', agg_metric='mean', corrected_mni=True, reannotated=True, return_counts=False, return_donors=False, return_report=False, donors='all', data_dir=None, verbose=0, n_proc=1)[source]

Computes genetic expression of surface parcels.

Parameters
  • labels (list-of-str or numpy.ndarray) – List of paths to label files for the parcellation, or numpy array containing the pre-loaded labels

  • surfaces (list-of-image, optional) – List of paths to surface files or preloaded surfaces. If not specified assumes that labels are on the fsaverage5 surface. Default: None

  • space ({'fsaverage', 'fslr'}) – What template space surfaces are aligned to. If not specified assumes that labels are on the fsaverage5 surface. Default: None

  • details of the remaining parameters please consult the (For) –

  • documentation. All its parameters bar "atlas" (abagen.get_expression_data()) –

  • valid input parameters. (are) –

Returns

pandas.DataFrame – Dataframe containing the expression of each gene within each region.

Examples

>>> from brainstat.context.genetics import surface_genetic_expression
>>> from nilearn import datasets
>>> import numpy as np
>>> destrieux = datasets.fetch_atlas_surf_destrieux()
>>> labels = np.hstack((destrieux['map_left'], destrieux['map_right']))
>>> fsaverage = datasets.fetch_surf_fsaverage()
>>> surfaces = (fsaverage['pial_left'], fsaverage['pial_right'])
>>> expression = surface_genetic_expression(labels, surfaces,
...                                         space='fsaverage')