02-19-2018 10:59 AM
I am trying to convert a TDMS file to a .fcs file, which is used in flow cytometry.
I am having trouble implementing this in LabVIEW, my main confusion is due to data types:
I have a 2D array of DOUBLEs, which I get from the TDMS file. According to the specifications, data in a .fcs file can be stored in multiple ways, including as "unsigned binary integers" and doubles (see page 14).
I am writing the HEADER and TEXT segment to a binary file as strings, which should be fine.
But how do I write the 2D array?
Ideally I want the datatype in the file to be DOUBLE, which I can specify by setting the keyword '$DATATYPE' to the value 'D'. Does this mean I can just wire the 2D array into the "data" port of the "Write to binary file"-subvi? Surely not, since the array will also write some array specific delimiters which will corrupt the bit stream of my data to give 'ghost values'.
In the attached vi, I rearrange the 2D array into a 1D array, by appending the rows of the array one after the other. Then I type cast this into a string, which gives me a pure ASCII qword (64 bits) for each number. Is this how it should be done? I've reached the llimit of my interpretation of the documentation (in the link above) and can still not get my files to be recognised by file readers (such as this one).
Kind Regards
04-09-2018 09:50 AM - edited 04-09-2018 09:51 AM
Hi,
did you have a look at the FCS 3.0 DataPlugin? http://www.ni.com/example/27643/en/
Using DataPlugins: http://www.ni.com/tutorial/11951/en/
Greetings
10-26-2021 04:16 AM
Hi Dough,
Did you manage? I tired the data plugin as well. At first it seemed to work but then when I tired to open the file using FloJo or another cytometry analysis program, the replied there were no events in the distribution.
You seemed to be on the right track.
Best regards,Arjan
10-27-2021 04:33 AM
I did try the data plugin but I ended up with 0 events when opened in FlowJo. There is little documentation on this specific plugin. Do you know who wrote this software?
05-16-2023 05:01 AM
Hi, Have you soulved that?I have the same problems
05-17-2023 08:01 AM
Reading is fine now. I did not continue trying to write an FCS.
05-19-2023 08:58 AM
Thanks for reply!Great to hear that. Can you show your VI?