dilimap.utils.map_dili_labels_and_cmax
- dilimap.utils.map_dili_labels_and_cmax(data, obs_key=None, labels=None, insert_at_front=None)
Annotate an AnnData or pandas.DataFrame with selected DILI labels and Cmax values.
- Parameters:
data (anndata.AnnData or pandas.DataFrame) – The data to annotate. Uses obs_names (AnnData) or index/column (DataFrame) to map compound names.
obs_key (str, optional) – If provided, use data.obs[obs_key] or data[obs_key] to map compound names instead of index.
labels (list of str, optional) – List of columns to map. Options include: - ‘DILI_label’, ‘DILIrank’ (from DILI dataset) - ‘Cmax_uM’, ‘free_Cmax_uM’ (from Cmax dataset) - ‘LDH_IC10_uM’ (from cytotoxicity dataset) If None, all available columns will be added.
- Returns:
Modifies
data.obs(AnnData) ordata(DataFrame) in-place.- Return type:
None