Thank you, Andrew. I appreciate the help. I’ve attached the log files.
Instead of trying to run it on 1000 SNPs, I tried using the entire files. It still didn’t recognize the Beta column for GWAS_CP_all. I modified it to be “effect”, and that still didn’t work.
Here is the error:
Error in round(median(files[[i]]$effect, na.rm = T)) :
non-numeric argument to mathematical function
In addition: Warning messages:
1: In for (i in (1L:cols)[do]) { :
closing unused connection 3 (CP_EA_sumstats.log)
2: In sumstats(files, ref, trait.names, se.logit, info.filter, maf.filter, :
Cannot find beta or effect column, try renaming it effect in the summary statistics file for:CP
I also tried removing unnecessary columns from the GWAS_CP_all file. Do the columns need to be in a particular order?
'data.frame': 10098325 obs. of 7 variables:
$ MarkerName: chr "rs2352974" "rs2271960" "rs2271961" "rs2247036" ...
$ A1 : chr "T" "C" "C" "C" ...
$ A2 : chr "C" "T" "T" "T" ...
$ SE : num 0.00285 0.00285 0.00285 0.00285 0.00285 0.00285 0.00285 0.00285 0.00285 0.00285 ...
$ Pval : num 5.19e-29 3.19e-28 3.23e-28 3.40e-28 6.81e-28 ...
$ effect : num -0.0319 -0.0314 -0.0314 0.0314 -0.0312 ...
$ EAF : num 0.5 0.507 0.507 0.493 0.508 ...
I also get errors when running the munge step. Not sure if it matters. I attached the log file for CP_munge
Warning message:In for (i in (1L:cols)[do]) { : closing unused connection 4 (CP_munge.log) Warning message:In for (i in seq_len(n)) { : closing unused connection 3 (CP_EA_sumstats.log)
Best,
Charleen