coloc
coloc copied to clipboard
`runsusie` for a dataset without varbeta
Hi,
Thank you very much for coloc, it is very helpful!
I am wondering, if it is possible to use runsusie
function for a dataset without varbeta? I am trying to co-localize multiple signals between GWAS and eQTL summary stats. Unfortunately, I have only MAF, p-value, z-statistics and number of samples from eQTL dataset. I tried to apply runsusie
, assuming that it will work, because coloc.abf
can accept data without varbeta. But runsusie
failed with an error message "Error in sqrt(d$varbeta) : non-numeric argument to mathematical function". Is there any chance it can work without varbeta?
Thank you for your answer in advance!
You can guesstimate what the beta and varbeta are given the Z score, MAF, and information about the trait variance. That is what coloc.abf does. However, it is not a perfect estimate, and I haven't tested how it would work with susie, I fear susie will be more sensitive to small errors in this approximation.
Is it not possible to get more complete stats from the eQTL dataset?
On Thu, 2021-04-15 at 09:09 -0700, daria-nikanorova wrote:
Hi,
Thank you very much for coloc, it is very helpful! I am wondering, if it is possible to use runsusie function for a dataset without varbeta? I am trying to co-localize multiple signals between GWAS and eQTL summary stats. Unfortunately, I have only MAF, p-value, z-statistics and number of samples from eQTL dataset. I tried to apply runsusie, assuming that it will work, because coloc.abf can accept data without varbeta. But runsusie failed with an error message "Error in sqrt(d$varbeta) : non-numeric argument to mathematical function". Is there any chance it can work without varbeta?
Thank you for your answer in advance!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Thank you very much for your quick answer!
Yes, I've just found in runsusie
source code, that I can do without varbeta, if I have z score, and it worked! Unfortunately, that's all statistics I can get from this dataset. So your advice is to use datasets with beta and varbeta if possible for runsusie
?
If you can use z scores directly, then do that :)
http://chr1swallace.github.io
On 15 Apr 2021, 19:25, at 19:25, daria-nikanorova @.***> wrote:
Thank you very much for your quick answer!
Yes, I've just found in
runsusie
source code, that I can do without varbeta, if I have z score, and it worked! Unfortunately, that's all statistics I can get from this dataset. So your advice is to use datasets with beta and varbeta if possible forrunsusie
?-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/chr1swallace/coloc/issues/50#issuecomment-820639245
OK, thanks!
On a related note - could you modify your sensitivity function to allow for missing varbeta? Varbeta is currently required in the sensitivity function (in order to calculate z-scores), even if we input our z-scores (and don't have varbeta). It's a simple change but I'd love the option without modifying your code.
Problem lines:
if(!is.null(dataset1) && !is.null(dataset2)) { df1=with(dataset1,data.table(snp=snp,position=position,z.df1=beta/sqrt(varbeta))) df2=with(dataset2,data.table(snp=snp,position=position,z.df2=beta/sqrt(varbeta))) df=merge(df1,df2,by=c("snp","position"),all=TRUE) results=merge(results,df,by="snp") }
how do you want to pass z scores, by p value? Working with z scores isn't an option anywhere else in coloc, so it seems strange to introduce it here.
Using the SuSiE framework one only needs z-scores (and a correlation matrix). We therefore only need z-scores if one uses coloc's runsusie() and then coloc.susie(). The only limitation is that we can't run the sensitivity code along with coloc.susie without varbeta. As described previously in this thread, some datasets only have z-scores, not varbeta. While it's possible to guesstimate varbeta, it would be cleaner not to need it.
Hi, sorry to jump on this issue, but I am in simmilar poroblem. I got these in my eQTL study: ‘Gene_id’,‘SNP_id’,‘Distance to TSS’,‘Nominal p-value’,‘Beta’, z.score and StdErr And these in my GWAS study: z.score and StdErr, p_val, beta, variant_id.
Would I be able to use these to perform coloc? I presume I also need LD.
Varbeta is the square of the standard error.
https://chr1swallace.github.io
From: Matiss @.>
Sent: Wednesday, April 6, 2022 6:18:56 PM
To: chr1swallace/coloc @.>
Cc: Chris Wallace @.>; Comment @.>
Subject: Re: [chr1swallace/coloc] runsusie
for a dataset without varbeta (#50)
Hi, sorry to jump on this issue, but I am in simmilar poroblem. I got these in my eQTL study: ‘Gene_id’,‘SNP_id’,‘Distance to TSS’,‘Nominal p-value’,‘Beta’, z.score and StdErr And these in my GWAS study: z.score and StdErr, p_val, beta, variant_id.
Would I be able to use these to perform coloc? I presume I also need LD.
— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchr1swallace%2Fcoloc%2Fissues%2F50%23issuecomment-1090514152&data=04%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C3182e0a1f4724a65adae08da17f18972%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637848623449855525%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cqAU9FQ7gmVj8QT587TeQ3EaFuhI7PbYr3MJgXIVRIQ%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQWR2CVJBEYY2TQUSCP5ALVDXBQBANCNFSM427ZWJTA&data=04%7C01%7Ccew54%40universityofcambridgecloud.onmicrosoft.com%7C3182e0a1f4724a65adae08da17f18972%7C49a50445bdfa4b79ade3547b4f3986e9%7C0%7C0%7C637848623449855525%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Ei6twt%2FFOPycOcxlq4qfAnbfyiATxr82Z%2Buz2u%2BriGU%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>