FlowKit 1.3.0 is finally released! Major updates include support for NumPy 2+, OLS spectral compensation, and continuing to make the API more consistent. Please update your code if you rely on the Sample.get_channel_events() method to ensure you are retrieving the correct channel events. This method was changed to take channel label (or number) and not the channel index, consistent with other Sample methods.
Thanks to everyone who contributed to this release!
New features:
- Added new
SpectralMatrixclass for OLS spectral compensation. - The
Workspaceclass now supports OLS spectral compensation matrices for FlowJo 10 .wsp files. - Added
Workspacemethodarchive_results()for exporting analyzed data
to Feather files (see method docstring for more details). - Added
Workspaceconstructor keyword argumentfilename_as_idfor using FCS filesystem names for the sample id instead of the FCS $FIL metadata keyword (the default). - New keyword argument
col_orderadded toSample.get_events()method for specifying the column order and/or the subset of columns of channel data returned. - Added
Sampleconstructor keyword argumentuse_flowjo_labelsto convert PnN labels to FlowJo compatible labels (FlowJo substitutes any '/' characters for '_'). - Added keyword argument
use_flowjo_labelsto utility functionload_samples()as a pass-through to theSampleclass (see above description). - Added keyword argument
compensationto utility functionload_samples()as a pass-through to theSampleclass for specifying a compensation matrix to be applied to all loaded FCS files. - Added keyword argument
null_channel_listto utility functionload_samples()as a pass-through to theSampleclass for specifying a list of null channels to be applied to all loaded FCS files. - Support pathlib Path objects in utility function
load_samples(). - All relevant plot methods now take additional keyword arguments
widthandheightfor controlling figure size. - Added
hist_binsoption toplot_gate()method in bothSession&Workspaceclasses to control histogram bins (thanks to @takashi-yamanashi for the suggestion, see #249). - Added utility function
extract_fcs_metadatafor retrieving FCS metadata without parsing event data, significantly speeds up loading files for this use case (thanks to @salmansamson for the suggestion, see #270).
API changes:
- The
Sampleclass constructor keyword argumentcache_original_eventswas replaced by thepreprocessargument. Thepreprocessargument controls whether preprocessing is applied to the 'raw' data (retrievable via theSample.get_events()method withsource='raw'). See theSampleclass docstring for more information. - The value
origfor retrieving events in variousSamplemethods via thesourceargument is no longer valid. To retrieve unprocessed events set theSamplekeyword argumentpreprocessto False and use thesource='raw'option for event retrieval methods. - New
Sampleattributeis_preprocessedfor determining whether a Sample instance was loaded with or without preprocessing. - Changed the
Samplemethodget_channel_events()to take channel label (or number) and not the channel index, consistent with otherSamplemethods. Please update your code if you rely on this method to ensure you are retrieving the correct channel events. - The utility function
read_multi_dataset_fcs()optioncache_original_eventswas replaced withpreprocess. This reflects the same change in theSampleclass described above. - Renamed
Workspacekeyword argumentignore_missing_filestoload_missing_file_data(thanks to @ksebby for the suggestion, see #230). - Changed column name in
GatingResultsDataFrames from 'sample' to 'sample_id' (avoids confusion with the Pandas DataFrame.sample() method) - Revert FlowKit version 1.2
GatingResultsreport 'level', now indexed at 1, not 0 (base level of 1 is not root, but an actual gate).
Bug fixes:
- Fixed renaming a Quadrant of a
QuadrantGate. This previously failed to update the Quadrant 'id' andQuadrantGate'quadrant' key (see #243) - Raise ValueError in
Sampleclass ifchannel_labelskeyword argument is not specified when creating aSampleinstance from a NumPy array (thanks to @chillerb for PR #263)
Documentation:
- Updated the tutorial notebooks, with the transforms notebook getting an overhaul to better explain the transform parameters.
- The utility function
generate_transforms()is now included in the ReadTheDocs documentation.
Dependencies:
- Added support for Python 3.13 & 3.14
- Drop support for Python 3.9 (EOL as of Oct 2025)
- Support for NumPy 2+
- Updated FlowIO version to 1.4.0
- Updated FlowUtils version to 1.2.2
- Added dependency PyArrow for exporting analyzed
Workspaceresults to Feather files. - Other dependencies updated to versions supporting Python 3.9+ (see requirements.txt for details)