Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
raogeneron opened this issue Jun 13, 2024 · 1 comment
Open

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

raogeneron opened this issue Jun 13, 2024 · 1 comment

Comments

@raogeneron
Copy link

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
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants