flowio
Skill này làm gì
Skill này cho agent của bạn FlowIO, một thư viện Python nhẹ để đọc và ghi file Flow Cytometry Standard. Skill dành cho nhà khoa học phòng thí nghiệm và người xây dựng quy trình dữ liệu làm việc với dữ liệu đo tế bào dòng chảy.
Khi nào nên dùng
- ✓Khi bạn cần mở một file FCS để đọc siêu dữ liệu hoặc tên kênh.
- ✓Khi bạn muốn xuất các sự kiện đo tế bào dòng chảy sang CSV hoặc bảng dữ liệu.
- ✓Khi bạn cần tách một file chứa nhiều tập dữ liệu.
Liên kết skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/scientific/flowio/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Mở file FCS này, liệt kê tên các kênh và lưu dữ liệu sự kiện ra file CSV.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tải file FCS bằng FlowIO, đọc phần đầu và các sự kiện, rồi trả về dưới dạng mảng NumPy hoặc bảng. Sau đó nó có thể lưu dữ liệu sang định dạng khác.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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. The library supports FCS versions 2.0, 3.0, and 3.1, making it ideal for backend services, data pipelines, and basic cytometry file operations.
When to Use This Skill
This skill should be used when:
- FCS files requiring parsing or metadata extraction
- Flow cytometry data needing conversion to NumPy arrays
- Event data requiring export to FCS format
- Multi-dataset FCS files needing separation
- Channel information extraction (scatter, fluorescence, time)
- Cytometry file validation or inspection
- Pre-processing workflows before advanced analysis
Related Tools: For advanced flow cytometry analysis including compensation, gating, and FlowJo/GatingML support, recommend FlowKit library as a companion to FlowIO.
Installation
uv pip install flowio
Requires Python 3.9 or later.
Quick Start
Basic File Reading
from flowio import FlowData
# Read FCS file
flow_data = FlowData('experiment.fcs')
# Access basic information
print(f"FCS Version: {flow_data.version}")
print(f"Events: {flow_data.event_count}")
print(f"Channels: {flow_data.pnn_labels}")
# Get event data as NumPy array
events = flow_data.as_array() # Shape: (events, channels)
Creating FCS Files
import numpy as np
from flowio import create_fcs
# Prepare data
data = np.array([[100, 200, 50], [150, 180, 60]]) # 2 events, 3 channels
channels = ['FSC-A', 'SSC-A', 'FL1-A']
# Create FCS file
create_fcs('output.fcs', data, channels)
Core Workflows
Reading and Parsing FCS Files
The FlowData class provides the primary interface for reading FCS files.
Standard Reading:
from flowio import FlowData
# Basic reading
flow = FlowData('sample.fcs')
# Access attributes
version = flow.version # '3.0', '3.1', etc.
event_count = flow.event_count # Number of events
channel_count = flow.channel_count # Number of channels
pnn_labels = flow.pnn_labels # Short channel names
pns_labels = flow.pns_labels # Descriptive stain names
# Get event data
events = flow.as_array() # Preprocessed (gain, log scaling applied)
raw_events = flow.as_array(preprocess=False) # Raw data
Memory-Efficient Metadata Reading:
When only metadata is needed (no event data):
# Only parse TEXT segment, skip DATA and ANALYSIS
flow = FlowData('sample.fcs', only_text=True)
# Access metadata
metadata = flow.text # Dictionary of TEXT segment keywords
print(metadata.get('$DATE')) # Acquisition date
print(metadata.get('$CYT')) # Instrument name
Handling Problematic Files:
Some FCS files have offset discrepancies or errors:
# Ignore offset discrepancies between HEADER and TEXT sections
flow = FlowData('problematic.fcs', ignore_offset_discrepancy=True)
# Use HEADER offsets instead of TEXT offsets
flow = FlowData('problematic.fcs', use_header_offsets=True)
# Ignore offset errors entirely
flow = FlowData('problematic.fcs', ignore_offset_error=True)
Excluding Null Channels:
# Exclude specific channels during parsing
flow = FlowData('sample.fcs', null_channel_list=['Time', 'Null'])
Extracting Metadata and Channel Information
FCS files contain rich metadata in the TEXT segment.
Common Metadata Keywords:
flow = FlowData('sample.fcs')
# File-level metadata
text_dict = flow.text
acquisition_date = text_dict.get('$DATE', 'Unknown')
instrument = text_dict.get('$CYT', 'Unknown')
data_type = flow.data_type # 'I', 'F', 'D', 'A'
# Channel metadata
for i in range(flow.channel_count):
pnn = flow.pnn_labels[i] # Short name (e.g., 'FSC-A')
pns = flow.pns_labels[i] # Descriptive name (e.g., 'Forward Scatter')
pnr = flow.pnr_values[i] # Range/max value
print(f"Channel {i}: {pnn} ({pns}), Range: {pnr}")
Channel Type Identification:
FlowIO automatically categorizes channels:
# Get indices by channel type
scatter_idx = flow.scatter_indices # [0, 1] for FSC, SSC
fluoro_idx = flow.fluoro_indices # [2, 3, 4] for FL channels
time_idx = flow.time_index # Index of time channel (or None)
# Access specific channel types
events = flow.as_array()
scatter_data = events[:, scatter_idx]
fluorescence_da
Câu hỏi thường gặp
Những phiên bản FCS nào được hỗ trợ?
Skill cho biết FlowIO hỗ trợ FCS phiên bản 2.0, 3.0 và 3.1.
Nó có làm gating hoặc compensation không?
Skill cho biết các bước nâng cao đó nên dùng FlowKit, công cụ hoạt động cùng FlowIO.
Nó có ghi được file FCS mới không?
Có. Skill đề cập đến việc tạo file FCS mới từ dữ liệu sự kiện.
Chi tiết
Mô tả gốc của tác giả
Parse FCS (Flow Cytometry Standard) files v2.0-3.1. Extract events as NumPy arrays, read metadata/channels, convert to CSV/DataFrame, for flow cytometry data preprocessing.
Độ phổ biến
- Sao GitHub
- 33k
- Vị trí xếp hạng
- #8954
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
owasp-security
33kDạy agent hướng dẫn bảo mật OWASP cho ứng dụng web, API, di động, container và agent AI, để nhận ra các điểm yếu phổ biến và gợi ý cách sửa.
agent-management
33kCho phép agent của bạn tạo, liệt kê, cho ngủ đông, đánh thức, đổi tên và xóa các agent AI bằng dòng lệnh AI Maestro, quản lý vòng đời của từng agent.
agent-messaging
33kCho phép agent của bạn gửi, nhận và trả lời tin nhắn có chữ ký giữa các agent AI, dùng Agent Messaging Protocol, chủ yếu trên máy của bạn.
docs-search
33kCho phép agent của bạn tìm trong tài liệu code được tạo tự động, như chữ ký hàm, định nghĩa lớp và chú thích, để kiểm tra API thật trước khi sửa code.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.