Skip to main content

Module write

Module write 

Source
Expand description

FCS file writing utilities

This module provides functionality to write FCS files to disk, including:

  • Duplicating existing files
  • Editing metadata and persisting changes
  • Creating new FCS files with data modifications (filtering, concatenation, column addition)

§Memory-Mapping Implications

Important: When writing FCS files, the original memory-mapped file is not modified. All write operations create new files. The original Fcs struct remains valid and can continue to access the original file via memory-mapping until it’s dropped.

When you call write_fcs_file() or any of the modification functions:

  1. The data is read from the DataFrame (which is already in memory)
  2. A new file is created on disk
  3. The original memory-mapped file remains unchanged

This means:

  • You can safely write modified versions without affecting the original
  • The original Fcs struct can still be used after writing
  • No special handling is needed to “close” or “unmap” before writing
  • Multiple writes can happen concurrently from the same source file

Functions§

add_column
Create a new FCS file by adding a column (parameter) to existing data
concatenate_events
Create a new FCS file by concatenating events from multiple files
duplicate_fcs_file
Duplicate an existing FCS file to a new path
edit_metadata_and_save
Edit metadata and persist changes to disk
filter_events
Create a new FCS file by filtering events
write_fcs_file
Write an FCS file to disk