FACSPy.dt.create_panel_from_fcs

FACSPy.dt.create_panel_from_fcs#

FACSPy.dt.create_panel_from_fcs(input_directory, as_frame=False, save=True, overwrite=False)#

Creates a Panel object from all .fcs files within a directory. The table will contain the channel names and the antigens stored in the FCS file. Note that all .fcs files have to contain the same panel, as only the first .fcs file is read and analyzed.

Parameters:
  • input_directory (Optional[str]) – The directory to be used. If no input_directory is specified, the current working directory is used.

  • as_frame (bool) – Whether to return the panel as a pandas dataframe

  • save (bool) – Whether to save the panel in the input_directory. Defaults to True. Will create a file called panel.csv.

  • overwrite (bool) – Whether to overwrite the file panel.csv, if the file already exists. Defaults to False

Return type:

If as_frame==True a DataFrame, else a Panel object

Examples

>>> import FACSPy as fp
>>> metadata = fp.create_empty_metadata() # will read all file names with `.fcs` in the current working directory
>>> fp.create_dataset(
...     metadata = metadata,
...     ...
... )