alterlab-flowio

Solid

Parse and write FCS (Flow Cytometry Standard) files v2.0-3.1 with FlowIO — extract event data as NumPy arrays, read $-keyword metadata and channel/parameter definitions, and convert events to CSV or pandas DataFrame. Use when loading raw .fcs flow-cytometry files, inspecting channels and metadata, or preprocessing cytometry data for downstream gating and analysis. Part of the AlterLab Academic Skills suite.

Data & Documents 27 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# FlowIO: Flow Cytometry Standard File Handler ## Overview FlowIO is a lightweight Python library for reading and writing Flow Cytometry Standard (FCS) files. Parse FCS metadata, extract event data, and create new FCS files with minimal dependencies. Supports FCS versions 2.0, 3.0, and 3.1 — ideal for backend services, data pipelines, and basic cytometry file operations. ## When to Use This Skill Use this skill when: - FCS files require parsing or metadata extraction - Flow cytometry data needs conversion to NumPy arrays - Event data requires export to FCS format - Multi-dataset FCS files need separation - Channel information (scatter, fluorescence, time) must be extracted - Cytometry files need validation or inspection - Pre-processing is needed before advanced analysis **Related tool:** For advanced analysis (compensation, gating, FlowJo/GatingML support), recommend the **FlowKit** library as a companion to FlowIO. ## Installation ```bash uv pip install flowio ``` Requires Python 3.9 or later. ## Quick Start ```python from flowio import FlowData # Read FCS file and inspect flow = FlowData('experiment.fcs') print(f"FCS Version: {flow.version}") print(f"Events: {flow.event_count}") print(f"Channels: {flow.pnn_labels}") # Get event data as NumPy array, shape (events, channels) events = flow.as_array() ``` ```python import numpy as np from flowio import create_fcs # Write a new FCS file from a NumPy array. # Gotcha: create_fcs takes a WRITABLE BINARY FILE HANDLE ...

Details

Author
AlterLab-IEU
Repository
AlterLab-IEU/AlterLab-Academic-Skills
Created
2 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category