Closed gdagstn closed 5 months ago
Hi @gdagstn , thats a great point of discussion which doesn't have a clear cut answer, but i can suggest few points that might help to interpret the results.
But, with this being said, there is a second important point inho:
Since your question is a rather big topic, I dont know if I really hitting the bulls eye with my comments as in Im not sure if thats what you are asking about exactly? Pls let me know, if something is unclear, or you have more specific follow up questions. To reiterate, what you suggested re accounting for DA we do with offset/normalisation factors (total sum counts per sample/condition) - so i believe if that is you concern, we already account for this (well, as well as its accounted for in classic pseudo-bulk approaches that also have to deal with different number of cells).
P.s. I very much like your cartoon with contours - how do you do it? Which package do you use for that?
if you want to read about this more elsewhere, it is called library size normalisation: https://support.bioconductor.org/p/79379/
Please reopen the issue if you have additional questions
Hi, first of all congratulations!
I was wondering what would be a good way to tackle what is - as you say in the manuscript - a philosophical conundrum in practical terms.
Suppose we have two conditions A and B, and a population P that was identified in a joint embedding of A and B datasets. My goal is to understand the differences in both cell type composition and transcriptional regulation of B vs A; in simpler terms I just want to know "what happens and where".
Indeed, a
miloR
analysis confirms that there is consistent (e.g. > 50% of the P neighbourhoods with a |logFC| > 1 at spatial FDR < 0.05) DA between A and B. Now we runmiloDE
on these neighbourhoods and we find, as expected, several interesting DEGs in many neighbourhoods of P, plus several others in neighbourhoods of other populations Q, R, S which display no significant DA.Even though the DE testing regime accounts for total sample size (I presume by including per-sample neighbourhood size factors in the model), I believe that the sparsity of scRNA-seq makes it difficult overcome what I would say is a "confounding effect" of DA over DE. In other words, when I look at DE in P neighbourhoods, is this (also) due to differences in cell abundance, or is it actual transcriptional regulation? This is less controversial in Q, R, S neighbourhoods because we know there is no DA, but for P neighbourhoods it seems to me that, even with size factors included in the model, it is hard to disentangle the two effects (at the end of the day, aggregating sparse counts from 10 cells vs 30 can make a big difference unless we only look at very highly expressed genes). I say all this keeping in mind that DE and DA are two faces of the same coin, since variable genes are the ones that created the embedding in the first place, so I appreciate how this is not a clear-cut issue. Also, I believe that you did look at something similar in the IPF analysis in your manuscript by binning neighbourhoods on their DA and looking at DE distributions in each bin.
I attach a screenshot of my actual data, with a gene that to me seems to be confounded:
One simple way of dealing with this, which I'm not entirely convinced of, is to crudely subtract the DA fold change from the DE fold change and call whatever is left the actual transcriptional regulation. Another simple way would be to include DA in the model - but I'm not sure it would not over-correct (also it correlates with the size factors). A third way could be to use something like
variancePartition
to decompose DA- and DE-associated variance, and rank genes based on that, bearing in mind that the fold changes would still be the ones from the original DE test. A fourth way is to downsample the data so that A and B have comparable numbers and run the DE test again.Am I missing something here, or did I entirely misunderstand the approach? Does
miloDE
actually manage to "overcome" DA effects in its model, even when logFC in both tests are similar for a particular neighbourhood?Sorry for the lengthy post and thanks again for developing this really cool tool!