chr1swallace / coloc

Repo for the R package coloc
139 stars 44 forks source link

coloc.signals with 'cond' method is nto working properly #95

Closed npirastu closed 1 year ago

npirastu commented 2 years ago

Dear Chris,

thanks a lot for the coloc package, it is very helpful. I have been struggling with using coloc+COJO as implemented in coloc.signals. In particular after map_cond selects the most significant hit, the subsequent conditional Z-scores blow up reaching the hundreds. I am have tryed many different things but nothing seems to be able to solve it. I was wondering if this is a known effect or something is going on with my summary stats.

Many thanks

Nicola

chr1swallace commented 2 years ago

This can happen if your LD matrix is either not aligned allele-wise with your summary data (this is soluble - did you check?) or if it just doesn't capture closely enough the LD in the original GWAS data (hard to solve, but may be a LD matrix from a larger source would work?)


From: npirastu @.> Sent: 23 June 2022 11:49 To: chr1swallace/coloc @.> Cc: Subscribed @.***> Subject: [chr1swallace/coloc] coloc.signals with 'cond' method is nto working properly (Issue #95)

Dear Chris,

thanks a lot for the coloc package, it is very helpful. I have been struggling with using coloc+COJO as implemented in coloc.signals. In particular after map_cond selects the most significant hit, the subsequent conditional Z-scores blow up reaching the hundreds. I am have tryed many different things but nothing seems to be able to solve it. I was wondering if this is a known effect or something is going on with my summary stats.

Many thanks

Nicola

— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchr1swallace%2Fcoloc%2Fissues%2F95&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C01e2fd081c344b77c7cf08da55062709%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915782146285561%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fsXIaDdqR90jRu3303lfUZUCf9VE1Jf3dHjJcTljiIg%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQWR2CLMCEE46NURSMPPALVQQ6MLANCNFSM5ZT4V46A&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C01e2fd081c344b77c7cf08da55062709%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915782146285561%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OU1TA6v3y4%2BKct%2FuHseRv%2FA8BlF5%2FX%2BpNXXOiG3LIX0%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

npirastu commented 2 years ago

Thanks, yes I have checked and the alleles are fine. I am using a reference of 30k people so that should be fine as well. One problem was that that I was getting this error: "approximating linear analysis of binary trait quality of linear approximation (ideal is 1): 17.2895"

I changed the function bin2lin which solved part of the problem but I am still having the same issues. I will try the same dataset with GCTA just to see what happens.

chr1swallace commented 1 year ago

did it work? it seems there is an issue with the approximation, which I have seen when the reference and test populations do not properly match in LD or MAF

npirastu commented 1 year ago

Hi Chris,

I actually gave up. I tried to go back to the original math but honestly the paper is a bit obscure on what some of the matrices it uses are and without that I couldn't understand all your code is doing. I have in the end written up a wrapper for GCTA which does the job, and it works perfectly, so my feeling is that there is something going on with the math.

N

chr1swallace commented 1 year ago

ok, thanks for letting me know


From: npirastu @.> Sent: 01 August 2022 14:05 To: chr1swallace/coloc @.> Cc: Chris Wallace @.>; Comment @.> Subject: Re: [chr1swallace/coloc] coloc.signals with 'cond' method is nto working properly (Issue #95)

Hi Chris,

I actually gave up. I tried to go back to the original math but honestly the paper is a bit obscure on what some of the matrices it uses are and without that I couldn't understand all your code is doing. I have in the end written up a wrapper for GCTA which does the job, and it works perfectly, so my feeling is that there is something going on with the math.

N

— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchr1swallace%2Fcoloc%2Fissues%2F95%23issuecomment-1201176142&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7Ce1bd3378e7844e8ac41708da73be9d7a%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637949559756619697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SE6LEJwHqMUlGNWJ8m1Qbs0N7jGyqpnZCTxftusyL2U%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQWR2CKM5TCEU4Z653QB3LVW7DSNANCNFSM5ZT4V46A&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7Ce1bd3378e7844e8ac41708da73be9d7a%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637949559756619697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aMEzqJVNCMYunfGi%2B4nNuQFwW2r9twsQdPLCgZRoHoQ%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

chr1swallace commented 1 year ago

Great. Please let me know if gcta works, because that would suggest an error in my code for it

https://chr1swallace.github.io


From: npirastu @.> Sent: Thursday, June 23, 2022 1:07:47 PM To: chr1swallace/coloc @.> Cc: Chris Wallace @.>; Comment @.> Subject: Re: [chr1swallace/coloc] coloc.signals with 'cond' method is nto working properly (Issue #95)

Thanks, yes I have checked and the alleles are fine. I am using a reference of 30k people so that should be fine as well. One problem was that that I was getting this error: "approximating linear analysis of binary trait quality of linear approximation (ideal is 1): 17.2895"

I changed the function bin2lin which solved part of the problem but I am still having the same issues. I will try the same dataset with GCTA just to see what happens.

— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchr1swallace%2Fcoloc%2Fissues%2F95%23issuecomment-1164326639&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C4155b2e30fc64e5dc31308da55110fed%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915829005961046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nxtyn5jj67ZBLtifvB%2FWeA9rxLJkPJd9NE%2BRMR8XDhM%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQWR2AZF7ZZQ6LYMDJKJPLVQRHRHANCNFSM5ZT4V46A&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C4155b2e30fc64e5dc31308da55110fed%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915829005961046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BFT6wgVSILTT5RydoZPZmPyUOciNOUqvqWZp32r1dxA%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

npirastu commented 1 year ago

Great. Please let me know if gcta works, because that would suggest an error in my code for it https://chr1swallace.github.io ____ From: npirastu @.> Sent: Thursday, June 23, 2022 1:07:47 PM To: chr1swallace/coloc @.> Cc: Chris Wallace @.>; Comment @.> Subject: Re: [chr1swallace/coloc] coloc.signals with 'cond' method is nto working properly (Issue #95) Thanks, yes I have checked and the alleles are fine. I am using a reference of 30k people so that should be fine as well. One problem was that that I was getting this error: "approximating linear analysis of binary trait quality of linear approximation (ideal is 1): 17.2895" I changed the function bin2lin which solved part of the problem but I am still having the same issues. I will try the same dataset with GCTA just to see what happens. — Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchr1swallace%2Fcoloc%2Fissues%2F95%23issuecomment-1164326639&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C4155b2e30fc64e5dc31308da55110fed%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915829005961046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nxtyn5jj67ZBLtifvB%2FWeA9rxLJkPJd9NE%2BRMR8XDhM%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQWR2AZF7ZZQ6LYMDJKJPLVQRHRHANCNFSM5ZT4V46A&data=05%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C4155b2e30fc64e5dc31308da55110fed%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637915829005961046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BFT6wgVSILTT5RydoZPZmPyUOciNOUqvqWZp32r1dxA%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

Yes GCTA works perfectly.