Giter Club home page Giter Club logo

Comments (4)

antass avatar antass commented on September 21, 2024 1

Given that, maybe a generic effect_size_estimator parameter could be helpful, with lfcShrink being one of the options. Could add more in the future.

Also, looks like lfcShrink can take contrast as parameter (but not for apeglm type), which could be passed down from the deseq2() function.

from tidybulk.

stemangiola avatar stemangiola commented on September 21, 2024

@mikelove any feedback/idea on this?

from tidybulk.

mikelove avatar mikelove commented on September 21, 2024

I can help with this.

I would argue for practical reasons as well as semantic reasons, it may best be implemented as separate function from test_differential_abundance, as typically the effect size is estimated apart from the null hypothesis testing. If you would consider this, I'd suggest something like "compute/estimate" with "posterior LFC" or "effect size".

Motivation: Neither the basic (MLE) LFC nor t-statistic (equivalently p-value) are very good at ranking genes by effect size, which we described in Zhu et al 2019 (with the exception of after having filtered to an FDR bounded set). But for ranking the entire gene list, apart from resorting to null hypothesis testing, you need a good effect size estimate for plotting or some downstream applications.

We have two main implementations within lfcShrink: ashr (which can be used directly on a results table, e.g. pivot_transcripts then applying lfcShrink), and apeglm (which requires the counts again, as it uses the likelihood in performing effect size shrinkage). We could also run edgeR's predFC, which has a free parameter prior.count that one would want users to be able to access, via ellipses should be fine.

Practically, this would mean passing the tidybulk or SE object to a new function which could run various methods to output a posterior effect size and (optionally) posterior SD. Would recommend naming this something other than log2FoldChange to avoid collision.

One more detail is that in our implementation, ashr can operate on any previously calculated LFC which would be present in the columns of the object after test_differential_abundance, while apeglm requires specifying which coef should be shrunk (by number or name for example). The names of the coefficients can be obtained from the fitted DESeqDataSet with resultsNames. Most often users want to shrink the last coef, but this could be exposed with ellipses. So to mention again, ashr could be run even if the counts were dropped.

from tidybulk.

mikelove avatar mikelove commented on September 21, 2024

Another good effect size ranking method that could be included is:

http://bioconductor.org/packages/release/bioc/html/topconfects.html
https://github.com/pfh/topconfects

from tidybulk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.