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 similar apeAdapt argument as in DESeq2::lfcShrink() #264

Closed
awalsh17 opened this issue Apr 1, 2024 · 2 comments
Closed

support similar apeAdapt argument as in DESeq2::lfcShrink() #264

awalsh17 opened this issue Apr 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@awalsh17
Copy link
Contributor

awalsh17 commented Apr 1, 2024

Is your feature request related to a problem? Please describe.
This is not a problem, but a limitation for some datasets.
In the R package, the DESeq2::lfcShrink() wrapper that calls {apeglm} includes the apeAdapt argument that, when set to FALSE, does not use the logFC MLE and sets mle = NULL for apeglm() call. This thread explains some of the reasoning to do this: https://support.bioconductor.org/p/111544/

Describe the solution you'd like
Would you support adding an argument to lfc_shrink that would perform similarly to the R implementation?
If you pointed me in the right direction in the code, I could implement it.
If it is as simple as changing prior_scale to 1, then this might be simple. (Based on my read of the code here: https://github.com/azhu513/apeglm/blob/master/R/apeglm.R)

Describe alternatives you've considered
Just use the R package

Additional context
Thank you!

@BorisMuzellec
Copy link
Collaborator

Hi @awalsh17, thanks for your interest in pydeseq2! I'd be happy to help you open a PR to implement this option.

After a brief look at the code I understand the same as you, which is that we should just add an option in lfc_shrink to set prior_scale=1.
If you'd like to open a PR, I'll add some test cases to check that our understanding is correct.

Thanks!

@awalsh17
Copy link
Contributor Author

awalsh17 commented Apr 2, 2024

Thanks @BorisMuzellec ! I will submit a PR with the proposed change. I tested something locally with my test data, and it "works," but I should also compare it to the R implementation.

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

No branches or pull requests

2 participants