abagen.get_samples_in_mask¶
- abagen.get_samples_in_mask(mask=None, **kwargs)[source]¶
Returns preprocessed microarray expression data for samples in mask
Uses the same processing workflow as
abagen.get_expression_data()
but instead of aggregating samples within regions simply returns sample-level expression data for all samples that fall within boundaries of mask.- Parameters:
mask (niimg-like object or dict, optional) – A mask image in MNI space or a tuple of GIFTI images in fsaverage5 space (where 0 is the background). Alternatively, a dictionary where keys are donor IDs and values are mask images (or surfaces) in the native space of each donor. If not supplied, all available samples will be returned. Default: None
kwargs (key-value pairs) – All key-value pairs from
abagen.get_expression_data()
except for: atlas, atlas_info, region_agg, and agg_metric, which will be ignored. If atlas is supplied instead of mask then atlas will be used instead as a modified binary image. If both atlas and mask are supplied then mask will be used
- Returns:
expression ((S, G) pandas.DataFrame) – Microarray expression for S samples for G genes, aggregated across donors, where the columns are gene names
coords ((S,) numpy.ndarray) – MNI coordinates of samples in expression. Even if donor-specific masks are provided MNI coordinates will be returned to ensure comparability between subjects