Hi,
I am trying to read a FCS 3.0 file that contains multiple samples taken from several plates using read.ncdfFlowSet
The error message I get is:
1: The file contains 48 additional data segments.
The default is to read the first segment only.
Please consider setting the 'dataset' argument.
After reading the documentation of flowCore I understood that I need to specify which data segment I want to read. However, I know that I can read multiple flowframes if each of them is saved as a file on its own.
So I was wondering, is there a way to either: 1. Load all the samples that are in the FCS 3.0 file all at once into a flow set? 2. If not, can the FCS file be split into individual files, so that they can be read into a single flow set?
Thank you,
multiple data segments in a single file
You could also of course add more descriptive names than
dataset_n
to the FCS for each data segment.Thank you for the quick reply, I will try it out. and thank you for mentioning that cytoset replaces ncdFlowSet. I've been going through the packages and I find it hard to understand which package (and command) replaces other old packages and commands....
I've installed the packaged via BiocManager. But I had to use R 3.3.3 which probablty means I am not using the latest bioconductor. I will look into upgrading to R 4.0.
The current versions that are installed:
flowCore 1.52.1 flowWorkspace 3.34.1 flowStats 3.44.0 openCyto 1.24.0
One more question please, I currently cannot updated to R 4.0 so instead I am using R 3.6.3 with Bioconductor 3.10. I also updated all the packages associated with this script, but
load_cytoset_from_fcs
is not available in FlowWorkspace 3.34.1 Is there an alternative ?Sure, instead you can use
read.FCS
to split up the data segments andread.flowSet
orread.flowSet
to read in the set of split files.And apologies for the lack of clarity about deprecation. It's sort of a big transition period for our packages and we are still working on disentangling some old dependencies and documenting the deprecations. This is also complicated by the dependencies of other Bioconductor packages on
flowCore
for example.Thank you for clarifying Jake!
With the suggested code I get the following error:
I can set the emptyValue to FALSE, but was wondering what are the larger implications of using this setting?
Thank you again for all your help!!
It's there as a workaround option to change the behavior of handling adjacent delimiters. Default behavior (
emptyValue=TRUE
) treats them as surrounding an empty keyword value. But adjacent delimiters can occur for other reasons, for example where\
is used as both a delimiter and to denote an escape sequence. There is logic to handle restoring appropriate double delimiters on empty keyword values when necessary even in the case ofemptyValue=FALSE
, however. It's just a slower process. Anyway, if parsing completes successfully withemptyValue=FALSE
, you should be fine, but you can always check the output ofkeyword
to make sure everything is being parsed in appropriately.Is there a way to combine the fcs files back into a single file as individual data segments?
You should better start a question, but here is some clues. While this operation is refered as concatenate you can find it as coerce in flowCore http://rglab.github.io/flowCore/reference/coerce.html There are also other codes such as the concatenate_fcs_files function from Premessa https://github.com/ParkerICI/premessa/blob/467d64150297d83832c3960750ac4792c99153fd/R/fcs_io.R#L129 Or custom code at https://gist.github.com/soh Best
I was looking to automate this in a function, that can figure out
ndataset
from the .fcs file directly?The solution in this post worked for me! - Getting number of datasets with flowCore