RGLab / flowStats

flowStats: algorithms for flow cytometry data analysis using BioConductor tools
15 stars 10 forks source link

Error when no compensation control for a channel #35

Open wudustan opened 3 years ago

wudustan commented 3 years ago

I am trying to use spillover() but not all the channels in the experiment have an appropriate stain - one of our lines expresses Katushka protein which we use in the flow cytometry experiment, but we don't have an equivalent stain for beads.

I unwound the package function for spillover and just manually ran the steps. At the bottom I also added one more row with 0s for all other channel and 1 for Katushka to just try and get across the problem but accepting it will affect the resulting data. I just wanted to double check how this will affect the rest of my channels and wanted to get the take of people who have worked on the package and their data

Here I include the matrix heatmap of the computed spillover matrix. Stained control samples are rows with Katushka added manually, columns are the $P channels detected by flowCore/flowStats.

Screenshot 2021-08-04 at 10 35 50
gfinak commented 3 years ago

What's the question? Are you computing the spillover matrix from controls or are you just extracting it from the file? One problem is your off-diagonal elements are 1.0, and your diagonal elements are < 1. What version of flowCore? Any chance you can share a reproducible example that generates this matrix?

wudustan commented 3 years ago

Hi,

Thanks for the response. Unfortunately, I can't provide my data.

I have two questions:

1) What is the best course of action when one of the $P channels doesn't have an associated stained control? -- in my example, I simply added an extra row to the matrix and set every value to 0 except the column associated with that channel. But I'm conscious that's a horrible hack.

2) For cases where as you correctly point out off-diagonal elements are 1.0, and diagonal elements are < 1 despite knowing that the stain is the correct stain for that channel, do I manually amend this? -- I have made sure to double check this isn't a channel/stain mix up. For some reason, some of the unstained controls have a higher signal in channels out of their normal target.

flowCore: 2.4.0 R: 4.1.0