cytonormpy.mad_from_fcs

Contents

cytonormpy.mad_from_fcs#

cytonormpy.mad_from_fcs(input_directory, files, channels, cell_labels=None, groupby=None, truncate_max_range=False, origin=None, transformer=None)#

Function to evaluate the MAD on a given list of FCS-files.

Parameters:
  • input_directory (PathLike) – Path specifying the input directory in which the .fcs files are stored. If left None, the current working directory is assumed.

  • files (Union[list[str], str]) – A list of files ending with .fcs.

  • channels (Optional[Union`[:py:class:`list[str], Index]]) – A list of detectors to analyze.

  • labels (cell) – A dictionary of shape {file_name: [cell_label, cell_label, …]}. The cell labels will be added to the dataframe. If None, MADs will be calculated per file and channel.

  • groupby (Optional[Union`[:py:class:`list[str], str]]) – Specify on what the MADs should be grouped. Can be “file_name”, “label” or [“file_name”, “label”].

  • truncate_max_range (bool) – If True, FCS data will be truncated to the range specified in the PnR values of the file.

  • 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.DataFrame containing the MAD values per file or per file and cell_label.