{"id":23721,"library":"fcswrite","title":"fcswrite","description":"A lightweight library for writing Flow Cytometry Standard (FCS) files from Python. Current version 0.6.4, requires Python >=3.6. The library is in maintenance mode with infrequent releases.","status":"maintenance","version":"0.6.4","language":"python","source_language":"en","source_url":"https://github.com/wspr/fcswrite","tags":["flow cytometry","fcs","bioinformatics"],"install":[{"cmd":"pip install fcswrite","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"fcswrite is a module, not a package; the correct import is 'from fcswrite import fcswrite' to get the write_fcs function.","wrong":"import fcswrite","symbol":"fcswrite","correct":"from fcswrite import fcswrite"}],"quickstart":{"code":"from fcswrite import fcswrite\nimport numpy as np\n\n# Create some data (events x channels)\ndata = np.array([[1, 2], [3, 4], [5, 6]], dtype=np.float32)\n\n# Channel names\nchnames = ['FSC', 'SSC']\n\n# Write FCS file\nfcswrite.write_fcs('test.fcs', chnames, data)\nprint('FCS file written successfully.')","lang":"python","description":"Minimal example to write an FCS file with two channels and three events."},"warnings":[{"fix":"Use: from fcswrite import fcswrite; fcswrite.write_fcs(...)","message":"The function is named 'write_fcs' but must be accessed via 'fcswrite.write_fcs' after 'from fcswrite import fcswrite'.","severity":"gotcha","affected_versions":"all"},{"fix":"For FCS 3.0+ support, consider other libraries like 'flowio' or 'fcsy'.","message":"The library does not support writing FCS 3.0 or later versions; it only writes FCS 2.0 files.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from fcswrite import fcswrite","cause":"Incorrect import: using 'import fcswrite' instead of 'from fcswrite import fcswrite'","error":"AttributeError: module 'fcswrite' has no attribute 'write_fcs'"},{"fix":"Provide all three positional arguments: write_fcs('output.fcs', ['FSC','SSC'], data_matrix)","cause":"Calling write_fcs without all required arguments (filename, chnames, data).","error":"TypeError: write_fcs() missing 1 required positional argument: 'data'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}