I am using read.FCS
to load an FCS file containing multiple data segments, and am trying to automate the process but the number of datasets varies - I would like to be able to automatically get the number of data segments to then use a loop to store them all. There seems to be some built-in function for quickly checking the number of segments, as if I use read.FCS
without specifying a dataset, it instantly returns:
"1: The file contains 35 additional data segments. The default is to read the first segment only."
However, I cannot find a way to manually obtain this information: what is the function that I can use to do this? I know that I could a) use a loop to continually read datasets until it fails, or b) have some external file indicating the number of datasets, but these methods are slower than whatever method already exists within flowCore
.
Getting
findOffsets
and extracting the relevant part did the trick, thanks. For the record, this part of the function did what was needed:Thanks for the pointer!
Great job!
Thanks for sharing.