Skip to content

need better documentation for computing posterior for linear combinations of effects #130

Description

@stephens999

We can compute the posterior summaries Ab for any matrix A, but this is not well documented.

Here was a user request (by email)
we have a situation with stimulated and unstimulated cells. We've mapped eQTL for each cell type, and have run mash. What we're interested in is cases where the effect size differs in the stimulated and unstimulated condition. We've been identifying those based on the local false sign rates (e.g. requiring lfsr < 0.1 for discovery, and calling it a context-specific eQTL if the lfsr is > 0.2 or 0.5 in the other condition). It would be wonderful to have something more principled that doesn't rely on arbitrary cutoffs, such as a direct test of whether B1 = B2. Is it possible to extract those summaries from mash currently, or how can we go about doing so?

The answer is that we can do this using the matrix A in mash_compute_posterior_matrices
Eg the following runs mash on simulted 5 conditions, but computes posterior for B1-B2

simdata = simple_sims(50,5,1)
data = mash_set_data(simdata$Bhat, simdata$Shat)
m = mash(data, cov_canonical(data))
mash_compute_posterior_matrices(m,data,A=rbind(c(1,-1,0,0,0)))

The role of A could be better documented in the function (eg add this example), and perhaps also in a vignette.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions