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.
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.
Use this skill when:
Related tool: For advanced analysis (compensation, transformation, gating, FlowJo 10 workspace import), recommend the FlowKit library (1.3.2 as of 2026-09), which is built on FlowIO by the same author.
| Scenario | Use Instead |
|---|---|
| Compensation, transforms, gating, or FlowJo/GatingML workspaces | FlowKit (companion library, not a skill in this suite) |
| Clustering / dimensionality reduction of cytometry events | alterlab-scanpy, alterlab-umap |
| Statistical comparison of populations across samples | alterlab-statistical-analysis |
| Mass-cytometry or imaging-based spatial single-cell data | alterlab-squidpy-spatial |
| Registering and versioning the FCS files themselves | alterlab-lamindb |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-scanpy) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
uv pip install flowio # 1.4.0 as of 2026-09
Requires Python 3.9 or later; NumPy is the only runtime dependency.
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()
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 (not a path) and a
# FLATTENED 1-D event array — pass data.flatten(), not the 2-D matrix.
data = np.array([[100, 200, 50], [150, 180, 60]], dtype='float32') # 2 events, 3 channels
with open('output.fcs', 'wb') as fh:
create_fcs(fh, data.flatten(), ['FSC-A', 'SSC-A', 'FL1-A'])
FlowData('file.fcs') instance. Use only_text=True
for metadata-only (memory-efficient) reads; pass offset/null-channel flags
for problematic files.flow.version, flow.event_count, flow.pnn_labels,
flow.pns_labels, channel-type indices, and the flow.text metadata dict.flow.as_array() (preprocessed) or
flow.as_array(preprocess=False) (raw). Slice by channel type as needed.flow.write_fcs(path, ...) (takes a path) or create_fcs(fh, data.flatten(), ...) (takes a binary file handle + flattened events). Output
is always FCS 3.1, single-precision float.read_multiple_data_sets() instead of the constructor.references/api_reference.md.references/workflows.md for full code.references/recipes.md.references/error-handling-and-troubleshooting.md.references/api_reference.md — Complete FlowData class, utility functions
(read_multiple_data_sets, create_fcs), exception classes, FCS file
structure, common TEXT-segment keywords, channel types, and example workflows.references/workflows.md — Full code for the core operations: reading/parsing,
metadata & channel extraction, creating files, exporting/modifying,
multi-dataset handling, and data preprocessing.references/recipes.md — Worked examples: inspecting contents, batch
processing a directory, FCS→CSV conversion, event filtering & re-export, and
channel extraction with statistics.references/error-handling-and-troubleshooting.md — Exception-handling
patterns, best practices, FCS file-structure notes, a troubleshooting table,
and integration notes (NumPy, pandas, FlowKit, web apps).FlowIO provides essential FCS file handling for flow cytometry workflows — use it for parsing, metadata extraction, and file creation. For simple file operations and data extraction, FlowIO alone is sufficient; for complex analysis (compensation, gating), integrate with FlowKit or other specialized tools.
Part of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job