Releases: whitews/FlowKit
1.3.2
1.3.1
1.3.0
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)
1.2.3
1.2.2
1.2.1
1.2.0
FlowKit 1.2.0 is out! Major updates include support for Boolean gates in FlowJo workspaces, renaming Sample channels and making the API more user-friendly. Thanks to everyone who contributed to this release, keep the bug reports and suggestions coming!
New features:
- Workspace class now supports Boolean gates when parsing a FlowJo workspace (see #179).
- Added
get_keywordsmethod to Workspace for getting sample keywords stored in a FlowJo workspace (see #210). - Workspace method
get_gate_eventsnow supports source kwarg to control pre-processing of returned events (see #196). - Session & GatingStrategy classes now support renaming gates via the
rename_gatemethod (see @219). - Session & GatingStrategy classes now support removing custom sample gates via the
sample_idkwarg in theremove_gatemethod (see #221). - Sample class now supports renaming channels via a new
rename_channelmethod (see #198). - Sample class methods
get_events,get_channel_eventsandas_dataframesupportevent_maskkwarg for filtering events using a Boolean array (see #218). - Sample class method
as_dataframesupports newcol_multi_indexoption to control column index type. - Matrix class now supports comparison operator for determining if 2 Matrix instances are the same (see #200).
- New utils module function
generate_transformsto generate a set of transforms for a Sample (see #162).
API changes:
- Transform class: removed
idattribute. This allows more convenient use of independently using transforms outside of a GatingStrategy (see #191). - GatingStrategy class: added transform_id arg to
add_transformmethod. - Session class: added transform_id arg to
add_transformmethod. - Workspace class:
get_transformsnow returns a dictionary LUT of transform IDs and transform instances. - Matrix class: removed
idattribute. This allows more convenient use of independently using matrices outside of a GatingStrategy (see #199). - Session class:
get_comp_matricesnow returns a dictionary LUT of matrix IDs and Matrix instances. - GatingResults class: the 'level' column of the report is now indexed at 0 (for root level).
Bug fixes:
- Ensure exporting of QuadrantGate raises NotImplementedError (see #209).
- Fixed plot_scatter error with 0 or 1 points (and 2 points with extent) (see #197).
- Better error for invalid gate names '.' & '..' (see #220).
Documentation:
- Added more informative docstrings for transforms
- Testing code reorganized to factor constants to new test config file (Thanks @ksebby for PR #213).
Dependencies:
- Drops Python 3.8 support (EOL as of Oct 2024).
- Updated dependency versions for compatibility w/ Python 3.9 - 3.12 (see requirements.txt for details).
1.1.2
1.1.1
1.1.0
Hey FlowKit community! Lots of changes in this release, including support for Python 3.11 & 3.12. The major updates: we've moved to a src based structure using pyproject.toml and finally converted all plotting functions to Bokeh (dropping matplotlib and Seaborn as requirements). Read the notes below for all the changes.
Special thanks to @hbhargava7 and @laserson for their contributions to this release!
New features:
- New utility function
read_multi_dataset_fcsfor reading FCS files with multiple data sets (returns a list of Sample instances). Workspaceclass now has an option to load FCS files from the URI parameter embedded in the WSP file (Many thanks to @hbhargava7 for PR #168).Sample.plot_scatter_matrixnow displays histograms along the diagonal (Thanks @laserson for the suggestion in #169).- Exporting FlowJo 10 workspaces now supports the
WSPBiexTransform. Sample.plot_scatteraddsevent_maskoption to filter the plotted events.Sample.plot_contours&Sample.plot_channelmethods now use Bokeh.- Custom heatmap color palette was improved (it's subtle but has better visual contrast between density levels).
API changes:
Sample.plot_histogrammethod addsdata_min,data_max, andx_rangekwargs for filtering data ranges and controlling the view range.- Removed argument
ignore_transformsinparse_wsputility function. - Transforms from a GatingML document are no longer imported as undocumented "GML" sub-classes, instead using the documented
Transformsub-classes. - Added kwarg
gate_pathtoplot_scattermethod in both Session & Workspace. sample_idargument now required forGatingStrategy.is_custom_gatemethod.- Rename
plot_scatterargumenthighlight_indicestohighlight_mask(since it takes a Boolean array and not a list of indices). plot_scatterargumentdim_idssplit tox_label&y_labelfor specifying axis labels.plot_gateargumentdim_idssplit tox_label&y_labelfor specifying axis labels.
Bug fixes:
- Fixed KeyError in
Workspace.summarymethod when a sample has no gates (see #155). - Fixed WSP export of "range"
RectangleGateinstances (see #157). - Fix
ValueErrorthrown when compensating a Sample specifying null channels vianull_channel_list(see #175). - Fix
Session.plot_scattermethod where mixed compensations are specified for x & y channels (rare).
Documentation:
- Switched to ReadTheDocs theme for documentation.
- Clarify docstrings for null channel usage (see Sample & Matrix constructor docs).
- All notebooks validated and updated for the new release.
Dependencies:
- Dropped support for Python 3.7, added support for Python 3.11 & 3.12.
- FlowIO updated to >=1.3.0,<1.4
- FlowUtils updated to >=1.1.0,<1.2
- Matplotlib & Seaborn removed as dependencies. All plotting now uses the Bokeh library (>=3.1).
- Pandas updated to >=2.0
- Added new dependency contourpy (the library matplotlib uses).
- Other dependency minimum versions updated for Python 3.8 - 3.12 support (See requirements.txt for details).