Question: Modifying or writing a FCS file in R using the FlowCore package
1
gravatar for vonskopnik
9 months ago by
vonskopnik10
vonskopnik10 wrote:

Dear Community,

I am interest in how to modify of write a FCS file in R, in a way that I edit a flowframe and then save it to a FCS file. I think writing it from scratch is harder, so I would start with an existing file and modify it.

What I would like to do is to enter scRNAseq data into the FCS file so that I or others can explore the data with FlowJo as if it was data from flow cytometry. What I managed by myself is to modify the "exprs"-slot of the FCS file, save the FCS file and open it in FlowJo. In order to keep the file consistent (or correct) one has to modify the meta data as well (e.g. giving channel names and descriptions and so on). This appears rather tedious to me and it would probably take a bit of time to figure out the pitfalls of it.

I wonder if anyone could some code snippets for or a larger block of code to do this job. Alternatively, I am also happy to hear another approach of how to do this. Or, alternatively again, let me know if this idea does not make sense to you.

Chris.

ADD COMMENTlink written 9 months ago by vonskopnik10
2

use flowFrame constructor

see example https://github.com/RGLab/flowCore/blob/trunk/tests/testthat/test-IO.R#L268-L277

You will need the latest Bioc devel or github trunk version of flowCore.

ADD REPLYlink written 9 months ago by Jiang, Mike1.2k

Great, that seems indeed to be rather useful.

Is it also possible to remove or add columns / channels completely?

ADD REPLYlink written 9 months ago by vonskopnik10

For an extensive example, take a look at the function cytof_addToFCS of cytofkit

ADD REPLYlink modified 9 months ago • written 9 months ago by SamGG190
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 185 users visited in the last hour