Closed pchiang5 closed 2 years ago
Hi pchiang5,
as you have correctly described there are two approaches when doing differential gene analysis:
For the second approach, though, you have to be careful because the coefficients can have different meanings depending on the intercept. Specifically, in your second example, contrast = 'adata$obs$leiden8'
measures the difference between group 8 and whatever group was chosen to represent the intercept. This explains why you found that the results between the two approaches don't match.
Which input would be a more reasonable/proper way for the purpose?
In summary, although I usually prefer the second approach because it is more flexible, the current contrast that you are using is wrong for identifying marker genes in cluster 8.
To learn more about correctly forming a model design and choosing the appropriate contrast, I recommend to take a look at:
Best, Constantin
Thank you for your answer and references, Constantin.
Hi Constantin,
When I would like to get the markers for each cluster in a scRNA-seq dataset, I tried 2 ways:
and the output was:
the output was:
I found the output was not identical. Which input would be a more reasonable/proper way for the purpose?
Thank you.