stephens999 / ashr

An R package for adaptive shrinkage
GNU General Public License v3.0
79 stars 35 forks source link

Add testing against an interval of beta values #132

Open frederikziebell opened 2 years ago

frederikziebell commented 2 years ago

It would be useful to be able to test against an interval of beta values and compute FSOS and svalues in a similar fasion to the apeglm package.

In my application there are many samples but few samples per condition, which is why I need to moderate fold-changes but simultaneously filter for biologically relevant effect sizes.

stephens999 commented 2 years ago

you can get credible intervals using ashci It can be slow but should give you the ability to test against any interval (eg reject if the ci does not overlap the interval)

(For faster computation you can use the approximation posterior mean +- 2 posterior_sd for a 95% CI. It is only an approximation but may be good enough for many purposes.)

Matthew

On Fri, May 6, 2022 at 5:07 AM Frederik Ziebell @.***> wrote:

It would be useful to be able to test against an interval of beta values and compute FSOS and svalues in a similar fasion to the apeglm https://bioconductor.org/packages/release/bioc/html/apeglm.html package.

In my application there are many samples but few samples per condition, which is why I need to moderate fold-changes but simultaneously filter for biologically relevant effect sizes.

— Reply to this email directly, view it on GitHub https://github.com/stephens999/ashr/issues/132, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANXRRLBAUBAGNH5DYJ7K3TVITVOHANCNFSM5VHVVLFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

frederikziebell commented 2 years ago

Thank you, that is really helpful! For my application, ashci is really quick. Just to make sure my reasoning is correct: I could even compute a local false sign or small rate by optimizing the level of the CI such that the CI touches the test interval?

stephens999 commented 2 years ago

yes, you could do that. However, better to compute the posterior cdf directly at each end of the test interval. see ?ashr::cdf_post to get the posterior cdf

On Thu, May 12, 2022 at 3:44 AM Frederik Ziebell @.***> wrote:

Thank you, that is really helpful! For my application, ashci is really quick. Just to make sure my reasoning is correct: I could even compute a local false sign or small rate by optimizing the level of the CI such that the CI touches the test interval?

— Reply to this email directly, view it on GitHub https://github.com/stephens999/ashr/issues/132#issuecomment-1124700352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANXRRLXREIDHGZRXC6LOGTVJTAFRANCNFSM5VHVVLFQ . You are receiving this because you commented.Message ID: @.***>

mikelove commented 2 years ago

Thanks @frederikziebell and @stephens999 I'll look into adding this to DESeq2 in this devel cycle.