Closed LukasHats closed 5 months ago
Hi @LukasHats
allneg
from plasma cells?adata.raw.X
looks like?@ajitjohnson Thanks for the super fast reply!
Initially, I included all these allneg because when immune cells are in close contact with the plasma cells (myeloma cells), they suffered from spillover and got assigned as plasma cells (myeloma cells), and to prevent this, I used the allneg strategy. But seems like this was not a good idea. However, maybe you would have an idea of preventing those missasigned cells?
2.
adata.raw.X
array([[ 3.96480636, 2.27990406, 6.00049857, ..., 1.66016986,
2.39910141, 0.85182912],
[ 5.8269676 , 5.02511351, 1.79790638, ..., 4.58909818,
3.02833282, 1.74198974],
[ 5.41194391, 0.95435072, 1.42363619, ..., 2.8124897 ,
10.61775327, 1.32483804],
...,
[ 4.83710968, 1.04664985, 10.29334917, ..., 1.41952243,
2.97784023, 0.79173471],
[11.27220984, 2.63773545, 29.35303122, ..., 2.17003537,
2.81499633, 3.40928472],
[ 1.23573732, 1.65347757, 2.08084869, ..., 0.6 ,
0. , 0. ]])
what seemed to have happened is your allneg
scoring overshadowed the CD138
. This is because allneg
and allpos
have a slightly higher priority than neg
or pos
.
neg
on a few markers instead of all the markers you have now. Okay, that is a good information on how these labels behave. Thanks I will try that out!
So in these samples actually all plasma cells should be myeloma cells, I am more worried about misclassification of infiltrating immune cells as myeloma/plasma cells.
But thanks a lot for the fast and successful help. I will try out you suggestions and let you know how that works before closing the issue.
ah okay, in which case reclassify plasma cells into normal immune cells.
I checked a few more phenotyped images and the new gating scheme without the allneg seems to work quite fine. Thanks for the super fast help and insights into the gating behaviour!
Dear @ajitjohnson
thanks for providing this awesome package. I am currently struggling with scimap assigning cells to a certain phenotype, although they clearly do not pass the manually given threshold. Here the problem in more detail:
I have a dataset from imaging mass cytometry, I adjusted the table to fit into mcmicro output and used:
adata = sm.pp.mcmicro_to_scimap(export,split="area", CellId="CellID", drop_markers = ["HistoneH3", "CD98", " 1", " 2", " 3", " 4", " 5", " 6", "191Ir", "193Ir"])
to load the data.
I started phenotyping using the following approach:
Did this for all markers and stored the gates in a csv, then used:
This generally did work well for most phenotypes, however I am struggling with plasma cells here. This is my matrix for gating:
I am struggling with the Plasma cells. I attached 2 files to understand the problem. In the first, you can see me setting the gate for CD138 to 1.5, which is the marker, that needs to be positive in order to define the cell as a Plasma cells (see also matrix above):
However, once I run
sm.pp.rescale
andsm.tl.phenotype_cells
I inspect the result using:Here I can clearly see, that scimaps assigns cells to be plasma cells, that initially did not pass the gate I set before:
What could be the problem here? I also tried using the
layer='log'
argument insm.pl.gate_finder
, but I doubt that this is solving the issue, as the gates are just completely different then.Happy for any help!