본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트51k · #3461

flowio

하는 일

FlowIO는 유세포 분석 데이터 파일(FCS)을 읽고 쓰는 도구입니다. 데이터에 대한 정보를 보고, 이벤트(측정 결과)를 추출할 수 있습니다.

사용하는 경우

  • ✓FCS 파일의 기본 세부 정보를 보고 싶을 때.
  • ✓세포 측정에서 원시 데이터를 추출해야 할 때.
  • ✓다른 분석이나 머신러닝을 위해 데이터를 준비할 때.

스킬 링크

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/flowio/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/flowio/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“‘example.fcs’ 파일을 읽고, 시간과 게인 스케일링을 적용해 이벤트 데이터를 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

FlowIO는 FCS 파일을 읽어 헤더 정보와 이벤트 데이터를 나눕니다. 이벤트를 숫자 배열로 보여 주며, 파일에 정의된 변환을 선택적으로 적용할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

FlowIO

Purpose

Use FlowIO as a lightweight, low-level reader and writer for Flow Cytometry Standard files. Examples in this skill target FlowIO 1.4.0, the current stable release verified on 2026-09-30. Standalone FlowIO checks used Python 3.13, NumPy 2.5.3, and pandas 3.0.6.

FlowIO is appropriate for:

  • Reading FCS 2.0, 3.0, and 3.1 files
  • Inspecting HEADER, TEXT, ANALYSIS, and channel metadata
  • Retrieving event data as a two-dimensional NumPy array
  • Reading legacy files that contain multiple datasets
  • Writing list-mode, single-precision FCS 3.1 files
  • Preparing data for pandas, machine-learning, or downstream cytometry tools

FlowIO does not perform compensation, logicle/biexponential transforms, gating, clustering, or FlowJo workspace processing. Use FlowKit or another analysis package for those tasks.

Install

Create or activate a Python environment, then install the verified release:

uv pip install "flowio==1.4.0"

Confirm the runtime version:

uv run python -c "import flowio; print(flowio.__version__)"

FlowIO 1.4.0 supports Python 3.9 through 3.13 and depends on NumPy.

Operating Workflow

  1. Clarify the operation. Distinguish metadata inventory, event extraction, file repair, conversion, and downstream biological analysis.
  2. Inspect before loading events. Use only_text=True for metadata-only work, especially with large or unfamiliar files.
  3. Choose event semantics explicitly. Use as_array(preprocess=True) for gain/log/time scaling from FCS metadata, or preprocess=False for decoded DATA values without those scaling steps. Record the choice.
  4. Keep parsing strict by default. Do not automatically suppress offset errors. Relax checks only for a known vendor-format defect, and review the resulting event data.
  5. Treat metadata as potentially sensitive. FCS TEXT values can include sample, subject, operator, and instrument identifiers. Export only fields needed for the task.
  6. Validate writes by reopening them. Check event/channel counts, labels, metadata, and representative values after any FCS export.

Critical Semantics

TEXT keys are normalized

FlowData.text stores keys in lowercase and strips the leading $ from standard FCS keywords:

from flowio import FlowData

flow = FlowData("sample.fcs", only_text=True)
acquisition_date = flow.text.get("date")
instrument = flow.text.get("cyt")
next_dataset = int(flow.text.get("nextdata", "0"))

Do not look up "$DATE", "$CYT", or other uppercase dollar-prefixed keys. TEXT values remain strings. FlowIO 1.4.0 also removes every $ character from the decoded TEXT segment, including $ characters inside values; preserve the original file when exact metadata fidelity matters.

Events have two representations

  • flow.events is the decoded, flattened one-dimensional event array. Integer parsing already applies PnR range masks; this is not a byte-level copy of the original DATA words.
  • flow.as_array() returns a NumPy float64 array with one column per channel. For valid input its shape is (event_count, channel_count), but FlowIO infers rows from DATA and does not enforce $TOT; check the shape.
  • flow.as_array(preprocess=True) applies FCS gain, logarithmic, and time scaling. It does not apply compensation or logicle/biexponential display transforms.
  • flow.as_array(preprocess=False) reshapes the decoded event values without those scaling steps. A recognized, non-null Time channel (case-insensitive) has its gain forced to 1.0 by FlowIO; timestep still applies when preprocessing.

as_array() creates another in-memory array. FlowIO does not provide chunked or memory-mapped event access.

Channel numbering uses two conventions

  • NumPy columns and fluoro_indices, scatter_indices, and time_index use zero-based indices.
  • flow.channels uses FCS parameter numbers beginning at 1.
  • null_channels contains the PnN label strings supplied through null_channel_list, including supplied labels that were not found.
  • pns_labels always matches pnn_labels in length; missing optional PnS labels appear as empty strings.

Writing is intentionally limited

create_fcs() requires:

  • An already-open binary file handle
  • Flattened one-dimensional event data in row-major event/channel order
  • One PnN name per channel
  • Optional PnS names and string-valued metadata via metadata_dict

…

자주 묻는 질문

FCS 파일이란 무엇인가요?

FCS(Flow Cytometry Standard)는 유세포 분석 데이터, 즉 세포 측정 결과를 저장하는 표준 형식입니다.

FlowIO가 하지 않는 일은 무엇인가요?

보상(compensation), 로지클 변환, 게이팅(세포 집단 선택), FlowJo 파일 처리 같은 복잡한 분석은 하지 않습니다. 이런 작업에는 다른 도구가 필요합니다.

FlowIO를 써야 할지 어떻게 알 수 있나요?

메타데이터 확인이나 원시 데이터 추출처럼 낮은 수준의 읽기와 쓰기 작업에는 FlowIO가 적합합니다. 더 고급 분석에는 다른 도구를 찾아보는 것이 좋습니다.

상세 정보

작성자의 원본 설명

Reads, inspects, and writes Flow Cytometry Standard (FCS) 2.0, 3.0, and 3.1 files with FlowIO. Use for low-level FCS metadata and channel inspection, NumPy event extraction, multi-dataset files, table export, and FCS 3.1 creation; use FlowKit for compensation, cytometry transforms, gating, or FlowJo workspaces.

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3461
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬