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.
- Parameters:
- Returns:
Returns or updates adata with updated names of observations, and names of identified sample batches added as column “sample_batch” to .obs.
- Return type:
Optional[AnnData]