chr1swallace / coloc

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

error in coloc.abf #79

Closed hust-yyan closed 2 years ago

hust-yyan commented 2 years ago

Hello, I encountered the following error when performing colocalisation analysis of GWAS and eqtl, but the check_dataset returned "NULL". image

image

this is my input data image

chr1swallace commented 2 years ago

Can you possibly share your data or some subset of it that still produces the error? I tried to reproduce, but this ran fine:

> d1=list(snp=letters[1:5],
+ position=1:5,
N=200000,
+ MAF=runif(5)/2,
+ beta=rnorm(5),
+ varbeta=rep(0.01,5),
+ type="cc")
> d2=list(snp=letters[1:5],
+ position=1:5,
+ beta=rnorm(5),
+ varbeta=rep(0.01,5),
+ type="quant",
+ sdY=10)
> coloc.abf(d1,d2)
PP.H0.abf PP.H1.abf PP.H2.abf PP.H3.abf PP.H4.abf 
 1.26e-16  2.89e-14  4.33e-03  9.95e-01  4.77e-04 
[1] "PP abf for shared variant: 0.0477%"
Coloc analysis of trait 1, trait 2

SNP Priors
   p1    p2   p12 
1e-04 1e-04 1e-05 

Hypothesis Priors
        H0    H1    H2    H3    H4
 0.9989498 5e-04 5e-04 2e-07 5e-05

Posterior
       nsnps           H0           H1           H2           H3           H4 
5.000000e+00 1.260061e-16 2.894208e-14 4.332795e-03 9.951905e-01 4.766854e-04