ChongWuLab / FOGS

MIT License
1 stars 3 forks source link

FOGS.R error (ERROR : subscript out of bounds) #2

Open hellsgate666 opened 1 month ago

hellsgate666 commented 1 month ago

Hi,

We are trying to run FOGS.R in command line (after loading in plink and R) using the following commands:

Rscript ~/FOGS/FOGS.R \ 
--refld ~/FOGS/LDREF/1000G.EUR. \ 
--outd  ~/FOGS \
--loci ~/FOGS/LDetect/EUR/ \
--weights ~/FOCUS/mashr_Thyroid2.txt \
--genelist ~/FOCUS/mashr_Thyroid_genelist_unique.txt \
--sumstat ~/FOGS/PCOS_Summary_Statistics.xxxx.processed.txt.sumstats.gz \
--saveprefix ENSG00000246705 \
--chr_id 12 \
--locus_id 12

We are obtaining an error while running the FOGS.R script with these commands but cannot say with certainty at what line in the script it is erroring out. But we believe it is approximately after line 191. The errors have been pasted below -

~/FOGS/ENSG00000255621.prune.out
.
4
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : undefined columns selected
ERROR : undefined columns selected
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : undefined columns selected
ERROR : undefined columns selected
ERROR : subscript out of bounds
ERROR : subscript out of bounds
ERROR : subscript out of bounds
Error in `[<-.data.frame`(`*tmp*`, , "casual.id", value = NA_real_) :
  replacement has 1 row, data has 0
Calls: [<- -> [<-.data.frame
Execution halted
ChongWu-Biostat commented 1 month ago

Thank you for your question. The reason is that --weights ~/FOCUS/mashr_Thyroid2.txt \ --genelist ~/FOCUS/mashr_Thyroid_genelist_unique.txt \

have non-overlapping SNPs. I think you should check the weights to make sure it has the correct inputs. If needed, you can send me the codes and I will help you debug this. Thank you!