cytonormpy.CytoNorm.calculate_mad

cytonormpy.CytoNorm.calculate_mad#

CytoNorm.calculate_mad(groupby=None, cell_labels=None, files='validation')#

Calculates the MAD on the normalized and unnormalized samples.

Parameters:
  • groupby (Optional[Union`[:py:class:`list[str], str]]) – Determines the grouping.

  • cell_labels (Optional[Union`[:py:class:`str, dict]]) – If an anndata object was used, pass a string referring to the respective .obs column. If FCS files were used, pass a dictionary of shape {file_name: [label1, label2,…, labeln]}. Labels will be annotated to the data and can be used in groupby.

  • files (Literal['validation', 'all']) – Can be any of ‘validation’ or ‘all’. Specifies for which file set the EMD values are calculated on. Defaults to ‘all’.

Return type:

None

Returns:

  • None.

  • Will add an attribute .mad_frame that can be accessed,

  • containing an index with ‘file_name’, ‘origin’ and ‘label’.

  • If no labels have been passed, ‘label’ will only contain the

  • entry ‘all_cells’.