FACSPy.dt.create_empty_metadata

FACSPy.dt.create_empty_metadata#

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

Creates a Metadata object from all .fcs files within a directory. The table will contain a sample_ID and the file_names.

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 metadata as a pandas dataframe

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

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

Return type:

If as_frame==True a DataFrame, else a Metadata 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,
...     ...
... )