stephenslab / mashr

An R package for multivariate adaptive shrinkage.
https://stephenslab.github.io/mashr
Other
88 stars 19 forks source link

eQTL analysis problem #121

Closed yrjia1015 closed 9 months ago

yrjia1015 commented 9 months ago

Thank you for contributing mashR. I hope to use the mash method to explore the cell type specificity of eQTL. But due to personal reasons, I'm worried that I misunderstood the entire process. So could you please check it?

Background: I currently have eQTL summary data for four cell types A, B, C, and D. I hope to check which eQTLs in cell type A may be cell type specific

  1. Traverse all summary data of cell A, find the beta and se of the eQTL with the smallest p-value in each gene, and use them as strong.

  2. Find the beta and se corresponding to eQTL in step 1 in cells B, C, and D, and construct the entire beta and se matrix for strong.

  3. Randomly extract a certain number of eQTL beta and se from the eQTL summary data of A cells as random variables

  4. Find the beta and se corresponding to eQTL in step 3 in cells B, C, and D, and construct the beta and se matrices for the entire random.

  5. Using Random to Fit the Mash Model

  6. Then go and test the cell type specificity of strong. (m2=mash (data. strong, g=get_fittedug (m), fixg=TRUE))

If I want to check the cell type specificity of eQTL for B, C, and D cell types, I need to replace the A cell in the above steps with the specified cell type

gaow commented 9 months ago

We would just analyze a matrix with [A, B, C, D] as columns and gene-snp pairs as rows, to pick strong (the row with smallest p-value in this entire matrix) and random sets. Then you can assess the posterior to determine if an effect is specific to whichever of these conditions that you have analyzed. The strong set does not have to be based on a particular cell type.

yrjia1015 commented 9 months ago

Thank you for your reply. Can I understand it as: in a matrix constructed from all eQTL summary data, with [A, B, C, D] as columns and gene SNP pairs as rows, I select the row (gene SNP pair) with the minimum p-value in a certain state in each eGene as the strong set of that eGene. In addition, 4-5 gene SNP pairs were randomly selected from each eGene as random.

gaow commented 9 months ago

yes, to clarify:

minimum p-value in a certain state

i.e. minimum across all the "states"