cytonormpy.mad_comparison_from_fcs#
- cytonormpy.mad_comparison_from_fcs(input_directory, original_files, normalized_files, norm_prefix='Norm_', channels=None, cell_labels=None, groupby=None, truncate_max_range=False, transformer=None)#
This function is a wrapper around mad_from_fcs that directly combines the normalized and unnormalized dataframes. Currently only works if the normalized and unnormalized files are in the same directory.
- 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.original_files (
Union[list[str],str]) – A list of original files ending with .fcs.normalized_files (
Union[list[str],str]) – A list of normalized files ending with .fcs.norm_prefix (
str) – The prefix of the normalized files.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.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.