getian107 / PRScsx

Cross-population polygenic prediction
MIT License
65 stars 20 forks source link

unboundlocalerror: local variable 'ref_dict' referenced before assignment #17

Closed forevertl closed 2 years ago

forevertl commented 2 years ago

Hello, greetings. I would like to ask a question. I run code below and got error:unboundlocalerror: local variable 'ref_dict' referenced before assignment. Do you happen to know how to slove it? Thank you very much for your help and time in advance. Lin

python PRScsx.py --ref_dir=....\ldblk_1kg_eur --bim_prefix=....\brca_prs_w_pheno --sst_file=....\base_brca_catalog.txt --n_gwas=5322 --pop=EUR --out_dir=.. --out_name=prs_csx_try

getian107 commented 2 years ago

Hi- I think the issue might be the specification of the reference directory. For PRS-CSx you need to provide the directory that contains the SNP information file and LD reference panels (i.e., the folder should contain ldblk_1kg_eur, ldblk_1kg_afr, etc as subfolders), not a population-specific directory.