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

support for time points from same donor #268

Open
zia1138 opened this issue Feb 24, 2023 · 11 comments
Open

support for time points from same donor #268

zia1138 opened this issue Feb 24, 2023 · 11 comments

Comments

@zia1138
Copy link

zia1138 commented Feb 24, 2023

Really great work with milo!
We have a study where we have two time points across from the same donor which we are interested in comparing across treatments. In limma, we can take advantage of the blocking variable in voomLmfit (or duplicateCorrelation) for differential gene expression analysis to increase power to detect differential effects.
From my rough understanding this is not possible with milo since glmQLFit is used from edgeR. Is this correct?
Can testNhoods use voomLMfit with a blocking variable instead or another test that allows designs with multiple measurements from the same donor?
Thanks!
Zia

@MikeDMorgan
Copy link
Member

Hi @zia1138 If you are familiar with the limmaVoom syntax then you can dispense with testNhoods and use the nhoodCount matrix as input, though you will need to setup the design matrix, etc yourself. Our current approach for repeated measures designs is under development and uses a different framework entirely.

@zia1138
Copy link
Author

zia1138 commented Feb 27, 2023

Thank you @MikeDMorgan! Great. Looking forward to seeing the new framework. Any tips on how we can extract the nhoodCount matrix? Is it best to refactor the testNhoods function?

@MikeDMorgan
Copy link
Member

MikeDMorgan commented Feb 27, 2023

nhoodCounts(milo_obj) will give you the nhoods X sample counts matrix.

@graciegordon
Copy link

Hi @MikeDMorgan. I tried your suggestion using the nhoodCounts with Limma to leverage blocking variables, however I am running into some issues.

I just ran voomLmFit() on the counts without the blocking variable to compare with the glmQfit results from MIlo, but we do not see signal as we did when we fit an equivalent model with Milo. Is it possible that singe Milo uses a NB distribution it can handle the sparser counts better than voomLmFit? Voom also uses a slightly different normalization scheme (logCPM) which might also contribute to this issue.

Any advice/suggestions would be greatly appreciated.

@MikeDMorgan MikeDMorgan reopened this Mar 9, 2023
@MikeDMorgan
Copy link
Member

Hi @graciegordon - in the Milo and limma-voom results were the DA nhoods very close to the FDR threshold level? If so then this might explain the differences.

@graciegordon
Copy link

They were not very close at all to the FDR threshold actually. Using the same milo nhoodCount matrix the p values are not even well correlated

@MikeDMorgan
Copy link
Member

Hi @graciegordon @zia1138 In the updated Milo (2.0.0) we have introduced a mixed effect model that allows you to model multiple observations from donors as random effects. If you'd like to try this out it is available on the master branch of the repository: devtools::install_github("MarioniLab/miloR"). There is also a vignette linked to on the repo landing page to give you an idea of how to perform these analyses: https://raw.githack.com/MarioniLab/miloR/devel/vignettes/milo_glmm.html

@zia1138
Copy link
Author

zia1138 commented Nov 9, 2023

Sweet. Thank you @MikeDMorgan!

@flde
Copy link

flde commented Mar 1, 2024

Hello Mike, many thanks! I tried to get Milo v2.0 to model patient id as random effect in a time course experiments. I tried installing Milo v2.0 but the master is v1.99.9 and devel is v1.99.12. I am not very experienced with GitHub but is it the case that v2.0 is currently not merged with master? Many thanks for your help.

@MikeDMorgan
Copy link
Member

The github main 1.99.9 contains all the Milo2.0 code - the version will tick over with the new Bioconductor release in April.

@flde
Copy link

flde commented Mar 1, 2024

Many thanks for the confirmation, it works!

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

4 participants