Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differential expression analysis with limma-voom pipeline #34

Closed
orange-3711 opened this issue May 8, 2024 · 1 comment
Closed

Differential expression analysis with limma-voom pipeline #34

orange-3711 opened this issue May 8, 2024 · 1 comment

Comments

@orange-3711
Copy link

Hi @ningbioinfo ! Do the variables used to model.matrix for differential gene analysis need to be consistent with the variables of interest in batch effect removal? I used inconsistent variables and the results were not very good. I hope you can answer my questions, thank you.

@ningbioinfo
Copy link
Member

Hi @orange-3711 .
In the documentation of the function:

design A design matrix relating to treatment conditions to be preserved, can be generated using stats::model.matrix function with all biological factors included.

So, say you're using model.matrix(~0 + bio_var1 + bio_var2, data = colData(spe)) in the geomxBatchCorrection function with the method = "limma" and batch = colData(spe)$batch. And you're happy with the normalization output by verified in PCA & RLE.

Then, your should use the raw count in your DGElist when doing DE, and your design would be model.matrix(~0 + bio_var1 + bio_var2 + batch, data = colData(spe))

So, besides the addition of the batch variable, other covariates should be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants