Giter Site home page Giter Site logo

Comments (2)

johannesostner avatar johannesostner commented on August 16, 2024

Yes, this works as intended. The log-fold change column is simply the log-fold change between the "expected_sample" column of the effect results and the "expected_sample"-column of the intercept results.

The expected samples in the intercept results is imply the mean of a Dirichlet-multinomial distribution over the MCMC-sampled parameters for the intercepts:

alpha_par = alphas_df["final_parameter"]
alphas_exp = np.exp(alpha_par)
alpha_sample = (alphas_exp / np.sum(alphas_exp) * y_bar).values

For the effects, we have the same formula but we add the siginificant effects: alpha_par + betas_df["final_parameter"]. This results in the log-fold change being the same for all non-significant cell types.

from sccoda.

le-ander avatar le-ander commented on August 16, 2024

Hm, I see.
I guess this is very intuitive when you fully grasp what the underlying model is doing (which I don't and I guess not all future users of the tool will be).

I guess I would have just expected a simple mean log-fold change between conditions over all samples here. Might be worth a discussion what makes most sense with the users in mind here. I wonder what Maren's @mbuttner take is on this.

from sccoda.

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.