cytonormpy.emd_from_anndata#
- cytonormpy.emd_from_anndata(adata, file_list, channels, layer, sample_identifier_column='file_name', cell_labels=None, origin=None, transformer=None)#
Function to evaluate the EMD on an AnnData file.
- Parameters:
adata (
AnnData) – The AnnData objectfile_list (
Union[list[str],str]) – A list of files. Used in conjunction with sample_identifier_column.channels (
Optional[list[str]]) – A list of detectors to analyze.layer (
str) – The layer where the data are stored.sample_identifier_column (
str) – Specifies the column in adata.obs in which the samples are identified.labels (cell) – Specifies the column in adata.obs containing cell labels. The cell labels will be added to the dataframe. If None, MADs will be calculated per file and channel.
groupby – Specify on what the MADs should be grouped. Can be “file_name”, “label” or [“file_name”, “label”].
origin (
Optional[str]) – Annotates the files with their origin, e.g. ‘original’ or ‘normalized’.transformer (
Optional[Transformer]) – An instance of the cytonormpy transformers.
- Return type:
A
pandas.DataFramecontaining the MAD values per file or per file and cell_label.