Hi all,
I'm trying to write an FCS file using the write.FCS function and am noticing some (perhaps unexpected) behavior that leads to data truncation.
Specifically, if I create a flowFrame object using a matrix of values, do not set the channel ranges explicitly, and then write the flowFrame to disk using the write.FCS file, the channel ranges are by default set to 1024. Thus, when I have values outside this range, write the values to a file using write.FCS, and read that same FCS file back, the values outside of that range have been truncated to channel min/max values.
The line that is performing this behavior is here:
Is this the expected default behavior for when a range of data is not explicitly provided for a channel? I guess I would have expected that the range be automatically set to the observed range of data, rather than a default of 1024.
Thanks for any insight / help.
Cheers,
-Rob
Setting to the actual data range may not be the right thing to do either. As far as I understand, PnR is supposed to reflect the instrument range, which could be larger or smaller (after compensation and transformation) than the actual data value.
I agree - definitely not ideal for the reasons you named. In the absence of any other explicit range information (i.e. it is not provided by the user or file), does it make sense to set the default range to 1024 (again that number seems arbitrary - please let me know if there's a good reason for that)? Or something informed by the observed data?
Alternatively, is there a better default than those two options? Say, if we were going to set an arbitrary default range (again in the absence of any other information), would it be appropriate to set it to the max range value that can be held in an FCS 3.1 file?