abagen.mouse.get_unionization_from_gene¶
- abagen.mouse.get_unionization_from_gene(id=None, acronym=None, name=None, slicing_direction='sagittal', structures=None, attributes=None, average=True, verbose=False)[source]¶
Gets unionization data for provided gene(s)
One of id, acronym, or name must be provided.
- Parameters:
id (int, optional) – Numerical gene ID
acronym (str, optional) – Short-form gene acronym (case sensitive)
name (str, optional) – Full gene name (case sensitive)
slicing_direction ({'sagittal', 'coronal'}, optional) – Slicing direction of brain tissue
structures (list, optional) – List of structures (id, acronym, or name) for which to get unionization information associated with provided experiment_id. If not specified uses structures documented in [MI1]. Specifying either the id or name is recommended as acronyms are not unique to structures. Default: None
attributes (str or list, optional) – Which attributes / information to obtain for the provided gene. See
abagen.mouse.available_gene_info()
for list of available attributes to request. If not specified then only ‘expression_density’ will be returned. Specifying ‘all’ will return all information. Default: Noneaverage (bool, optional) – Whether to average across experiments if there are multiple experiments corresponding to any provided gene(s). Only experiments probing the same gene will be considered for averaging, and distinct structures will be retained. Default: True
verbose (bool, optional) – Whether to print status messages. Default: False
- Returns:
unionization – Where columns are unionization attributes and the index corresponds to strucuture and gene ids (if experiments is provided as a list with multiple genes). If average=False, experiments will also be a level in index
- Return type:
pandas.DataFrame
Examples
>>> from abagen import mouse >>> mouse.get_unionization_from_gene(acronym='Pdyn', ... structures=[22, 31]) expression_density gene_id structure_id 18376 22 0.024840 31 0.017199 >>> mouse.get_unionization_from_gene(acronym=['Ace', 'Cd99'], ... structures=[22, 31]) expression_density gene_id structure_id 11210 22 0.001283 31 0.001427 163028 22 0.067537 31 0.056442