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

Using alternative batch correction methods to RUV #32

Open
Doc-R-J opened this issue Apr 4, 2024 · 1 comment
Open

Using alternative batch correction methods to RUV #32

Doc-R-J opened this issue Apr 4, 2024 · 1 comment

Comments

@Doc-R-J
Copy link

Doc-R-J commented Apr 4, 2024

Hi
Firstly, thank you for developing this package for Spatial data - I am finding it very useful!

I had a question which does not seem to be covered in the tutorial (https://davislaboratory.github.io/GeoMXAnalysisWorkflow/articles/GeoMXAnalysisWorkflow.html#acknowledgments).

I am looking at performing alternative batch correction to RUV, as RUV does not seem to be performing well after looking at the results of the plotClusterEvalStats function. I understand we apply the RUV weightings in the design matrix (~0 + Type + ruv_W1 + ruv_W2 for eg.) However, if I wanted to apply TMM normalisation or limma batch correction, how would I apply this?

The TMM normalisation and Limma batch corrections don't seem to give a normalisation factor that are added to the Spatial object and therefore can't be applied to the design matrix.

Just wondering if I am missing something here.

Many thanks

Rob

@ningbioinfo
Copy link
Member

Hi @Doc-R-J , the TMM normalziation would result in a size factor as well, after transforming the spe into dge, in the dge$samples, there is a size.factor column, if you use the spe2dge function to transform, then it should be directly stored there. Then when the linear model is used, the size.factor from that column will automatically be used in limma/edgeR.
For the limma batch correction, just add the batch variable to the linear model as covariate would do the trick.

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