xinhe-lab / ctwas

package for the causal TWAS project
https://xinhe-lab.github.io/ctwas/
MIT License
38 stars 12 forks source link

Error in susie examples #32

Closed pcarbo closed 4 months ago

pcarbo commented 4 months ago

I'm getting an error when I try to run the susie example:

set.seed(1)
n = 1000
p = 1000
beta = rep(0,p)
beta[1:4] = 1
X = matrix(rnorm(n*p),nrow = n,ncol = p)
X = scale(X,center = TRUE,scale = TRUE)
y = drop(X %*% beta + rnorm(n))
res1 = susie(X,y,L = 10)
# Error in s$V[l, ] : incorrect number of dimensions
kevinlkx commented 4 months ago

Thanks! Siming made modifications to susie, so maybe these examples would not work in the modified susie, but they were still copied from the original documentation. I will check those.

kevinlkx commented 4 months ago

I just checked those. The susie functions were modified for ctwas to work different prior variances for SNPs and genes, but the documentation and examples were still from old susie version.