Comments (2)
Hi pchiang5,
as you have correctly described there are two approaches when doing differential gene analysis:
- Adapt the model formula and make sure that you have only the two groups that you care about in the fit
- Fit a model with all groups and then look at the specific contrast you care about.
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:
- CoefExplainer and ExploreModelMatrix, two R packages for learning about different model formulas
- F1000 paper by the people who developed limma called a guide to creating design matrices for gene expression experiments
- The DESeq2 vignette which contains tons of examples how to perform differential expression analysis
- Or if you want to learn all the intricacies, the book _Statistical Design and Analysis of Biological Experiments
_ contains even more explanations around this whole question.
Best,
Constantin
from glmgampoi.
Thank you for your answer and references, Constantin.
from glmgampoi.
Related Issues (20)
- glmGamPoi scales cubically with the number of design matrix columns HOT 5
- Error in handle_design_parameter(design, data, col_data, reference_level) : Too few replicates / too many coefficients to fit model. HOT 1
- Score and Hessian (of the likelihood function) HOT 1
- Typo in help text for overdispersion_shrinkage HOT 1
- Inconsistent dispersion estimate between MLE and quasi-MLE HOT 1
- Questions about pseudobulk_sce HOT 3
- pseudobulk does not include `NA` levels
- Compatibility with R 3 HOT 4
- compilation error HOT 2
- Standard error of the overdispersion estimates HOT 4
- overdispersion_shrinkage is not optional HOT 3
- Upgrading from beachmat to tatami HOT 9
- Can you simulate from the fitted model or do you have recommendations for simulation? HOT 8
- HDF5Array is not available for package glmGamPoi HOT 4
- Unable to install the glmGamPoi package HOT 3
- [FR] Implement `logLik.glmGamPoi` HOT 2
- Error: 'pseudobulk' is not an exported object from 'namespace:glmGamPoi' HOT 1
- installation of package ‘glmGamPoi’ had non-zero exit status HOT 6
- glm_gp removes cell type from dataset HOT 4
- results tables identical for all cell populations HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glmgampoi.