View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Flow Cytometry Data Reader and Visualization

4.2 | 9 ratings Rate this file 65 Downloads (last 30 days) File Size: 189 KB File ID: #8430 Version:
image thumbnail

Flow Cytometry Data Reader and Visualization


Robert Henson (view profile)


06 Sep 2005 (Updated )

Flow Cytometry Data Reader and Visualization Example

| Watch this File

File Information

This includes a function to read in the standard flow cytometry FCS format data and examples of how to visualize the data.


This file inspired Flow Plot, Tactics Toolbox, and Ratiometric Fret.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
15 Jan 2017 yqf229118

very good,

03 Nov 2016 Ian Williamson

Will the fcsread function work for fcs3.0 file type?

Comment only
04 Aug 2016 Peyman Obeidy

I get this error

Error using reshape
Size arguments must be real integers.

Error in fcsread (line 81)
textHeader = reshape(textCell,2,numel(textCell)/2)';

Comment only
02 Aug 2016 Chad Greene

Chad Greene (view profile)

The dscatter function is insanely fast and well written. It's beautifully documented and easy to use.

I used dscatter on a 1.5 million point dataset and the only bottleneck in processing is Matlab's scatter command. So I replaced the line of code which calls scatter and instead I'm using Aslak Grinsted's fastscatter, which is available on File Exchange. Here's what I replaced it with:

h = fastscatter(X,Y,col,'markersize',msize);

Now, dscatter takes 0.37 seconds to calculate and plot 1.5 million points. That's quite good.

The input parser wasn't detecting my request to set the marker size, so I added this to line 105:

tmp = strcmpi(varargin,'msize');
if any(tmp)
msize = varargin{find(tmp)+1};
msize = 10;

Thanks for writing and sharing this clever, efficient code, Robert!

27 Jun 2016 Martin Ziegler

I am getting an error, when using the dscatter function:
Error using histc
Edge vector must be monotonically non-decreasing

Any idea on what might be causing it?

Comment only
25 Feb 2016 Ruben

Ruben (view profile)

20 Jan 2016 Raphael

The file return errors for input with NaN values (not necessary a bad thing).

05 May 2014 F Poelwijk

05 May 2014 F Poelwijk

29 Jul 2013 arnold

arnold (view profile)

cool, but I cannot seem to set the marker size or non filled markers. Works fine with 'plot' mesh or grid, but not with 'msize:
>> h = dscatter(X, Y, 'msize', 20);
Error using scatter (line 53)
Too many input arguments.

Error in dscatter (line 170)
h =

It would also be nice if one could generate a gapless 2D image/array with the "density" as entries. Like the 2d projection of what ('plot', 'surf') actualy gives you.

On top of that I'd recommend catching the input "error" of horizontal vectors instead of vertical. It gives the user an error about equal sizes, you should just check for that and rotate the vectors if necessary ;)

28 Feb 2013 Raz Shimoni

13 Sep 2005 Sean Wang

Finally! I've been waiting for a long time

23 Jul 2013 1.1

Add BSD license

01 Sep 2016

Updated license

Contact us