abagen.mouse.get_gene_info¶
- abagen.mouse.get_gene_info(id=None, acronym=None, name=None, attributes=None, verbose=False)[source]¶
Queries Allen API for information about given gene
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)
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 all available attributes will be returned. Default: Noneverbose (bool, optional) – Whether to print status messages. Default: False
- Returns
info – If attributes is a str, returns an int or str depending on specified attribute. If attributes is a list, return a dict where keys are attributes and values are str or int.
- Return type
- Raises
ValueError – The provided gene is invalid
Examples
Get gene ID and name corresponding to gene acronym ‘Pdyn’:
>>> from abagen import mouse >>> mouse.get_gene_info(acronym='Pdyn', ... attributes=['id', 'name']) id name acronym Pdyn 18376 prodynorphin
You can also supply multiple genes to the query:
>>> mouse.get_gene_info(acronym=['Ace', 'Cd99'], ... attributes=['id', 'name']) id name acronym Ace 11210 angiotensin I converting enzyme (peptidyl-dipe... Cd99 163028 CD99 antigen