Hello all,
While running userGWAS function for a factor in the hierarchical model, I have encountered the error below. Would there be a solution to this error?Loading required package: GenomicSEM
There were 24 warnings (use warnings() to see them)
[1] "Please note that an update was made to userGWAS on 11/21/19 so that it combines addSNPs and userGWAS."
[1] "Starting GWAS Estimation"
Error in .userGWAS_main(i, int, n_phenotypes, n, I_LD, V_LD, S_LD,
std.lv, :
task 1 failed -
"'names' attribute [23] must be the same length as the vector [21]"Calls: userGWAS -> %dopar% -> <Anonymous>
Execution halted
Below is the code that I ran and I have attached ldsc output and sumstat output RData to reproduce the error. Sumstat output contains only the first 1,000 SNPs.require(GenomicSEM)
ldsc.out <- "M_ldscout.RData"
sumstat.out <- "M_sumstat_subset.RData"
load(ldsc.out)
load(sumstat.out)
model <- "F1 =~ NA*V8 + V7 + V6 + V3
F2 =~ NA*V1 + V2 + V6 + V5 + V3
F3 =~ NA*V4 + V5 + V6
M =~ NA*F1 + F2 + F3
M ~~ 1*M
V5 ~~ a*V5
a > 0.001
M ~ SNP
"
MetS.GWAS <- userGWAS(covstruc=M_ldscout,
SNPs=M_sumstat.subset,
estimation="DWLS",
model=model,
cores=20,
toler=1e-50,
SNPSE=FALSE,
sub=c('M ~ SNP'),
parallel=TRUE,
GC="standard",
MPI=FALSE,
smooth_check=TRUE,
printwarn=FALSE)
Best,
Austin