Skip to main content

Flow Cytometry Toolkit

Project description

FlowKit

PyPI license PyPI version Build Status

Overview

FlowKit is an intuitive Python toolkit for flow cytometry analysis and visualization, including GatingML 2.0 support. Features include:

  • Reading Flow Cytometry Standard data (FCS files), including FCS versions:
    • 2.0
    • 3.0
    • 3.1
  • Exporting FCS data in any of the following formats:
    • A new FCS 3.1 file, with modified metadata and/or filtered events
    • NumPy array
    • Pandas DataFrame
    • CSV text file
  • Compensating FCS events using spillover matrices in multiple formats:
    • As the $SPILL or $SPILLOVER keyword value format
    • FlowJo tab-delimited text format
    • NumPy array
    • GatingML 2.0 spectrumMatrix XML element
  • Tranformation of original or compensated events in a variety of transforms used in the flow community:
    • Logicle
    • Inverse hyperbolic sine (arcsinh)
    • Hyperlog
    • Logarithmic
    • Channel ratios
    • Linear
  • Optional, automatic filtering of negative scatter events and/or anomalous events
  • Visualizing FCS event data:
    • Histogram of single channel data with a Gaussian kernel density estimate curve
    • Contour density plot of two channels
    • Interactive scatter plot of two channels
    • Interactive scatter plot matrix of any combination of channels
Screenshot of scatterplot

Requirements

FlowKit supports Python version 3.6 or above. All dependencies are installable via pip, and are listed below.

Note: FlowKit and FlowUtils use C extensions for significant performance improvements relating to various tranformations. If using gcc, version 5 or above is required for correct Logicle and Hyperlog transformations.

Required Python dependencies:

  • flowio >= 0.9.5
  • flowutils >= 0.7.1
  • numpy >= 0.15
  • scipy >= 1.0
  • pandas >= 0.19
  • matplotlib >= 3.0
  • seaborn >= 0.9
  • bokeh >= 1.0
  • lxml >= 4.2
  • anytree >= 2.4

Installation

From PyPI

pip install flowkit

From source

git clone https://github.com/whitews/flowkit
cd flowkit
python setup.py install

Usage

Click on the links below to a few Jupyter notebooks that demonstrate basic usage of the library. Note, the interactive scatterplots do not render on Github. Clone the repo (or download the example notebooks), and run them locally to see the fully interactive plots.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FlowKit-0.2.2.tar.gz (37.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page