cytonormpy.CytoNorm.run_fcs_data_setup

cytonormpy.CytoNorm.run_fcs_data_setup#

CytoNorm.run_fcs_data_setup(metadata, input_directory, reference_column='reference', reference_value='ref', batch_column='batch', sample_identifier_column='file_name', channels='markers', n_cells_reference=None, truncate_max_range=True, output_directory=None, prefix='Norm')#

Method to setup the data handling for FCS data. Will instantiate a DataHandlerFCS object.

Parameters:
  • metadata (Union[DataFrame, PathLike]) – A table containing the file names, the batch and the reference information. Expects the columns file_name, batch and reference where reference must contain ref for reference samples and other for non-reference samples. Can be provided as a DataFrame or a path.

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

  • reference_column (str) – The column in the metadata that specifies whether a sample is used for reference and is therefore present in all batches. Defaults to ‘reference’.

  • reference_value (str) – Specifies the value that is considered a reference. Defaults to ‘ref’.

  • batch_column (str) – The column in the metadata that specifies the batch. Defaults to ‘batch’.

  • sample_identifier_column (str) – Specifies the column in the metadata that is unique to the samples. Defaults to ‘file_name’.

  • n_cells_reference (Optional[int]) – If there are no reference samples for a batch, this number will define how many cells from a batch are subsampled to comprise the new reference file.

  • channels (Union[list[str], str, Literal['all', 'markers']]) – Can be a list of detectors (e.g. BV421-A), a single channel or ‘all’ or ‘markers’. If markers, channels containing ‘FSC’, ‘SSC’, ‘Time’, ‘AF’ and CyTOF technicals will be excluded.

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

  • output_directory (Optional[PathLike]) – Path specifying the output directory in which the .fcs files are saved to. If left None, the current input directory is assumed.

  • prefix (str) – The prefix that are prepended to the file names of the normalized fcs files.

Return type:

None, appends ._datahandler attribute.