Skip to main content

add_column

Function add_column 

Source
pub fn add_column(
    fcs: Fcs,
    path: impl AsRef<Path>,
    column_name: &str,
    values: Vec<f32>,
) -> Result<Fcs>
Expand description

Create a new FCS file by adding a column (parameter) to existing data

This is useful for adding QC results (e.g., a boolean column indicating good/bad events) or other event-level annotations.

§Arguments

  • fcs - The FCS struct to modify
  • path - Output file path
  • column_name - Name of the new parameter
  • values - Values for the new parameter (must match number of events)

§Errors

Returns an error if:

  • The values length doesn’t match the number of events
  • The column name already exists
  • The file cannot be written