Setting of default range parameter value when writing FCS files using write.FCS
2
0
Entering edit mode
@robert-bruggner-3708
Last seen 9.0 years ago
United States

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:

https://github.com/Bioconductor-mirror/flowCore/blob/e780de2897dc00fd5df6af59f03365ed5bd80106/R/IO.R#L1162

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

 

flowCore • 1.8k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

I'd say you should probably set 'PnR' (i.e. the instrument range) keyword for your flowFrame in the first place because it is required based on FCS3.1 http://isac-net.org/PDFS/90/9090600d-19be-460d-83fc-f8a8b004e0f9.pdf , section 3.2.18.

Alternatively, you can set 'truncate_max_range' to FALSE when read.FCS.

 

ADD COMMENT
0
Entering edit mode
@robert-bruggner-3708
Last seen 9.0 years ago
United States

Thanks for your response Mike.

I totally agree that it should be set (as it is a required parameter). 

I guess what I'm interested in hearing is if you think that the write.FCS function should (in the absence of that keyword explicitly being set by the user) set the PnR values to the observed range of the data by default rather than '1024'. The latter seems a bit arbitrary to me (unless that too, is part of the 3.1 spec). 

 

 

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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? 

 

ADD REPLY

Login before adding your answer.

Traffic: 860 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6