File Exchange

image thumbnail

writeFCS(fname, DATA, TEXT, OTHER)

version (19.6 KB) by Jakub Nedbal
writeFCS creates FCS file specified by Data File Standard for Flow Cytometry


Updated 05 Jun 2015

View License

writeFCS is a Matlab function for creating FCS files specified by Data File Standard for Flow Cytometry version 3.1. The function is designed to be easy to use and to be highly forgiving in terms of accuracy of the user-supplied input data. It only requires the source dataset to automatically create an FCS file with optimal settings. It also provides the opportunity to manually specify the TEXT section of the FCS file. For the required parts of the TEXT section, the function parses the user-supplied data and corrects them automatically to comply with the FCS version 3.1 data standard. It gives warnings, when conflict in compliance is detected. Non-required parts of TEXT are still exported but they are not checked for compliance.

Cite As

Jakub Nedbal (2020). writeFCS(fname, DATA, TEXT, OTHER) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Jakub Nedbal

Hello Angela,

I have upgraded the submission with a newer code. Try it out.

I am not sure I understand your question. Say you have 2 channels (FITC & PE) and 3 parameters per channel (Area, Maximum, Width).
TEXT.PnN = {'FITC', 'PE'};

writeFCS(fname, DATA, TEXT)
should work. Please correct me if it does not give you the desired outcome.

If you ran into a bug, feel free to use email firstname(dot)lastname
(at)kcl(dot)ac(dot)uk and I will try to fix it. I am sure the code is buggy and requires refinement.

Angela Pisco

Hi Jakub,

thanks for sharing this! Would you be able to give me an example of how to write the text structure?

I've a time course experiments and I'd like to be able to add custom names to the channel ids.



Fixed passing on of TEXT struct without TEXT.BYTEORD field.

Added a README file. Updated submission picture to white background.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux