Closed aarzalluz closed 6 years ago
I suggest you look carefully at the gating of the positive populations in your single stain controls. These types of problems are usually indicative of problems with the data more than problems with the methods.
Thank you very much for your input. However, since the single-staining .fcs files have already been generated, I see no way around it that can allow me to use the compensate() function directly for compensation. Do you know of any workflow in R to do compensation in a semi-unsupervised or manual manner?
Plot the compensation controls, verify that the subsets selected by compensate() are accurate. Maybe consider pregating, or not. I don't really have specific advice. Just try to get to the bottom of why your compensation matrix is singular.
I am manually calculating a spillover matrix using single staining fcs files, and then using this matrix as input for the
compensate()
function, together the flowSet containing my data (as indicated in the openCyto vignettes). I'm doing the following calls, wheress_flowSet
andsamp_flowSet
are the flowSets containing single stainings and samples.comp_matrix <- spillover(ss_flowSet, unstained = 1, stain_match = "ordered")
comp_samples <- compensate(samp_flowSet, comp_matrix)
And I get the following error:
Error in solve.default(t(spillover)) : system is computationally singular: reciprocal condition number = 4.7006e-42
If I perform the spillover computations using the mean instead of the median, I get another error from the
solve.default()
function:Error in solve.default(t(spillover)) : Lapack routine dgesv: system is exactly singular: U[8,8] = 0
Apparently both result from providing it with a singular (i.e. not invertible) spillover matrix. Is there any way around this? Could it be fixed by tweeking the tolerance in the Rbase
solve()
function?Thanks in advance.