Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence of functions for fine mapping with reference panel #32

Open
MalteThodberg opened this issue Sep 24, 2020 · 6 comments
Open

Sequence of functions for fine mapping with reference panel #32

MalteThodberg opened this issue Sep 24, 2020 · 6 comments

Comments

@MalteThodberg
Copy link

This is a continuation of stephenslab/susieR#110.

I would like to do multi-trait finemapping with mmbr using LD from a reference panel.

I'm unsure about the correct approach for this. Below is the code I use for susieR, followed by the code for mmbr:

LD # LD-matrix from fastPAINTOR
z_vec # Vector of z-scores for a single trait
z_mat # Matrix of z-scores for multiple traits

# susieR
susie_rss(z= z_vec,
                R=as.matrix(LD),
                 z_ld_weight = 1/503,
                 L = 10, 
                max_iter = 1000,
                estimate_residual_variance = TRUE,
                estimate_prior_variance = TRUE,
                check_z = TRUE, 
                verbose=TRUE,  
                r_tol = 1e-3)

# mmbr 
prior_covar <- create_mash_prior(sample_data = list(X=LD,
                                                            Y=z_mat,
                                                            residual_variance=cov(z_mat)),
                                                          max_mixture_len=-1)

msusie_rss(Z= z_mat, 
                   R=LD,
                   prior_variance = prior_covar,
                   L = 10, 
                  max_iter = 1000,
                 estimate_residual_variance = TRUE,
                 estimate_prior_variance = TRUE,
                 precompute_covariances=TRUE,
                 verbose=TRUE, 
                 r_tol = 1e-3)

Is this sequence of functions correct? For example, there's no equivalent to z_ld_weight in msusie_rss

@gaow
Copy link
Member

gaow commented Sep 24, 2020

@MalteThodberg msusie_rss is still under development. We have been testing it for now using the LD matrix generated from the genotype data. I'm curious how the result looks in your case -- does it work as expected?

@MalteThodberg
Copy link
Author

I have just set it up today, so haven't systematically investigated yet.

On the surface output looks good though!

@stephens999
Copy link
Collaborator

@MalteThodberg I just want to emphasize again (to avoid misunderstanding) that the entire mmbr package is "under development" and you should not consider it stable. In particular we have no preprint describing its performance, and the method is liable to change.
So although you are free to experiment with it (and indeed we welcome your questions and feedback!) we strongly
recommend against using any results from mmbr in a publication until we have described and documented the method in a preprint. This is still going to be a few months away.

@MalteThodberg
Copy link
Author

Thanks for the reply Stephens!

I'm perfectly aware that mmbr is very much a work in progress.

For this particular project we are super interested in doing multi-trait finemapping. The only published tool I could find was fastPAINTOR (if you know of others please let me know!).

fastPAINTOR seems to work OK on our smaller loci, however it is extremely slow and produces very noisy results on the larger loci. For the single largest loci, we haven't even been able to to run it with more than up to 2 causal variants.

This leaves mmbr as the only remaining option. It runs in minutes compared to hours and seem to produce much cleaner results (fewer estimated causal snps and smaller credible sets).

If the code snippet I posted is correct, I'm happy to share the results for the fine mapping with fastPAINTOR vs mmbr if your interested?

@gaow
Copy link
Member

gaow commented Sep 25, 2020

Thanks @MalteThodberg this is good to know. Yes I'm curious to see the result, and equally importantly the context of your analysis so we have some idea of what the sample size / effect size / LD structure we deal with. If you prefer we can communicate offline (wang.gao@columbia.edu) for data and results, to help developing mmbr_rss, and I'll internally keep the group on my end informed.

@MalteThodberg
Copy link
Author

Sounds great!

I'm working on getting better reference panel LD for the fine-mapping at the moment. I can send a few plots of how mmbr performs vs fastPAINTOR when I have everything together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants