cytoflow.operations.autofluorescence module contains two classes:
- class cytoflow.operations.autofluorescence.AutofluorescenceOp¶
Apply autofluorescence correction to a set of fluorescence channels.
estimatefunction loads a separate FCS file (not part of the input
Experiment) and computes the untransformed median and standard deviation of the blank cells. Then,
applysubtracts the median from the experiment data.
applyalso adds the
af_stdevmetadata to the corrected channels, representing the median and standard deviation of the measured blank distributions.
The channels to correct.
The filename of a file with “blank” cells (not fluorescent). Used to
Occasionally, you’ll need to specify the experimental conditions that the blank tube was collected under (to apply the operations in the history.) Specify them here.
Create a small experiment:
>>> import cytoflow as flow >>> import_op = flow.ImportOp() >>> import_op.tubes = [flow.Tube(file = "tasbe/rby.fcs")] >>> ex = import_op.apply()
Create and parameterize the operation
>>> af_op = flow.AutofluorescenceOp() >>> af_op.channels = ["Pacific Blue-A", "FITC-A", "PE-Tx-Red-YG-A"] >>> af_op.blank_file = "tasbe/blank.fcs"
Estimate the model parameters
Plot the diagnostic plot
Apply the operation to the experiment
>>> ex2 = af_op.apply(ex)
- estimate(experiment, subset=None)¶
Experiment) – The experiment to which this operation is applied
subset (Str (default = “”)) – An expression that specifies the events used to compute the autofluorescence
Applies the autofluorescence correction to channels in an experiment.
Experiment) – the experiment to which this op is applied
a new experiment with the autofluorescence median subtracted. The corrected channels have the following metadata added to them:
af_median : Float The median of the non-fluorescent distribution
af_stdev : Float The standard deviation of the non-fluorescent distribution
- Return type
- class cytoflow.operations.autofluorescence.AutofluorescenceDiagnosticView¶
Plots a histogram of each channel, and its median in red. Serves as a diagnostic for the autofluorescence correction.
- plot(experiment, **kwargs)¶
Plot a faceted histogram view of a channel