Color compensation is necessary for applications in which multiple fluorophores are used in the same cell (e.g. sfGFP and mCherry). Currently, FlowCal does not perform color compensation automatically. This issue will fix that, and the solution will eventually become part of a relatively major revision. This requires, as far as I can tell right now, the resolution of three aspects: developing the mathematical foundations, programming the API methods, and expanding the Excel UI so that non-programmers can use compensation easily.
The math that I would be using can be found here. It was derived independently, but it is equivalent to http://www.drmr.com/compensation/, plus autofluorescence. It is also equivalent to what it is performed in the TASBE method, as far as I can tell. Roughly, the method requires the calculation of one matrix of spillover coefficients, and a vector of autofluorescence values. These can be calculated using samples with no fluorescence and with strong expression of a single fluorophore.
With regards to the API, I propose the creation of a new module, called compensation. This module will contain the functions necessary to calculate the compensation parameters and apply compensation to new samples. Compensation, from an API perspective, should be performed in a similar way to the way MEF is performed:
- Compensation of an FCSData object will be performed via a transformation function:
s_compensated = compensate_fxn(s_uncompensated). I think it would be cool if the channels names are changed to reflect the fact that the event list now contains fluorophore values instead of channel signals. (e.g. instead of FL1, the channel would be called sfGFP).
- The transformation function will be generated by a function in the
compensation module get_compensation_fxn(), which will receive as parameters all the appropriate controls and the channels to compensate.
- The
compensation module will contain any other auxiliary functions that are necessary for compensation.
The Excel UI aspect needs more thinking. So far, I think that a new sheet can be included, in which the user can point to all the necessary controls, the names of the channels to compensate, and the names of the fluorophores used. In the Samples sheet, the user can still get statistics on uncompensated values by using the name of the channel (e.g. FL1 Median) or on compensated values, by using a fluorophore's name (e.g. sfGFP Median). A priority in this case should be to preserve FlowCal's current behavior.
Color compensation is necessary for applications in which multiple fluorophores are used in the same cell (e.g. sfGFP and mCherry). Currently, FlowCal does not perform color compensation automatically. This issue will fix that, and the solution will eventually become part of a relatively major revision. This requires, as far as I can tell right now, the resolution of three aspects: developing the mathematical foundations, programming the API methods, and expanding the Excel UI so that non-programmers can use compensation easily.
The math that I would be using can be found here. It was derived independently, but it is equivalent to http://www.drmr.com/compensation/, plus autofluorescence. It is also equivalent to what it is performed in the TASBE method, as far as I can tell. Roughly, the method requires the calculation of one matrix of spillover coefficients, and a vector of autofluorescence values. These can be calculated using samples with no fluorescence and with strong expression of a single fluorophore.
With regards to the API, I propose the creation of a new module, called
compensation. This module will contain the functions necessary to calculate the compensation parameters and apply compensation to new samples. Compensation, from an API perspective, should be performed in a similar way to the way MEF is performed:s_compensated = compensate_fxn(s_uncompensated). I think it would be cool if the channels names are changed to reflect the fact that the event list now contains fluorophore values instead of channel signals. (e.g. instead of FL1, the channel would be called sfGFP).compensationmoduleget_compensation_fxn(), which will receive as parameters all the appropriate controls and the channels to compensate.compensationmodule will contain any other auxiliary functions that are necessary for compensation.The Excel UI aspect needs more thinking. So far, I think that a new sheet can be included, in which the user can point to all the necessary controls, the names of the channels to compensate, and the names of the fluorophores used. In the Samples sheet, the user can still get statistics on uncompensated values by using the name of the channel (e.g. FL1 Median) or on compensated values, by using a fluorophore's name (e.g. sfGFP Median). A priority in this case should be to preserve FlowCal's current behavior.