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

Error when using coloc 5.2.0 version #96

Closed
JFF1594032292 opened this issue Jul 8, 2022 · 11 comments
Closed

Error when using coloc 5.2.0 version #96

JFF1594032292 opened this issue Jul 8, 2022 · 11 comments

Comments

@JFF1594032292
Copy link

Hi,
I have updated the coloc 5.2.0. However it seems like some problems happens:
The runsusie() function failed when calculate my data which worked well in coloc 5.1.0.

This is coloc version 5.2.0
running max iterations: 100
Error in init_finalize(s) :
Input residual variance sigma2 must be a scalar
In addition: Warning messages:
1: In if (n <= 1) stop("n must be greater than 1") :
the condition has length > 1 and only the first element will be used
2: In if (n <= 1) stop("n must be greater than 1") :
the condition has length > 1 and only the first element will be used

And it seems to happened on almost all my previous data which worked well. (I haven't test them all)

Then the examples https://chr1swallace.github.io/coloc/articles/a06_SuSiE.html couldn't work either
image

I wonder if their are some conflicts between new version susieR and coloc, or should I update my data structure?
Thanks!

@chr1swallace
Copy link
Owner

chr1swallace commented Jul 8, 2022 via email

@JFF1594032292
Copy link
Author

It seem like R automatically updated susieR to 0.12.16 when updated coloc, because I remembered the 0.11.8x susieR was too old too install coloc 5.2.0.
I just rollback coloc to 5.1.0, and it works well with susieR 0.12.16.
image

@chr1swallace
Copy link
Owner

chr1swallace commented Jul 8, 2022 via email

@JFF1594032292
Copy link
Author

Hi,
I built a new environment by conda, and the example data could work well with coloc 5.2.0 & susieR 0.12.16.
But it still couldn't work on my data, all data reported the same error:
image
And at least part of these data were working fine under coloc 5.1.0, and also showed high PPH4 in the coloc.susie() process.
I don't know why the same data couldn't work for new version, my data only lack of "position" which was not necessary. I couldn't search any useful information from this error message either.
image
And as 5.1.0 couldn't pass the sample size information, this new version should be necessary for colocalization?
Thanks!

@chr1swallace
Copy link
Owner

what is str(D)? Is D$N a scalar as it should be, or a vector? Is it expected that your LD matrix is not symmetric?

@JFF1594032292
Copy link
Author

D$N was set as a vector in my data, and it worked when I changed it to a scalar.
Thanks a lot!
Another interesting thing is, I ran runsusie() on summary data with it's original genotype LD matrix, and it worked well on all regions. However, it reported this error in many loci when I run it on a same cohort LD matrix (which was the best matched genotype I can find).
image
It seems like runsusie() extremely sensitive to the consistent between summary data and LD matrix, and may cause >50% regions (even ~100% in some datasets) couldn't conduct this analysis. Because for most public GWAS data (especially the meta GWAS), we can only use other public datasets to obtain the LD matrix.

@chr1swallace
Copy link
Owner

chr1swallace commented Aug 2, 2022 via email

@JFF1594032292
Copy link
Author

Thanks, It's very helpful to me!

@mocksu
Copy link

mocksu commented Nov 3, 2023

what is str(D)? Is D$N a scalar as it should be, or a vector? Is it expected that your LD matrix is not symmetric?

I am working on the latest version of "coloc" (and thus susie I guess). The N varies from row to row for my data. What should I do with N?

Thanks!

@chr1swallace
Copy link
Owner

chr1swallace commented Nov 9, 2023 via email

@mocksu
Copy link

mocksu commented Nov 9, 2023

coloc software assumes all variants have the same sample coverage, and then compares Bayes factors across different variants. If there is substantially different sample coverage between two variants, then these Bayes factors are not comparable. Imagine two variants in complete LD, one typed in all samples and the other in half the samples. They are in complete LD, so should have equal Bayes factors, but in fact the variant with higher sample coverage is likely to have a larger Bayes factor. How variable is your N?

-- https://chr1swallace.github.iohttps://chr1swallace.github.io/
________________________________ From: mocksu @.> Sent: Friday, November 3, 2023 10:54 PM To: chr1swallace/coloc @.> Cc: Chris Wallace @.>; State change @.> Subject: Re: [chr1swallace/coloc] Error when using coloc 5.2.0 version (Issue #96) what is str(D)? Is D$N a scalar as it should be, or a vector? Is it expected that your LD matrix is not symmetric? I am working on the latest version of "coloc" (and thus susie I guess). The N varies from row to row for my data. What should I do with N? Thanks! — Reply to this email directly, view it on GitHub<#96 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAQWR2A6C6G4SWAX3PVXI33YCVY3TAVCNFSM53AHTPPKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZZGMZDCMZXG44Q. You are receiving this because you modified the open/close state.Message ID: @.***>

A couple of times difference (e.g. 1,000 ~ 3,000) of the sample size. I decided to use median of the sample size to get around it.

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