dynamo.pp.convert2symbol

dynamo.pp.convert2symbol(adata, scopes=None, subset=True)[source]

This helper function converts unofficial gene names to official gene names.

Parameters:
  • adata (AnnData) – an AnnData object.

  • scopes (Union[str, Iterable, None]) – scopes are needed when you use non-official gene name as your gene indices (or adata.var_name). This arugument corresponds to type of types of identifiers, either a list or a comma-separated fields to specify type of input qterms, e.g. “entrezgene”, “entrezgene,symbol”, [“ensemblgene”, “symbol”]. Refer to official MyGene.info docs (https://docs.mygene.info/en/latest/doc/query_service.html#available_fields) for full list of fields. Defaults to None.

  • subset – whether to inplace subset the results. Defaults to True.

Raises:

Exception – gene names in adata.var_names are invalid.

Return type:

AnnData

Returns:

The updated AnnData object.