error at userGWAS step (different from previous thread)

111 views
Skip to first unread message

Charleen Adams

unread,
Nov 9, 2021, 3:21:12 PM11/9/21
to Genomic SEM Users
With the fix that Andrew did yesterday, I was able to obtain p_sumstats for my data. Today I ordered my files by SNP and selected 100 each and was able to get GWAS-by-Subtraction results for my set of 100 (it produced a outputGWAS_100_test.RData file that looks good). 

When I tried to run everything with my full data, I get the following error at the "userGWAS" step.  From the log file:

The effect column was determined NOT to be coded as an odds ratio (OR) for the asb_noZ_wSE_orderedSNP_no0.txt summary statistics file based on the median of the effect column being close to 0."

Error in `$<-.data.frame`(`*tmp*`, "effect", value = numeric(0)) : 

  replacement has 0 rows, data has 6362270

Calls: sumstats -> $<- -> $<-.data.frame

Execution halted

I don't know what to change, since it ran with the test set of 100. I tried subsetting my ASB2 GWAS by only those Beta values that didn't equal 0 and munged on that set, but I get the same error. Then I thought maybe it has something to do with my Beta appear to be an OR. Should I be specifying my sumstats argument differently to account for that? (Maybe it just wasn't an issue for the first 100 SNPs but is for the full set?)

Here is my sumstats code:

p_sumstats<-sumstats(files=files, ref=ref, 

                          trait.names=trait.names, 

                          se.logit=se.logit, 

                          info.filter=info.filter, 

                          maf.filter=maf.filter, 

                          OLS=c(T,T), linprob=NULL, N=c(257828,766345)) 

Best, 
Charleen 


agro...@gmail.com

unread,
Nov 9, 2021, 7:52:46 PM11/9/21
to Genomic SEM Users
Hi Charleen, 

It should be fine if the file includes 0s for the betas so I'm not sure what the issue is. Unfortunately this is hard to diagnose again without running it line-by-line so I'd ask you to send (Andrew.G...@colorado.edu) the summary stats that are producing the error so I can see what's going on. 

Best, 
  Andrew

agro...@gmail.com

unread,
Nov 11, 2021, 12:23:02 PM11/11/21
to Genomic SEM Users
Hi Charleen, 

The error you are getting appears to be at the sumstats stage and has to do with the recent bug fix I put in. You will need to reinstall the package, restart R, and rerun the sumstats code and then it should run fine. 

Best, 
  Andrew

Reply all
Reply to author
Forward
0 new messages