scvelo.utils.clean_obs_names¶
-
scvelo.utils.
clean_obs_names
(adata, alphabet='[AGTCBDHKMNRSVWY]', id_length=12, inplace=True)¶ Clean up the obs_names.
For example an obs_name ‘sample1_AGTCdate’ is changed to ‘AGTC’ of the sample ‘sample1_date’. The sample name is then saved in obs[‘sample_batch’]. The genetic codes are identified according to according to https://www.neb.com/tools-and-resources/usage-guidelines/the-genetic-code.
- adata
Annotated data matrix.
- alphabet
Genetic code letters to be identified.
- id_length
Length of the Genetic Codes in the samples.
- inplace
Whether to update adata inplace or not.
- Return type
AnnData
,None
- Returns
Optional[AnnData] – Returns or updates adata with updated names of observations, and names of identified sample batches added as column “sample_batch” to .obs.